| 
Rank: Newbie
 Groups: Registered, Registered UsersJoined: 4/15/2009(UTC)
 Posts: 4
 
 | 
            
	      
                dear friends.......... hello all.please help me with this range breakout code.i m getting some error in it.plz help me out.i tried it but struck sumwhere.the code is:- RANGE BREAKOUT  ATRBars:=3; {Length of Average TrueRange} ATRMult:=0.62; {Multiplier for ATR (Volatility Factor)}
 MOMBars:=28; {Length of Momentum Indicator}
 MOMBack:=10; {Length of Momentum LookBack Period}
 ATRVal:=ATR(ATRBars)*ATRMult;
 MOMVal:=Mom(C,MOMBars);
 MOMTrnd:=If(MOMVal>Ref(MOMVal,-MOMBack),1,-1);
 lePrice:=If(MOMTrnd>0,H+ATRVal,C+ATRVal);
 sePrice:=If(MOMTrnd<0,L-ATRVal,C-ATRVal);
 Cross(MOMTrnd,0)
   AND buys at the value of the lePrice variable  Also it tells you to sell when this happens :  ATRBars:=3; {Length of Average TrueRange} ATRMult:=0.62; {Multiplier for ATR (Volatility Factor)}
 MOMBars:=28; {Length of Momentum Indicator}
 MOMBack:=10; {Length of Momentum LookBack Period}
 ATRVal:=ATR(ATRBars)*ATRMult;
 MOMVal:=Mom(C,MOMBars);
 MOMTrnd:=If(MOMVal>Ref(MOMVal,-MOMBack),1,-1);
 lePrice:=If(MOMTrnd>0,H+ATRVal,C+ATRVal);
 sePrice:=If(MOMTrnd<0,L-ATRVal,C-ATRVal);
 Cross(0,MOMTrnd)
 AND sells at the value of the sePrice variable 
     thanks.         | 
    | 
             | 
            
         | 
    |  | 
        
        
        
            
        
            
            
    | 
Rank: Advanced Member
 Groups: Registered, Registered Users, Subscribers, Unverified UsersJoined: 10/28/2004(UTC)
 Posts: 3,112
 Location: Perth, Western Australia
 
 Was thanked: 17 time(s) in 17 post(s)
 | 
            
	      
                ez
 Instead of saying, "i m getting some error in it" it is better to say, "I am getting a 'This is is not a valid function name error' and the cursor is placed in a line of code next to the Mom(C, MomBars) part of the code." This would have alleviated the need for us to do all the work required to help you to find where the error was and then to identify the cause...
 
 MS was showing your where the error was. The MS function for momentum is Mo().
 
 
 wabbit [:D]
 
 
 | 
    | 
             | 
            
         | 
    |  | 
        
        
        
    
        
            
            
    | 
Rank: Newbie
 Groups: Registered, Registered UsersJoined: 4/15/2009(UTC)
 Posts: 4
 
 | 
            
	      
                hi wabbit. thanks for your prompt reply.i got your point.but sir can u help me with the formula for the range bar,means above or below we can get the breakout(above high of that bar and below low of that bar).sir i want to develop a code based on that.luking forward for your help. thanks. eztrader. | 
    | 
             | 
            
         | 
    |  | 
        
        
        
    
                           
    
| Users browsing this topic | 
| 
Guest (Hidden) | 
    
        Forum Jump
         
    
    You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.