Hello,
i am trying to create a comfortable audio alert tool.
It has worked when i have tried without parameters. However now
it doesn’t work.
Can anyone check it please ?
If it is finished one can quickly create an audio alert
without coding.
Below is the code:
Best regards
Thomas Zmuck
www.tradingbasis.com
_SECTION_BEGIN("Price");
Alarm_switch = ParamToggle("Alarm", "Off|On ",0);
ticker = ParamStr("Ticker","GBP
A0-FX");
Alarm_LH = ParamToggle("Lower/Higher", "Lower|Higher
",0);
price = ParamField("Price");
Value = Foreign("Ticker","price");
Triggerlevel = Param("Trigger level",LastValue(Value),0,2,0.001);
_SECTION_END();
Cond1 = IIf(Alarm_LH == 0 AND Value < Triggerlevel,1,IIf(Alarm_LH == 1 AND Value > Triggerlevel,2,0));
Buy = Cond1 == 1;
Sell = Cond1 == 2;
AlertIf( Alarm_switch
& Buy, "SOUND
C:\\Windows\\Media\\ringin.wav", "Audio
alert", 1 );
AlertIf( Alarm_switch
& Sell, "SOUND
C:\\Windows\\Media\\ringin.wav", "Audio
alert", 2 );