PureBytes Links
Trading Reference Links
|
Hello Pete,
The following part of your formula could evaluate to ZERO and there is a possibility of your formula encountering Divide_By_Zero situations. you may want to put safeguard for that.
rDen = (HHV( RSI( 13) , 8 ) - LLV(RSI( 13 ), 8 ));
StochRSI = (rNum/rDen)*100;
You can try:
rDen = (HHV( RSI( 13) , 8 ) - LLV(RSI( 13 ), 8 ));
StochRSI = (rNum/max(rDen,0.00001))*100;
However, my understanding is that Divide_By_Zero will make the formula curios till end, whereas you are suggesting that if gets normal after some bar. That is beyond my understanding.
With Regards
Sanjiv Bansal
--- In amibroker@xxxxxxxxxxxxxxx, "Pete H" <dryheat3@xxx> wrote:
>
> Drop this formula into a new pane on a daily chart of EWD.
>
> _SECTION_BEGIN("Stoch RSI");
> rNum = (( RSI( 13) - LLV( RSI( 13 ) , 8 )));
> rDen = (HHV( RSI( 13) , 8 ) - LLV(RSI( 13 ), 8 ));
> StochRSI = (rNum/rDen)*100;
> printf("DTosc: " +MA(StochRSI,13) +"\n");
>
> Plot(MA(StochRSI,13),"Stoch RSI", colorRed,styleLine);
>
> Plot(MA(C,13),"MA 13", colorGreen,styleDots);
>
> Plot(RSI(13),"RSI", colorBlue,styleDashed);
> _SECTION_END();
>
> Scroll back to 10/29/1996 and notice the plot for the Stoch RSI goes to zero and stays there for the next couple of years. There are a lot of gaps in the data, at lest from my vendor. I believe the gaps are causing the Stoch RSI to drop to zero, but why? This apparently has no affect on the MA of close nor on the regular 13 period RSI. So what's going on and how do I modify the math to give accurate results while preventing the Stoch RSI from dropping to zero due to the missing data?
> Thanks.
>
> Pete :-)
>
------------------------------------
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|