But It is not working,, I cnt find what is wrong!!
protected override void OnExecution(IExecution execution)
{
trade_ProfitLoss_Current = Math.Round(Position.GetProfitLoss(Close[0], PerformanceUnit.Currency),2);
if (trade_ProfitLoss_Current < 0)
{
timeToLoss = ToTime(Time[0]);
}
else
{
timeToLoss = 0;
}
}
Comment