danor60000
Joined 09.06.2023
How to make TakeProfit move forward when its price approaches? 09 Jun 2023, 13:32
ctid+customer-395444 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);
}
ctid+customer-395444
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);
}
@ctid+customer-395444