How to code price closing on a level??
Hey everyone, noob question lol been stuck for 5 days now: (in mql4) if i wanted to code price closing at a level say on a 20 period SMA, within plus or minus 5 points, how would i express that?
- basic question : Exit on close
- Coding help
- Selecting order from history of a day
Alex McPhie:
Hey everyone, noob question lol been stuck for 5 days now: (in mql4) if i wanted to code price closing at a level say on a 20 period SMA, within plus or minus 5 points, how would i express that?
Hey everyone, noob question lol been stuck for 5 days now: (in mql4) if i wanted to code price closing at a level say on a 20 period SMA, within plus or minus 5 points, how would i express that?
if(price<=SMA+5*Point && price>=SMA-5*Point) { }
Alex McPhie: within plus or minus 5 points, how would i express that?
if( MathAbs(price - SMA) <= 5*Point) { }
Keith Watford:
William Roeder: