Modification of a SL and TP in the opened trade (EA code modification)
Hi there,
Could someon please give me some advice or help on this: I would like to add some function which will modify a SL and TP, when I have some profit in points. For example:
my EA opens LONG trade when EURUSD is 1,2000 -> SL 1,1900 and TP is 1,2100.
When EURUSD is 1,2050 i would like to have SL modified to 1,2040 and trailing stop for example 20pips and TP changed or remove.
Big Thank You for help
You only show part of the code.
You should use OrderSelect() before calling OrderSymbol(), OrderTicket(), OrderType(), OrderStopLoss(), and OrderOpenPrice().
Not sure what your problem is . . . . you seem to know what you want to do, just get on and code it.
I know what I want, but don't know how to do it right. How to add sth that will modify my order when for example it made some profit?
Hi there,
Could someon please give me some advice or help on this: I would like to add some function which will modify a SL and TP, when I have some profit in points. For example:
my EA opens LONG trade when EURUSD is 1,2000 -> SL 1,1900 and TP is 1,2100.
When EURUSD is 1,2050 i would like to have SL modified to 1,2040 and trailing stop for example 20pips and TP changed or remove.
Big Thank You for help