Download MetaTrader 5

Weekend Gaps Problem

To add comments, please log in or register
yanoosh
11
yanoosh  

Hey guys,

i am working on an EA in H1 Period and have to solve a probem with (weekend) gaps. I dont want it to open trades after a price gap of more than 10 pips occured.


Tried to solve this with:

if ((Close[1]-Open[0])/(PipValue*Point) > 10)

and

if ((Close[1]-Open[0])/(PipValue*Point) < 10)

but it does not to work.


How to descrribe a gap?

Thanks in advance.

Edit:
Solution: http://forum.mql4.com/46154
To add comments, please log in or register