----- Original Message -----
Sent: Monday, May 01, 2006 10:21 PM
Subject: [amibroker] problem with
AlertIf() and GetRTData()
i recently converted a
rather large formula from SetForeign() to GetRTData(), but now i can't seem to
get my AlertIfs working.
Could someone help me out and
tell me why this (example) code does not generate alerts in the alert output
window?
thanks,
dirk
//example code pair BHS-BZH
BHS=100*GetRTDataForeign("Change","BHS")/GetRTDataForeign("Prev","BHS"); //percentage change since yesterday's close
BZH=100*GetRTDataForeign("Change","BZH")/GetRTDataForeign("Prev","BZH"); //percentage
change since yesterday's close
BHS_BZH_trigger=2; //trigger value
AlertIf(Ref(Cross((BHS-BZH),BHS_BZH_trigger),-1),"SOUND D:\\AmiBroker\\Sounds\\alert.wav","Signal Alert on pair BHS-BZH
(up)",1);
AlertIf
(Ref(Cross(-1*(BHS+BZH),BHS_BZH_trigger),-1),"SOUND D:\\AmiBroker\\Sounds\\alert.wav","Signal Alert on pair BHS-BZH
(down)",1);
New Yahoo! Messenger with Voice. Call
regular phones from your PC and save big.