cBots
Indicators
Copy
Brokers
More
Store
Plugins
Prop firms
Challenges
Get cTrader
Help center
Discord
danor60000
Joined 09.06.2023
How to make TakeProfit move forward when its price approaches? 09 Jun 2023, 13:32
firemyst 09 Jun 2023, 15:17
if (distance between current ask or bid price and current take profit price is within x-pips of yourposition.TakeProfit.GetValueOrDefault())
{
yourPosition.ModifyTakeProfitPrice( yourposition.TakeProfit.GetValueOrDefault() + (Symbol.PipSize * number of pips you want to move it forward);
}
firemyst
09 Jun 2023, 15:17
if (distance between current ask or bid price and current take profit price is within x-pips of yourposition.TakeProfit.GetValueOrDefault())
{
yourPosition.ModifyTakeProfitPrice( yourposition.TakeProfit.GetValueOrDefault() + (Symbol.PipSize * number of pips you want to move it forward);
}
@firemyst