Trailing Profit Take
Created at 05 May 2015, 10:15
Trailing Profit Take
05 May 2015, 10:15
Hi,
I have seen code for trailing stop loss, and although I'm not an expert I want to code also trailing profit take.
What about this? Any Suggestions?
if(position.TradeType == TradeType.Buy) { double distance = position.EntryPrice - Symbol.Bid; if (distance >= Trigger * Symbol.PipSize) { double newProfitTakePrice = Symbol.Bid + TrailingProfit * Symbol.PipSize; if (position.ProfitTake == null || newProfitTakePrice > position.ProfitTake) { Trade.ModifyPosition(position, newProfitTakePrice, position.TakeProfit); } } }
Thanks
Spotware
18 Jun 2015, 12:54
Dear Trader,
We do not provide coding assistance services. We more than glad to assist you with specific questions about cAlgo.API. You also can contact one of our Partners or post a job in Development Jobs section for further coding assistance.
@Spotware