PositionModify not working

 
                     { 
                       m_trade.PositionModify(_Symbol,sl,tp);
                       
                        Print("ch slb sl=",sl," tp=",tp);
                     }

// Normalised like: double tp=NormalizeDouble(m_position.TakeProfit(),Digits());

This is inside an EA working with cfd.

Triggered at the right moment with sl & tp far away from current price the print function shows correct values but the position is not modified.

No error message. No "invalid ...". Simply no reaction.

The function works perfect with a 1 digit broker. But it fails with a 2 digit broker.   This in tester, not tested if it works in live trading.

But the print function shows with the 2 digit broker only 1 digit after the comma, as the second digit is always 0.

Can it be that the missing 0 at the end causes the problem? 

How can I solve the problem?

Documentation on MQL5: Common Functions / Print
Documentation on MQL5: Common Functions / Print
  • www.mql5.com
Print - Common Functions - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5