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

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



PureBytes Links

Trading Reference Links

Hi BM,

This may not be a complete answer to your dilemma but, first of all, to
'obtain the same result' as your first example, I had to use this code:

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

instead of your second example below.

In doing that, with Amibroker 4.50.5, I was just explitly using the default
StochK and StochD values from the Help file. (to see these values, press F1
after putting the cursor within the function name in question.)

And I think the Stochastic settings in Preferences|Indicators apply only to
StochD.

-john

----- Original Message ----- 
From: "bromba" <bromba@xxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Saturday, December 13, 2003 3:52 AM
Subject: [amibroker] AB built-in stochastic vs. my own: the same code,
different picture


> 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
>
>
> 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 ---------------------~-->
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/