I have to modify an open order only once with the SL. Then, when the order is 10 pips in profit, I want to set a trailing stop. How can I realize that? It only modifys again, when it's 10 pips upwards and then sets the SL breakeven.
arroganzmaschine: Mladen can you help me once again?
I have to modify an open order only once with the SL. Then, when the order is 10 pips in profit, I want to set a trailing stop. How can I realize that? It only modifys again, when it's 10 pips upwards and then sets the SL breakeven.
One more question: How do I set the StopLoss 2 Pips under opening price? When I try SL=OrderOpenPrice() it works fine (BreakEven), but when I try OrderOpenPrice()-20 (5 digits), then there is a failure.
arroganzmaschine: Thank you! I will read trough the topics. One more question: How do I set the StopLoss 2 Pips under opening price? When I try SL=OrderOpenPrice() it works fine (BreakEven), but when I try OrderOpenPrice()-20 (5 digits), then there is a failure.
arroganzmaschine: Thank you mladen, great! Will try it later. Is this the same with indices? Like I enter a trade at 9101 and wand to set SL to 9899. Then I have to take your code with 20?
arroganzmaschine: Thanks mladen! How can I get the current price of the symbol?
One of these ways (the function way - with the "desiredSymbol" argument - is for the case when you want a symbol different than the current charts symbol) :
Close[0] or iClose(desiredSymbol,0,0) -> current close
Olose[0] or iOpen(desiredSymbol,0,0) -> current open
Low[0] or iLow(desiredSymbol,0,0) -> current low
High[0] or iHigh(desiredSymbol,0,0) -> current high
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Mladen can you help me once again?
I have to modify an open order only once with the SL. Then, when the order is 10 pips in profit, I want to set a trailing stop. How can I realize that? It only modifys again, when it's 10 pips upwards and then sets the SL breakeven.
Thank you!!!
Mladen can you help me once again?
I have to modify an open order only once with the SL. Then, when the order is 10 pips in profit, I want to set a trailing stop. How can I realize that? It only modifys again, when it's 10 pips upwards and then sets the SL breakeven.
Thank you!!!arroganzmaschine
That is a bit more complicated
Did you check the existing EAs that are dealing with trailing stops (like these : trailing stop - Search Results - Forex-TSD )?
arroganzmaschine
That is a bit more complicated
Did you check the existing EAs that are dealing with trailing stops (like these : trailing stop - Search Results - Forex-TSD )?Thank you! I will read trough the topics.
One more question: How do I set the StopLoss 2 Pips under opening price? When I try SL=OrderOpenPrice() it works fine (BreakEven), but when I try OrderOpenPrice()-20 (5 digits), then there is a failure.
Thank you! I will read trough the topics. One more question: How do I set the StopLoss 2 Pips under opening price? When I try SL=OrderOpenPrice() it works fine (BreakEven), but when I try OrderOpenPrice()-20 (5 digits), then there is a failure.
arroganzmaschine
Use this : OrderOpenPrice()-20*Point
arroganzmaschine Use this : OrderOpenPrice()-20*Point
Thank you mladen, great! Will try it later.
Is this the same with indices? Like I enter a trade at 9101 and wand to set SL to 9899. Then I have to take your code with 20?
Thank you mladen, great! Will try it later. Is this the same with indices? Like I enter a trade at 9101 and wand to set SL to 9899. Then I have to take your code with 20?
arroganzmaschine
Yes, It should be the same for indices too
Thanks mladen!
How can I get the current price of the symbol?
Thanks mladen! How can I get the current price of the symbol?
One of these ways (the function way - with the "desiredSymbol" argument - is for the case when you want a symbol different than the current charts symbol) :
Ok, I will try it. I only need the price of a tick.
Ok, I will try it. I only need the price of a tick.
arroganzmaschine
What does the "price of a tick" mean?
If it is a bid or ask price, then use :