Skip to main content

Modified dahl oscillator for Amibroker (AFL)

realkaka about 16 years ago Amibroker (AFL)

  • Rating:
    4 / 5 (Votes 2)
  • Tags:
    oscillator, trading system, amibroker, optimize

Modified formula from original DAHL with 14 simple average. Used TEMA instead of simple MA, added parameters and optimization. Good also for trading system (as indicator to be used with 10 and 90 levels also).

Author: Hans

Indicator / Formula

Copy & Paste Friendly
/*Dahl Oscillator TS modificato (TEMA) */
 
P=14;Q=34;R=9;AV=6;
p = Optimize("Period",P,3,25,1); 
q = Optimize("Q ",Q,20,36,2); 
//r = Optimize("R lookback",R,5,25,1); 
Av = Optimize("S Average",AV,2,30,2); 

M=MA(C,q);
Dahl = TEMA(	( M - Ref(M,-p)- LLV (M - Ref(M,-p),r) )/(HHV(M - Ref(M,-p),r)-(LLV(M - Ref(M,-p),r))),r)*100 ;

Buy = Cover = Cross (dahl, MA(Dahl,av));
Short = Sell = Cross (MA(Dahl,av), dahl);


GraphXSpace=2;
Plot(Dahl,"Dahl",4,4); 
Plot(MA(Dahl,av),"Avg",7,4);

1 comments

Leave Comment

Please login here to leave a comment.