PureBytes Links
Trading Reference Links
|
Or the alternative
cond=Cum(Cross(MACD(),0))==LastValue(Cum(Cross(MACD(),0)))-1;
bars=BarsSince(Cond AND Ref(Cond,-1)==0);
DT
--- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx>
wrote:
> bars=LastValue(Cum(1))-ValueWhen(Cross(MACD(),0),Cum(1),2);
> DT
> --- In amibroker@xxxxxxxxxxxxxxx, "Ara Kaloustian" <ara1@xxxx>
wrote:
> > How would one write code to find barssince the crossing of second
> last event.
> >
> > Example: BarsSince(MACD,0) - cross for second last crossing
> >
> > Thanks
> >
> > Ara
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/Lj3uPC/Me7FAA/CNxFAA/GHeqlB/TM
---------------------------------------------------------------------~->
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|