Not sure what function to use to get bar info relative to an opened order

To add comments, please log in or register
Belal Chami
32
Belal Chami  

I want to code a loop to close an order (effectively a stoploss). The order should be closed when the price drops below the lowest price (minus 2 pips) of either of the 3 bars immediately before the marker buy order. 

I was thinking of using the CopyLow to get a history of the lowest price of an array of bars, but I am unsure how to do this relative to the current order. My EA script will only ever have one market order open at a time so I am not fussed with using functions to specifically locate a particular market order.

What is the best approach here?

Many thanks in advance

Mohamad Zulhairi Baba
16589
Mohamad Zulhairi Baba  
Belal Chami:

I want to code a loop to close an order (effectively a stoploss). The order should be closed when the price drops below the lowest price (minus 2 pips) of either of the 3 bars immediately before the marker buy order. 

show what you have tried.

To add comments, please log in or register