Symbol is improperly used and MQ5 compiler reports error. The right function should probably be " Symbol() " , please check.
sqSetSLPT(PositionGetInteger(POSITION_TICKET), sqFixMarketPrice(sqConvertToRealPips(symbol, SetStopLossStopLoss), PositionGetString(POSITION_SYMBOL)), 0);
MOREOVER:
When Set Stop Loss in PIPS is used it is placing just PIPS value in place of Current Price +/- PIPS value. Please see below:
...
2020.05.08 09:22:58.378 2019.10.30 21:05:00 market buy 0.10 AUDUSD sl: 0.68511 tp: 0.68768 (0.68661 / 0.68664)
then after request to modify SL to be set as 1 PIPS (I understand that is should be set as 1 PIPS from current price):
2020.05.08 09:23:32.141 2019.10.30 21:30:00 position modified [#2 buy 0.10 AUDUSD 0.68664 sl: 0.00010 tp: 0.68773]
Description changed:
Symbol is improperly used and MQ5 compiler reports error. The right function should probably be " Symbol() " , please check.
sqSetSLPT(PositionGetInteger(POSITION_TICKET), sqFixMarketPrice(sqConvertToRealPips(symbol, SetStopLossStopLoss), PositionGetString(POSITION_SYMBOL)), 0);
MOREOVER:
When Set Stop Loss in PIPS is used it is placing just PIPS value in place of Current Price +/- PIPS value. Please see below:
...
2020.05.08 09:22:58.378 2019.10.30 21:05:00 market buy 0.10 AUDUSD sl: 0.68511 tp: 0.68768 (0.68661 / 0.68664)
then after request to modify SL to be set as 1 PIPS (I understand that is should be set as 1 PIPS from current price):
2020.05.08 09:23:32.141 2019.10.30 21:30:00 position modified [#2 buy 0.10 AUDUSD 0.68664 sl: 0.00010 tp: 0.68773]
Status changed from New to Waiting for information
please attach the strategy that produces the code you mentioned.
Best regards,
Tomas
Attachment B5_EA_v32_to_Support.mq5 added
Attachment B5_EA_v32.sqx added
Attachment Condition with problem.jpg added
You can check for AUDUSD M5 time frame for 30.10.2019 21:00 - it will be hammer closed with SL. The strategy should after 6 candles move SL to 1 pips (10 points) below current price to protect trade from Bigger SL. It is changing SL to 0.00010 value.
Both Fixed value in PIPS and Range in PIPS behave the same way.
By the way. What actually Range in PIPS means/should do for SL/TP and what is the difference between Fixed value in Pips and Range in Pips?
Status changed from Waiting for information to Fixed
thank you for the strategy attached. I have fixed the MQL template so it will be working fine in the next release.
Range in pips is basically the same as Fixed value in pips except in Range in pips you can use a formula to calculate the value.
Best regards,
Tomas