Open an order

 

Hi to all,

 

Could you show me how to open an order in this situation;

After Bid passes up a line (could be a line from an indicator) and when Bid backs down from that line an order should be open. 

 Thank you in advance

Luis 

 
Click on the "New order" button.
 

It depends on many concepts that you are thinking of ... but this is one of them ...

if(Open[1]>Indicator_variable && Close[1]<Indicator_variable)
   OpenBuy();

if(Open[1]<Indicator_variable && Close[1]>Indicator_variable)
   OpenSell();

 This is just if price of last bar opened in one side of the Indicator line and closed in the other side ...

So, logically you should write the right code that fits your idea.

Good luck ...