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

Re: [EquisMetaStock Group] Expert and Explorer from Hull Moving Average



PureBytes Links

Trading Reference Links

For Hull MA crossover signals, use the formula below in your Expert 
or Exploration:

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

pds:=21; { Hull MA periods }
prc:=C;  { Price }

sqrtpds:=LastValue(Sqrt(pds));
HullMA:=Mov(2*Mov(C,pds/2,W)-Mov(C,pds,W),sqrtpds,W);

bullish:=Cross(prc,HullMA);
bearish:=Cross(HullMA,prc);

bullish-bearish

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


That's about all I can help with free coding/advice on this subject.
Please contact me privately for the complete Hull MA install package 
(for MS v8.0 or above), which includes the Hull Indicator/Expert/
Exploration/Template - at a cost of an hour's work (US$60).


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



--- In equismetastock@xxxxxxxxxxxxxxx, 
"stocks_bobby" <stocks_bobby@xxx> wrote:
>
> Dear Jose,
> Thanks for your reply and advice.
> what i need is a expert which goes bullish when Hull Ma crosses
> Price line in upward direction and bearish when hull ma crosses
> price lien in downward direction.
> 
>
>
> --- In equismetastock@xxxxxxxxxxxxxxx, "Jose Silva" <josesilva22@>
> wrote:
>
> Preston, the "sqrtperiod" variable in the original formula defaults 
> to a 4.47 value, and is a square root function of the input
> periods.  Perhaps it should not be adjustable.
> 
> sqrtperiod:=Sqrt(period);
> 
> 
> Here is an example for signals based on the Hull MA:
> 
> =========
> MA - Hull
> =========
> ---8<------------------------------------
> 
> { Hull Moving Average & crossover signals.
> 
> ©Copyright 2006 Jose Silva.
>  The grant of this license is for personal use
>   only - no resale or repackaging allowed.
>  Trade signals at your own risk.
>  http://www.metastocktools.com }
> 
> { Indicator inputs }
> plot:=Input("plot:   [1]Hull MA,   [2]Crossover Signals",1,2,2);
> pds:=Input("Hull MA periods",1,252,21);
> delay:=Input("Entry and Exit delay",0,5,0);
> 
> { Hull MA }
> sqrtpds:=LastValue(Sqrt(pds));
> hma:=Mov(2*Mov(C,pds/2,W)-Mov(C,pds,W),sqrtpds,W);
> 
> { Crossover signals }
> entry:=Cross(C,hma) AND hma>Ref(hma,-1) AND C>hma*1.01;
> exit:=Cross(hma,C) AND hma<Ref(hma,-1);
> 
> { Clean signals }
> init:=Cum(IsDefined(entry+exit))=1;
> bin:=ValueWhen(1,entry-exit<>0 OR init,entry);
> long:=bin*(Alert(bin=0,2) OR entry*Cum(entry)=1);
> short:=(bin=0)*(Alert(bin,2) OR exit*Cum(exit)=1);
> signals:=Ref(long-short,-delay);
> 
> { Plot HMA on price chart, signals in own window }
> If(plot=1,hma,signals)
> 
> ---8<------------------------------------
> 
> 
> jose '-)
> http://www.metastocktools.com







 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/equismetastock/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:equismetastock-digest@xxxxxxxxxxxxxxx 
    mailto:equismetastock-fullfeatured@xxxxxxxxxxxxxxx

<*> 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/