I checked in alerts but could not find anything about it.
Hope someone could help.
I am trying to use the same indicator and to get 2 different sound alerts.
E.g. RSI under 10 and RSI over 90.
I have one indicator that does something similar but I can not get it to work.
Thanks in advance. BR Stefan
Code: Select all
inputs:
Price( Close ),
Length( 2 ),
OverSold( 10 ),
OverBought( 90 ),
OverSColor( Cyan ),
OverBColor( Red ) ,
SoundDirectory("C:\ProgramData\TS Support\MultiCharts64\TS_Sounds\");
variables: var0( 0 ) ;
vars:
patText(""), CheckAll(0), SoundFile(""), SoundStr("");
var0 = RSI( Price, Length ) ;
Plot1( var0, "RSI" ) ;
Plot2( OverBought, "OverBot" ) ;
Plot3( OverSold, "OverSld" ) ;
if var0 > OverBought then
SetPlotColor( 1, OverBColor )
else if var0 < OverSold then
SetPlotColor( 1, OverSColor ) ;
condition1 = var0 crosses over OverSold ;
{if condition1 then
Alert( "Indicator exiting oversold zone" )
else
begin
condition1 = var0 crosses under OverBought ;
if condition1 then
Alert( "Indicator exiting overbought zone" ) ;
end;}
if var0 > overbought then
begin
SoundFile= "RSI above 90.wav";
patText = patText + "[RSI>90]";
end;
if var0 < oversold then
begin
SoundFile= "RSI under 10.wav";
patText = patText + "[RSI<10]";
end;