ALSO, when I run my method call "CheckForLoserCount();" It places a long trade at candle close. I have no logic that tells the strategy to place any trade. I want it to close the strategy.
Print(SystemPerformance.AllTrades.TradesPerformance.MaxConsecutiveLoser);
private void CheckForLoserCount()
{
if (SystemPerformance.AllTrades.TradesPerformance.Max ConsecutiveLoser == LoserCount)
{
CloseStrategy("StochMomentumStrat");
/* if (PositionAccount.MarketPosition == MarketPosition.Long && PositionAccount.Quantity == ContractAmount)
{
ExitLong(ContractAmount);
CloseStrategy("StochMomentumStrat");
}
else if (PositionAccount.MarketPosition == MarketPosition.Short && PositionAccount.Quantity == ContractAmount)
{
ExitShort(ContractAmount);
CloseStrategy("StochMomentumStrat");
}*/
}
}

Comment