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

[amibroker] Re: rbCCI =[0,100]



PureBytes Links

Trading Reference Links

Ron,

You're most welcome. In fact, rbCCI IS bound to within 0-100 range
by design. Have you tried to plot rbCCI using (2nd version of) the 
code below? Here I use 100 * 0.5 (1 + tanh(x) ), which swings
between 0 and 100. Before I gave a formula like 100 * tanh(x),
which swings between -100 and 100.

The rbCCI has the same 0-100 range as RSI or Stoch, so it may be 
interesting to compare/combine some of those.

Please let me know if any problem.

cheers-- alex

--- In amibroker@xxxxxxxxxxxxxxx, "mrdavis9" <mrdavis9@xxx> wrote:
>
> Dalengo,  your and Wayne's CCI modifications are both great.
> Wayne's is just what I was looking for in the feature that it 
really does 
> oscillate between zero and 100, so I can make interact it with RSI..
> 
> Your's has a fabulous feature in that the smoothest of the red 
lines 
> VISUALLY  looks to be a lot smoother than the more active of the 
red lines.
> 
> Personally, for my use, I really need the zero to 100 range that 
RSI has, so 
> if it would not be a that difficult, I would appreciate it if you 
could 
> further modify yours to have a zero to 100 range. It would then be 
a great 
> complement to Wayne's zero to 100 version, and the two of yours 
together 
> quite possibly might show breakouts fairly easily, especially, when 
combined 
> with RSI.
> 
> Later Ron D
> 
> 
> 
> 
> ----- Original Message ----- 
> From: "dalengo" <dalengo@xxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Wednesday, July 12, 2006 2:08 AM
> Subject: [amibroker] rbCCI =[0,100]
> 
> 
> > //------------8<-------------------------------------------------
> > _SECTION_BEGIN("CCI");
> >
> > periods = Param( "Periods", 14, 2, 200, 1 );
> > scaleCCI = StDev(CCI(periods) , 3 * periods);  //scale CCI swing
> > rbCCI = 0.5 * ( 1 + tanh ( CCI(periods) / scaleCCI ) );
> > rbCCI = 100 * rbCCI;  // CCI bound to [0,1]
> >
> > //Plot( CCI( periods ), _DEFAULT_NAME(), ParamColor( "Color",
> > colorCycle ), ParamStyle("Style")  );
> > Plot( rbCCI, "rbCCI", ParamColor( "Color",  colorCycle ), 
ParamStyle
> > ("Style")  );
> >
> > _SECTION_END();
> > /* Since CCI swings fast beyond an interval [-1,1], tanh of CCI
> > would always be very close to its limiting values 1 and -1. To 
get a
> > nicer graph, one may normalize the swings. Here I have used a
> > normalization to StDev over 3*periods, just for illustration.
> > The result is bound to [0,100] interval.
> > cheers-- */
> > //------------8<-------------------------------------------------
> >
> >
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "ricko8294_98" <ricko@> wrote:
> >>
> >> When I plot your code I get only 2 values - either plus 100 or
> > minus
> >> 100
> >>
> >> Rick
> >> --- In amibroker@xxxxxxxxxxxxxxx, "dalengo" <dalengo@> wrote:
> >> >
> >> > rangeboundCCI = 100 * tanh( CCI(period ))
> >> >
> >> > as I was suggesting here many moons ago.
> >> > cheers--
> >> >
> >> > --- In amibroker@xxxxxxxxxxxxxxx, "mrdavis9" <mrdavis9@> wrote:
> >> > >
> >> > > I would like to have a CCI(50) , and also a CCI(100) that
> > ranges
> >> > from Zero to 100, in lieu of the typical CCI range of negative
> > 100
> >> to
> >> > positive 100.
> >> > >
> >> > > This formula balow comes from Investor/RT Tour
> >> > >
> >> > > ====================
> >> > > TP = (HI + LO + CL) / 3
> >> > >     TP stands for Typical Price
> >> > >
> >> > > MATP = MA(TP, n)
> >> > >     n = CCI Period
> >> > >     MATP stands for Moving Average (Simple) of Typical Price
> >> > >
> >> > >     where n = CCI Period
> >> > >     MDTP stands for Mean Deviation of Typical Price
> >> > >
> >> > > CCI = (TP - MATP) / (MDTP * 0.015)
> >> > > =====================================
> >> > > I bet that Dingo knows how to  change this formula so that  
it
> >> will
> >> > oscillate between zero and 100.
> >> > >
> >> > > Later Ron D.
> >> > >
> >> >
> >>
> >
> >
> >
> >
> >
> >
> >
> > Please note that this group is for discussion between users only.
> >
> > To get support from AmiBroker please send an e-mail directly to
> > SUPPORT {at} amibroker.com
> >
> > For other support material please check also:
> > http://www.amibroker.com/support.html
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
>