hi, has this indicator been ported to Esignal?
would anyone be able to port this Linnsoft Investor RT for the ADXVMA indicator too Esignal EFS. Thanks in advance
inputs:
Price (NumericSeries),
Length (NumericSimple);
vars:
TR(0),
DI_Diff(0),
DI_Sum(0),
ma(0),
pdm(0),
mdm(0),
pdi(0),
mdi(0),
DI_Factor(0),
VI(0),
diff(0),
HHV(0),
LLV(0),
WeightDM(Length),
WeightDI(Length),
WeightDX(Length),
ChandeEMA(Length),
out(0),
j(0);
once ma=Price;
if(Price>Price[1]) then pdm=Price-Price[1] else mdm=Price[1]-Price;//This array is not displayed.
pdm=((WeightDM-1)*pdm[1] + pdm)/WeightDM;//ema.
mdm=((WeightDM-1)*mdm[1] + mdm)/WeightDM;//ema.
TR=pdm+mdm;
if (TR>0) then begin pdi=pdm/TR; mdi=mdm/TR; end
else begin
pdi=0;
mdi=0;
end;
pdi=((WeightDI-1)*pdi[1] + pdi)/WeightDI;//ema.
mdi=((WeightDI-1)*mdi[1] + mdi)/WeightDI;//ema.
DI_Diff=pdi-mdi;
if (DI_Diff<0) then DI_Diff= -DI_Diff;//Only positive momentum signals are used.
DI_Sum=pdi+mdi;
DI_Factor=0;//Zero case, DI_Diff will also be zero when DI_Sum i s zero.
if (DI_Sum>0) then out=DI_Diff/DI_Sum else out=0;
out=((WeightDX-1)*out[1] + out)/WeightDX;
if (out>out[1]) then begin HHV=out; LLV=out[1]; end
else begin
HHV=out[1];
LLV=out;
end;
for j = 1 to Length-1 begin
if(out[j+1]>HHV)then HHV=out[j+1];
if(out[j+1]<LLV) then LLV=out[j+1];
end;
diff = HHV - LLV;
VI=0;
if (diff>0) then VI=(out-LLV)/diff;
ma=((ChandeEMA-VI)*ma[1]+VI*Price)/ChandeEMA;//Chande VMA formula with ema built in.
ADXVMA = ma;
would anyone be able to port this Linnsoft Investor RT for the ADXVMA indicator too Esignal EFS. Thanks in advance
inputs:
Price (NumericSeries),
Length (NumericSimple);
vars:
TR(0),
DI_Diff(0),
DI_Sum(0),
ma(0),
pdm(0),
mdm(0),
pdi(0),
mdi(0),
DI_Factor(0),
VI(0),
diff(0),
HHV(0),
LLV(0),
WeightDM(Length),
WeightDI(Length),
WeightDX(Length),
ChandeEMA(Length),
out(0),
j(0);
once ma=Price;
if(Price>Price[1]) then pdm=Price-Price[1] else mdm=Price[1]-Price;//This array is not displayed.
pdm=((WeightDM-1)*pdm[1] + pdm)/WeightDM;//ema.
mdm=((WeightDM-1)*mdm[1] + mdm)/WeightDM;//ema.
TR=pdm+mdm;
if (TR>0) then begin pdi=pdm/TR; mdi=mdm/TR; end
else begin
pdi=0;
mdi=0;
end;
pdi=((WeightDI-1)*pdi[1] + pdi)/WeightDI;//ema.
mdi=((WeightDI-1)*mdi[1] + mdi)/WeightDI;//ema.
DI_Diff=pdi-mdi;
if (DI_Diff<0) then DI_Diff= -DI_Diff;//Only positive momentum signals are used.
DI_Sum=pdi+mdi;
DI_Factor=0;//Zero case, DI_Diff will also be zero when DI_Sum i s zero.
if (DI_Sum>0) then out=DI_Diff/DI_Sum else out=0;
out=((WeightDX-1)*out[1] + out)/WeightDX;
if (out>out[1]) then begin HHV=out; LLV=out[1]; end
else begin
HHV=out[1];
LLV=out;
end;
for j = 1 to Length-1 begin
if(out[j+1]>HHV)then HHV=out[j+1];
if(out[j+1]<LLV) then LLV=out[j+1];
end;
diff = HHV - LLV;
VI=0;
if (diff>0) then VI=(out-LLV)/diff;
ma=((ChandeEMA-VI)*ma[1]+VI*Price)/ChandeEMA;//Chande VMA formula with ema built in.
ADXVMA = ma;