Download MetaTrader 5

Help, enter position.

To add comments, please log in or register
ea_mt4
50
ea_mt4  
Hello, I can not set the sales position.
My expert enters long if high is greater than the n opening and sells low value if the opening is less than the value n.

my code. 

if ((High [0] -Open [0]> 20 * Point)) return ("buy"); // buy signal
if ((Low [0] -Open [0]> 10 * Point)) return ("sell"); // sell signal

because the condition of sale does not work?
Keith Watford
Moderator
10614
Keith Watford  
Low [0] -Open [0] can never be bigger than 0
ea_mt4
50
ea_mt4  

how do I fix? 

honest_knave
Moderator
2318
honest_knave  
ea_mt4:

how do I fix? 


if ((Open [0] - Low[0]> 10 * Point)) return ("sell"); // sell signal
ea_mt4
50
ea_mt4  
thank you so much
To add comments, please log in or register