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

[amibroker] AB built-in stochastic vs. my own: the same code, different picture



PureBytes Links

Trading Reference Links

hello,

I wanted to create my own Stochastic. I set in preferences -> indicators 
-> stochastic: range=21, %Ksmooth=1, %Dsmooth=14. then I plotted it and 
treated as a "reference". the next thing was creating my own stochastic. 
I just copied the built-in code, plotted it and.. result is different. 
why? here is built-in code:

range = Prefs( 14 );
_N( ranstr = "("+WriteVal( range, 1.0 )+")" );
Plot( StochK(range), "Stochastic %K"+ranstr, -8 );
Plot( StochD(range), "Stochastic %D"+ranstr, -9 );

to obtain the same result I had to declare missing values explicitly:

range = Prefs( 14 );
_N( ranstr = "("+WriteVal( range, 1.0 )+")" );
Plot( StochK(range,1), "Stochastic %K"+ranstr, -8 );
Plot( StochD(range,1,14), "Stochastic %D"+ranstr, -9 );

could you point me to right place in AB help file that explains that 
different behaviour? I can't find it.. is it that AB treats the same 
code within "built-in" section differently then within "custom"? does it 
affect all AFL scripting that user has to provide all missing values to 
obtain the same results?

cheers,
BM

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/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/