[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] problem with AlertIf() and GetRTData()



PureBytes Links

Trading Reference Links

Hello,
 
I am wondering why don't you simply go to the HELP file in first place (before you started replacing one function with another)
 
Is it that hard to read the function reference ?
 
It says clearly:
"The function retrieves the LAST (the most recent) value of the following fields reported by streaming real time data source for specified symbol"
 
Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
Sent: Thursday, May 04, 2006 11:33 AM
Subject: Re: [amibroker] problem with AlertIf() and GetRTData()

OK,
 
marcin at support@xxxxxxxxxxxxx gave me an answer. maybe it is of interest to others as well:
GetRtData() and GetRTDataForeign() do not return/hold ARRAYS but only LAST NUMBER. therefore one cannot use
these functions together with other functions like Ref() or Cross() because they need an ARRAY.
quite a shame, i will have to revert back to good old Foreign() which executes slower than GetRTDataForeign().
 
dirk
 
----- 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.


New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.


Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software Investment software


YAHOO! GROUPS LINKS