RSITarget = 70;
PlayAlert = true;
protected override void OnBarUpdate()
{
// Condition set 1
if (RSI(14, 3).Avg[0] >= RSITarget
&& PlayAlert == true)
{
Alert("MyAlert3", Priority.High, "RSI > 70", @"C:\Program Files (x86)\NinjaTrader 7\sounds\Alert1.wav", 5, Color.White, Color.Black);
}
}
Then, all works as expected. Now, when I use the RSI indicators of 7 periods, 3 smoothing, and I use this alert, it fails.
RSIAlert = 70;
TriggerAlarm = true;
protected override void OnBarUpdate()
{
// Condition set 1
if (RSI(7, 3).Avg[0] == RSIAlert
&& TriggerAlarm == true)
{
Alert("MyAlert0", Priority.High, "Set Up", @"C:\Program Files (x86)\NinjaTrader 7\sounds\Alert1.wav", 0, Color.White, Color.Black);
}
}
Any notion of where my fault is? Thanks for your help.
Comment