PureBytes Links
Trading Reference Links
|
Conditions are binary quantities, their value is 0 or 1.
If something occurred [only] once in the last n bars, then
Sum(cond,n)==1
Since it may occurred more than once, it is better to use
Sum(cond,n)>=1
Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "darrinm81" <fmarx@xxxx> wrote:
> Being new to Amibroker and programming, I have been working on some
> scans.
>
> Can someone help me put the below into Amibroker code:
>
> If a MA crossover has occured in the last n periods,
> Then buy when the ADX crosses 15.
>
> -------
>
> Criteria = Cross( MA(Close,13), MA(Close,21) );
> Buy = Cross(ADX(14),15);
>
> // If 'Criteria' met, then buy when ADX crosses 15....
>
> Filter = Buy;
>
> AddColumn( Close, "Close", 1.4 );
>
> --------
>
> Thanks
------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/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/
|