Hello, I am making an EA to open Cable order, the order is open 1.5200, 1.5400, 1.5600, 1.5800, 1.6000, 1.6200.... which this 200 interval divided by 5,
at 1.5200 will be (1.5240, 1.5280, 1.5320, 1.5360, 1.5400)
at 1.5400 will be (1.5440, 1.5480, 1.5520, 1.5560, 1.5600)
and...........................
so when i attach EA, the ea will choose nearest upper and lower interval to open order
For example, when I attach the Ea to the chart, the current price is 1.5460,
So the upper interval is 1.5480
the lower interval is 1.5440, when the price reach 1 of this, the ea will open order,
so anyone could suggest me how to write the logic code pls?
at 1.5200 will be (1.5240, 1.5280, 1.5320, 1.5360, 1.5400)
at 1.5400 will be (1.5440, 1.5480, 1.5520, 1.5560, 1.5600)
and...........................
so when i attach EA, the ea will choose nearest upper and lower interval to open order
For example, when I attach the Ea to the chart, the current price is 1.5460,
So the upper interval is 1.5480
the lower interval is 1.5440, when the price reach 1 of this, the ea will open order,
so anyone could suggest me how to write the logic code pls?