I just removed it and Print is showing up once correctly. Thanks. Sorry I am still new to this.
Here is what I have now for OnBarUpdate() and is printing it once but it's still showing swing high from 20 bars ago. Let me go back to your video once again and see what I am missing now. I think I am very close
protected override void OnBarUpdate()
{
//Long Entry with close below 8ema
if (Times[0][0].TimeOfDay > new TimeSpan(8, 11, 30)
&& Times[0][0].TimeOfDay < new TimeSpan(8, 12, 30))
{
//EnterLong(lotSize,"Lot1");
if (mySwing.SwingHigh[0] > 0)
{
if (mySwing.SwingHighBar(0,1,CurrentBar -1 ) > -1)
{
mySwingHighBarsAgo = mySwing.SwingHighBar(0, 1, CurrentBar -1);
}
}
Print(Time[0]+" Instance Home "+mySwingHighBarsAgo+" High was "+High[mySwingHighBarsAgo]);
//isReadyForLong = false;
}
}
Comment