I am implementing the indicator and now I get signal bars only from the current period.
Now, I wish to get signals from the different periods at the same time, for example from Minute 1, Minute 5 and Minute 15 periods.
The code snippet of the signal in the current period:
// potential Buy signal if (switch_sar(AkSignalType.Buy)) { if (CurrentTrendFilter && !current_trend_filter(AkSignalType.Buy)) return; // add other filters here // if all filters OK --> alert the sound if (SoundAlert) { AkEntryType entry_type = conservative_sar_filter(AkSignalType.Buy) == true ? AkEntryType.Conservative : AkEntryType.Agressive; int rearm_seconds = (int)BarsPeriod.Value / RearmCount; string alert_message = entry_type.ToString() + "; M" + BarsPeriod.Value.ToString() + "; " + (High[0] + TickSize).ToString(); Alert(SIGNAL_UP_ALERT, Priority.High, alert_message, NinjaTrader.Core.Globals.InstallDir + @"\sounds\" + SoundFile, rearm_seconds, Brushes.White, Brushes.Green); } } // potential Sell signal else if (switch_sar(AkSignalType.Sell)) { if (CurrentTrendFilter && !current_trend_filter(AkSignalType.Sell)) return; // add other filters here // if all filters OK --> alert the sound if (SoundAlert) { AkEntryType entry_type = conservative_sar_filter(AkSignalType.Sell) == true ? AkEntryType.Conservative : AkEntryType.Agressive; int rearm_seconds = (int)BarsPeriod.Value / RearmCount; string alert_message = entry_type.ToString() + "; M" + BarsPeriod.Value.ToString() + "; " + (Low[0] - TickSize).ToString(); Alert(SIGNAL_DOWN_ALERT, Priority.High, alert_message, NinjaTrader.Core.Globals.InstallDir + @"\sounds\" + SoundFile, rearm_seconds, Brushes.White, Brushes.Red); } }
I assume, that I have to play somehow with BarsInProgress, but don't have any clue how...
Could you , please , advise me what to do best and may be provide some examples.
Thank you in advance!
Comment