PnlDiario = 0;
if (DetenerEstrategia)
return;
//Condicion Perdida Maxima Diaria
PnlDiario = SystemPerformance.AllTrades.TradesPerformance.Curr ency.CumProfit - PnlAcumulado;
if (ActivarPerdida && (PnlDiario + Position.GetUnrealizedProfitLoss(PerformanceUnit.C urrency, Close[0])) <= -MaxPerdidaDiaria)
{
// Se llamará a un método personalizado diseñado para cerrar todas las posiciones abiertas y cancelar todas las órdenes de trabajo.
StopStrategy();
}
using if (Bars.IsFirstBarOfSession) resets my pnl at the start of a new day. The problem comes because when starting the strategy, the NLP is located in the virtual NLP. If the strategy had been working all the time since the beginning of the day, then I need to reset my NLP at the time of starting the strategy.
And how can I start a strategy without showing me the operations that he was able to do in the past?
Comment