PureBytes Links
Trading Reference Links
|
hello john,
> 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 );
that's strange. maybe because my native language is not english and that
causes some misunderstanding. John, I mean that if I:
a) change under preferences values for built-in Stochastic Slow, for
example, range=21, %Ksmooth=1, %Dsmooth=14 and apply them;
b) create myStochastic custom indicator, with the same, copied code form
built-in Stochastic Slow (except the line with "indicator End");
c) plot built-in Stochastic Slow;
d) plot myStochastic;
and compare plots, there are differences.
it seems to me that (the same AFL) code used in built-in Stochastic Slow
indicator utilizes the %K,%D settings under Preferences, whereas the
same AFL code copied as custom indicator has to be supplied explicitly
with these values. otherwise AB uses default values (as you mentioned):
"3" for both %K and %D.
> 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.)
i have 4.40T and the same info in help file.
> And I think the Stochastic settings in Preferences|Indicators apply only to
> StochD.
for me the commmon value "%K smooth" applies for StochK and StochD. both
%K, %D lines change as you change "%K smooth" value under preferences.
I recall now that some time ago I had similar problem with built-in
price indicator. unfortunately, I can't find this message now but I
belive this behaviour is the same by nature. AFL Stoch code with "custom
flag light" uses default values for StochK and StochD instead of
preferenced when used as built-in code. the latter one becomes more
united with AB internal structure, if I can say that way..
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/
|