JA
Taking profits to early
04 Nov 2014, 11:05
Hi guys,
I created a program and it works fine the problem I have is that the robot takes profits to early.
I am using ATR as a multiple to take profit and as you can see above the take profit is 64pips however it takes the profit at 9 pips.
Can someone tell me what is wrong and help me please???
Thank you for help.

modarkat
04 Nov 2014, 11:27
You must pass absolute price to the ModifyPosition method.
Example:
var takeProfitPips = 40; var stopLossPips = 20; var stopLoss = position.TradeType == TradeType.Buy ? position.EntryPrice - stopLossPips * Symbol.PipSize : position.EntryPrice + stopLossPips * Symbol.PipSize; var takeProfit = position.TradeType == TradeType.Buy ? position.EntryPrice + stopLossPips * Symbol.PipSize : position.EntryPrice - stopLossPips * Symbol.PipSize; ModifyPosition(position, stopLoss, takeProfit);@modarkat