PureBytes Links
Trading Reference Links
|
I am trying to write code that will return the closing price on the
date of the last cross of the signal line by the MACD line prior to
a cross of the same type occuring today. I have a selectio of code
here, but am getting a syntax error trying to use the ValueWhen
function. Does anybody see anything wrong with this? TIA.
RET_1 = Prefs( 11 );
RET_2 = Prefs( 12 );
RET_3 = Prefs( 13 );
M_LINE = MACD(RET_1, RET_2);
S_LINE = Signal(RET_1, RET_2, RET_3);
PRES_CROSS = Cross(M_LINE, S_lINE);
PREV_CROSS = Ref(Cross(M_LINE, S_LINE), -1);
PREV_CLOSE = ValueWhen(Ref(Cross(M_LINE, S_LINE), -1) C, 1);
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|