pablo101 wrote:TheRumpledOne wrote:aliassmith wrote:
I am not an advanced programmer but I'm looking at it.
I believe if the line is changed to this:
OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice()+10*Point(),OrderTakeProfit(),0,Green);
and this:
OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice()-10*Point(),OrderTakeProfit(),0,Red);
but the market is closed so I'll test it later.
Or you could use an input:Code: Select all
extern double BE_Offset = 10.0 ;
OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice()+BE_Offset *Point(),OrderTakeProfit(),0,Green);
OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice()-BE_Offset *Point(),OrderTakeProfit(),0,Red);
That way you don't have to change the code if you want to use a value other than 10.0.
END OF CODING LESSON.
Thanks TRO, I found a solution.
And it will never be an end to your lessons. God bless!
I just tested it and It worked.