I am confused as to why this is happening:
you can see a close position and then the one I added named CloseWaddahSell
here is the open and closing code:
// Set 1
if ((CanTrade && WaddahAttarExplosion1.WaddahColor==1 || WaddahAttarExplosion1.WaddahColor==2)
&& (CCI1[0] > 0)
&& (ParabolicSAR1[0] < Close[0]))
{
EnterLong(Convert.ToInt32(DefaultQuantity), @"WaddaBuy");
}
// Set 2
if ((CanTrade && WaddahAttarExplosion1.WaddahColor==3 || WaddahAttarExplosion1.WaddahColor==4)
&& (CCI1[0] < 0)
&& (ParabolicSAR1[0] > Close[0]))
{
EnterShort(Convert.ToInt32(DefaultQuantity), @"WaddahSell");
}
}
// Set 3
if( (Close[0] < ParabolicSAR1[0]) && (Position.MarketPosition == MarketPosition.Long) )
{
ExitLong(Convert.ToInt32(DefaultQuantity), @"CloseWaddaBuy", @"WaddaBuy");
}
// Set 4
if ((Close[0] > ParabolicSAR1[0]) && (Position.MarketPosition == MarketPosition.Short))
{
ExitShort(Convert.ToInt32(DefaultQuantity), @"CloseWaddahSell", @"WaddahSell");
}
SetStopLoss(CalculationMode.Currency, 1000);
Thank you.

Comment