PureBytes Links
Trading Reference Links
|
Yes, every indicator plot can be normalized, regardless of infinity
issues.
===============
Normalized plot
===============
---8<-------------------------------------------
{ http://www.metastocktools.com }
{ User input }
plot:=Input("plot: [1]Original, [2]Normalized",1,2,2);
{ Original code }
lookback:=100;
EMA:=Mov(C,50,E);
DaysAbove:=Sum(C>EMA,lookback);
DaysBelow:=Sum(C<EMA,lookback);
Ratio:=DaysAbove/Max(DaysBelow,.00001);
{ Normalization to historical High/Low, 0~100% }
norm:=(Ratio-Lowest(Ratio))
/Max(Highest(Ratio)-Lowest(Ratio),.000001)*100;
{ Plot in own window }
If(plot=1,Ratio,norm)
---8<------------------------------------------
jose '-)
http://www.metastocktools.com
--- In equismetastock@xxxxxxxxxxxxxxx, Paolo <italoarg76@xxx> wrote:
>
> JS> ANY indicator can be turned into an oscillator through a
> JS> stochastic-like process of normalization.
>
> Jose,
> What's happen if the indicator is a *ratio* so it can go to
> infinity (something / 0) ?
> Is it possible to make the process of normalization as you said ?
> Best regards,
> Pablo
>
> This indicator CAN NOT be normalized:
>
> { Start }
> lookback:=100;
> EMA:=Mov(C,50,E);
> DaysAbove:=Sum(C>EMA,lookback);
> DaysBelow:=Sum(C<EMA,lookback);
> Ratio:=DaysAbove/DaysBelow;
> Ratio;
> { End }
------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/ulNZQC/lOaOAA/cosFAA/BefplB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/equismetastock/
<*> To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|