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

[EquisMetaStock Group] Re: Envelope of an Oscillator



PureBytes Links

Trading Reference Links

Normalization code adapted from formula found at
http://www.metastocktools.com :


===========================
Normalized Edson Oscillator
===========================
---8<---------------------------------------------

{ Normalizes indicator to -100% ~ +100% boundaries.
  From: http://www.metastocktools.com }

{ User inputs }
plot:=Input("plot:  [1]Indicator,  [2]Oscillator",1,2,2);
pds:=Input("Indicator periods",1,2600,21);

{ Indicator - Edson's oscillator example }
Ind:=fml("AAA");

{ Normalize indicator to historical highs/lows }
Oscillator:=(Ind-Lowest(Ind))
 /Max(Highest(Ind)-Lowest(Ind),.000001)*200-100;

{ Plot:
  Indicator on chart, oscillator in own window }
If(plot=1,Ind,Oscillator)

---8<---------------------------------------------


jose '-)
http://www.metastocktools.com




--- In equismetastock@xxxxxxxxxxxxxxx, "Edson L F" <edsonlf@xxx> 
wrote:
>
> Hi all,
> 
> It would like to know as to make an envelope for oscillators with
> positive and negative scale (i.e: +1000/0/-1000). I tried this:
> 
> **************************************************************
> 
> ft1:=Input("Vertical %), 0,2000,200);
> CMOV:=fml("AAA") {oscilador};
> x:=Mov(CMOV,100,E);
> VShUP:= x*(1+(ft1/100) );
> VShUP:= x*(1-(ft1/100) );
> UP:=if(VShUP<0,-VShUP,VShUP);
> DN:=if(VShDN>0,-VShDN,VShDN);
> UP;DN
> 
> **************************************************************
> 
> In this case, the bands of the envelope if find in "0" (zero).
> 
> How to make them bands to be parallel with "x"? 
> 
> Thanks,
> 
> Edson 







 
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/