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

RE: [amibroker] Newbie Programming Assistance



PureBytes Links

Trading Reference Links

One thing is that you could try using the built in AFL indicators instead of
writing them long hand.
Second your buy condition requires the crossing of both the Stoch and the MA
on the same bar. Is this correct?
Your sell cross is in reverse, you want the 70 to cross above the
Stochastic, so write it Cross(70,RSI(14));
Hope this helps a little

Cheers,
Graham
http://groups.msn.com/ASXShareTrading
http://groups.msn.com/FMSAustralia

-----Original Message-----
From: bdsko [mailto:bdsaqa6@xxxxxxxxxxx] 
Sent: Thursday, 20 March 2003 6:58 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Newbie Programming Assistance

Greetings

I had a previous post in which I requested assistance for the AFL 
that would create the following:

Price = 20/40
Stochastics = 14/4/5
RSI = 14

The rules were to buy when the stochastics break above 50 & the price 
clearly breaks above its 20 day EMA.

The sell was generated when the RSI breaks below 70. 

The code that I am using is below:

pds = 14;
slw = 4;
slwd = 5;
// Fast Stoch
FSK = 100*(C-LLV(L,pds))/(HHV(H,pds)-LLV(L,pds)); 
// Slow Stoch %K
FLSK = MA( FSK, slw );  
// Slow Stoch %D
FLSD = MA( FLSK, slwd ); 

Buy = Cross( FLSD, 50 ) AND Cross( Close, MA( Close, 20 ) );

Sell = Cross( RSI( 14 ), 70 );

The back test results are inconsistent when I compare it aginst 
backtesting with the data feed which is FT.
Any suggestions on how I might modify the code is greatly appreciated.

Tx,

Bruce




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/ 


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make Money Online Auctions! Make $500.00 or We Will Give You Thirty Dollars for Trying!
http://us.click.yahoo.com/yMx78A/fNtFAA/46VHAA/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/