I have added me an alert to my strategy. But when I do enable the datafeed or my strategy then I can hear the soundmessage even when the condition was true already few bars ago. I have (Historical) return;
What can one do please so that the alert is done with the one bar (close of the bar with COBC=false) and only one time when the condition is true eg high[0]>SMA&&Low[0]<SMA and not later when datafeed or strategy is enabled.
I have
Alert("XY", NinjaTrader.Cbi.Priority.High, "XY", _alertSoundFile_XY, 300, Color.Black, Color. Yellow);
I couldn´t find in the help guide what to add to the code.
Thank you
Tony
Comment