I have created Dr. Elder's Impulse System indicator in Metastock 10 but when I drag it to a chart all I get is a flat line with a couple of small peaks above or below the line in random spots.
The Impulse box says Impulse (0.0000, 0.0000).
Here is a pictuure of the results:
http://skunkwerkz.dyndns.org/charts/geye.htm
Here is what I have used as a formula posted on Metastocktools.com. Any help would be appreciated.
{ Dr Elder's Impulse system interpretation v1.1
Plot signals on own window below daily chart.
http://www.elder.com/MetaStock/Impulse.htm
http://www.metastocktools.com }
{ Variables user-input }
pdsNoEntry:=Input("No entry x periods from last exit",0,21,5);
pdsW:=Input("Weekly EMA periods",1,520,13)*5;
pdsD:=Input("Daily EMA periods",1,252,13);
pdsShort:=Input("Shorter MACD periods",
1,252,12);
pdsLong:=Input("Longer MACD periods",2,2520,26);
pdsSignal:=Input("MACD trigger signal periods",
2,252,9);
tradeDelay:=0;
{ Indicators }
EmaW:=Mov(C,pdsW,E);
EmaD:=Mov(C,pdsD,E);
Mac:=Mov(C,pdsShort,E)-Mov(C,pdsLong,E);
MacTrig:=Mov(Mac,pdsSignal,E);
Hist:=Mac-MacTrig;
{ System logic }
Out:={EmaW<Ref(EmaW,-1)
AND }EmaD<Ref(EmaD,-1)
AND Hist<Ref(Hist,-1);
In1:=EmaW>Ref(EmaW,-1)
AND EmaD>Ref(EmaD,-1)
AND Hist>Ref(Hist,-1);
In:=In1 AND BarsSince(Out)>pdsNoEntry;
{ System signals }
Init:=Cum(In+Out>-1)=1;
InInit:=Cum(In)=1;
flag:=Ref(BarsSince(Init OR In)
<BarsSince(Init OR Out)+InInit,-tradeDelay);
signals:=(InInit AND Alert(InInit=0,2)
OR flag AND Alert(flag=0,2))
-(flag=0 AND Alert(flag,2));
{ Plot }
0;signals