Yo Adrian
New member
I have multiple alerts for both long and short entries. Sometimes when all trigger I get a long string of audio alerts. I'd like to only have one alert per entry.
My code for alerts:
I tried this with no luck:
I also tried this with no luck:
Is it a syntax issue or are conditional alerts like this not possible?
Oh, yes sorry about that Here's the full script
My code for alerts:
Code:
Alert(UpSignal_A[1], " ", Alert.BAR, Sound.Ding);
Alert(UpSignal_B[1], " ", Alert.BAR, Sound.Ding);
Alert(UpSignal_C[1], " ", Alert.BAR, Sound.Ding);
I tried this with no luck:
Code:
Alert(UpSignal_A[1] or UpSignal_B[1] or UpSignal_C[1], " ", Alert.BAR, Sound.Ding);
I also tried this with no luck:
Code:
Alert(
UpSignal_A[1], " ", Alert.BAR, Sound.Ding
or
Alert(UpSignal_B[1], " ", Alert.BAR, Sound.Ding);
or
Alert(UpSignal_C[1], " ", Alert.BAR, Sound.Ding);
);
Is it a syntax issue or are conditional alerts like this not possible?
Oh, yes sorry about that Here's the full script
Code:
input price = close;
input length = 9;
input length2 = 12;
input displace = 0;
input showBreakoutSignals = yes;
plot AvgExp = ExpAverage(price[-displace], length);
plot AvgExp2 = ExpAverage(price[-displace], length2);
def rising = AvgExp[1] < AvgExp[0];
def falling = AvgExp[1] > AvgExp[0];
def rising2 = AvgExp2[1] < AvgExp2[0];
def falling2 = AvgExp2[1] > AvgExp2[0];
plot UpSignal = price crosses above AvgExp and rising and rising2;
plot DownSignal = price crosses below AvgExp and falling and falling2;
plot UpTrend = AvgExp[2] < AvgExp[1] and AvgExp[1] < AvgExp[0];
plot DownTrend = AvgExp[2] > AvgExp[1] and AvgExp[1] > AvgExp[0];
plot BullBreak = close[0] > high[1] and close[0] > high[2] and close[0] > high[3];
plot BearBreak = close[0] < low[1] and close[0] < low[2] and close[0] < low[3];
UpSignal.SetDefaultColor(Color.UPTICK);
UpSignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
DownSignal.SetDefaultColor(Color.DOWNTICK);
DownSignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
UpTrend.SetDefaultColor(Color.UPTICK);
UpTrend.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
DownTrend.SetDefaultColor(Color.DOWNTICK);
DownTrend.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
BullBreak.SetDefaultColor(Color.UPTICK);
BullBreak.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
BearBreak.SetDefaultColor(Color.DOWNTICK);
BearBreak.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
Alert(UpSignal[1], " ", Alert.BAR, Sound.Ding);
Alert(DownSignal[1], " ", Alert.BAR, Sound.Ding);
Alert(UpTrend[1], " ", Alert.BAR, Sound.Ding);
Alert(DownTrend[1], " ", Alert.BAR, Sound.Ding);
Alert(BullBreak[1], " ", Alert.BAR, Sound.Ding);
Alert(BearBreak[1], " ", Alert.BAR, Sound.Ding);
Last edited by a moderator: