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

Re[2]: Code Help for new OddBall indicator



PureBytes Links

Trading Reference Links

Hello Frank,

the ROC is not smoothed in the orignal OddBall.  It is simply the
percent change from one close (of Advancing Issues) to another 7 bars
later.

go to Functions and open the RateofChange function to review the
calculations.  here it is:

{*******************************************************************
Description: Rate of Change
Provided By: Omega Research, Inc. (c) Copyright 1999
********************************************************************}

Inputs: Price(NumericSeries), Length(NumericSimple);

If Price[Length] <> 0 Then 
        RateOfChange = (Price / Price[Length] - 1) * 100
Else
        RateOfChange = 0 ;


Best regards,
 Jim Johnson                           mailto:jejohn@xxxxxxxxxxx

-- 
Wednesday, June 5, 2002, 1:58:01 PM, you wrote:

FR> Alex:

FR> Thanks for your comments.

FR> But as I understand, the original OddBall code "smoothes" the ROC by taking the average of the last 7 bars ? (RL=7)

FR> If so, there should be more gradual increases or decreases in the value when right clicking over each bar.

FR> Seems my coding attempt does not produce this feat.


FR> Frank








FR> On Wed, 5 Jun 2002 10:09:47 -0700 (PDT)
FR>  alex@xxxxxxxxxxxxxx (Alex Matulich) wrote:
>> Frank wrote:
>> 
>> >I'm having a bit of trouble trying to create just a simple
>> >indicator so that I can left click on any bar and it will show me
>> >in that little TS2000i square window the "percentage" of Advancing
>> >issues such as >3% or better which should show a signal shuld have
>> [snip]
>> >Somehow I it appears I need to get the "percentage math" into it:
>> 
>> Hint: look at the source code for RateOfChange.  It's already a
>> percentage, scaled so that 1 whole unit is 1%.
>> 
>> >Inputs: RL(7), BZ(3), SZ(1);
>> >
>> >Plot1(RateOfChange(Close Data2, RL));
>> >Plot2(0,"Zero");
>> 
>> The RateOfChange output on advancing issues will be strange values
>> like -56 or +98.  If the previous value of Advancing Issues was low
>> (say 2), and the next value is higher (say 40), the ROC will be
>> huge.
>> 
>> If you want percentage that are advancing issues, you can get that
>> only by dividing advancing issues by total issues.
>> 
>> -- 
>>   ,|___    Alex Matulich -- alex@xxxxxxxxxxxxxx
>>  // +__>   Director of Research and Development
>>  //  \ 
>>  // __)    Unicorn Research Corporation -- http://unicorn.us.com
>> 
>>