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

[amibroker] AFL Formula



PureBytes Links

Trading Reference Links

Group,

The following is an attempt at creating a validated
trade signal based on ADX and DMI. The BUY validation
being a close greater than the high of the signal bar
and the SELL validation being a close lower than the
low of the signal bar.

Variables
---------

AAA=ADX(PERIOD=14);
BBB=PDI(PERIOD=14);
CCC=MDI(PERIOD=14);

Signals
-------

ddd=(ccc>bbb AND Cross(Aaa,Ccc)) OR (Cross(bbb,Ccc));

eee=bbb>Ccc AND Cross(Aaa,bbb) OR (Cross(ccc,bbb));


Signal validation
-----------------

Buy=  C>ValueWhen(ddd=1,H,1);
Sell= C<ValueWhen(eee=1,L,1);

Now the reason for raising the matter here. Visual
inspection of the charts using a formula which does
not contain the signal validation component in the
formula shows confirmed/validated signals both on the
Buy side and the Sell side in my data set. However the
same are not there if the Signal validation component
is inserted into the formula and the scan is run. It
is obvious I am doing something wrong. I will
appreciate an indication from the more experienced
users as to where I am making a mistake. 


Thanks in advance,



Rakesh


__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

------------------------ Yahoo! Groups Sponsor ---------------------~-->
FREE Cell Phones with up to $400 Cash Back!
http://us.click.yahoo.com/_bBUKB/vYxFAA/i5gGAA/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/