i have build a strategy and its working fine,
now i have a stoploss and profit set on:
else if (State == State.Configure)
{
SetStopLoss("", CalculationMode.Currency, stop, false);
SetProfitTarget("", CalculationMode.Currency, target);
}
when the strategy open a position the stop and profit are set automatic by this methods, the problem its now i want to improve the strategy and make a dinamic stoploss
example; i have an open position, the stopLoss its seted -200€ from the enter level, now if the price do X i want to move the stop to the entry level,
where i have to set the condition IF?
i have this method for open position:
if (X happens)
{
EnterLongLimit(Convert.ToInt32(DefaultQuantity), enterLevel, "");
}
how can i modificate the stopLoss once the position its open?
thanks!
Comment