Adding alerts to any indicator?

V

Vorlauf

New member
Is there a generic audible alert code that can be added to any indicator?
 
Last edited by a moderator:
BenTen

BenTen

Administrative
Staff
VIP
Not really. There is no universal code to just copy/paste. But it shouldn't be that hard for indicator that produce signals.

Here is a quick one as an example:

Code:
# Define Bullish FTR Candle
def IsUp = close > open;
def IsDown = close < open;
plot Bullish_FTR =
    IsUp[4] and
    IsUp[3] and
    IsUp[2] and
    IsDown[1] and
    IsUp[0] and
    high[2] > high[1] and
    close[3] < close[2] and
    open[1] < close[0] and
    low[2] < low[1] and
    open[4] < open[3] and
    close[4] < high[3] and
    open[3] < open[2];

Bullish_FTR.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
Bullish_FTR.SetDefaultColor(GetColor(0));

Alert(Bullish_FTR, " ", Alert.Bar, Sound.Chimes);
Full source code if you're interested.
 
V

Vorlauf

New member
Awesome, Thanks. Putting me in the right direction
 

Similar threads

Top