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

[amibroker] Re: Newbie Programming Assistance



PureBytes Links

Trading Reference Links

Thanks for the clarification and advice Graham. I'll check it out.

Regards,

Bruce

--- In amibroker@xxxxxxxxxxxxxxx, "Graham" <gkavanagh@xxxx> wrote:
> 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@x...] 
> 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@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> 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 ---------------------~-->
Your own Online Store Selling our Overstock.
http://us.click.yahoo.com/rZll0B/4ftFAA/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/