adjust stoploss wthout changing tekeprofit

 

Hi, is it possible to adjust the stoploss in mq5 without specifying a new value for the takeprofit.

eg: if I have a buy position, I want to raise the stoploss when my trade is profitable but i dont want to raise my takeprofit.

Positionmodify() seems to require a value for TP but the existing TP them becomes to close to my limit stops and setting zero removes the original TP.

 
Lerato Silokwane: Positionmodify() seems to require a value for TP but the existing TP them becomes to close to my limit stops and setting zero removes the original TP.

Correct. Once the market gets too close to your stops, you can't modify it.

You can't move stops (or pending prices) closer to the market than the minimum: MODE_STOPLEVEL * _Point or SymbolInfoInteger(SYMBOL_TRADE_STOPS_LEVEL).
          Requirements and Limitations in Making Trades - Appendixes - MQL4 Tutorial
 
William Roeder:

Correct. Once the market gets too close to your stops, you can't modify it.

Thanks William. I'll have to go the long way and  track my trade profits directly then instead of adjusting my stop-losses.