0% found this document useful (0 votes)
363 views4 pages

Metastock Formula Old PC

This document contains technical indicators and formulas for calculating indicators such as: 1) MACD histogram, Bollinger band squeezes, II% and AD% indicators, modified ATR with trailing stops, and a price zone oscillator. 2) Formulas for calculating volume weighted MACD, volatility profit indicator, and volatility trailing stop loss. 3) A 52-week high/low indicator that plots the highest and lowest price over the past 52 weeks.

Uploaded by

lenovoji
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
363 views4 pages

Metastock Formula Old PC

This document contains technical indicators and formulas for calculating indicators such as: 1) MACD histogram, Bollinger band squeezes, II% and AD% indicators, modified ATR with trailing stops, and a price zone oscillator. 2) Formulas for calculating volume weighted MACD, volatility profit indicator, and volatility trailing stop loss. 3) A 52-week high/low indicator that plots the highest and lowest price over the past 52 weeks.

Uploaded by

lenovoji
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

MACD HISTOGRAM COLOR

x:=MACD() - Mov(MACD(),9,E);
If(x>=Ref(x,-1),x,0);
If(x<Ref(x,-1),x,0)

21 Day II%
Periods:=Input("Periods",5,125,21);{II% periods}
highlow:=If(HIGH>LOW,HIGH-LOW,-1);{flag zero ranges as -1}
II:=If(highlow=-1,0,(2*CLOSE-HIGH-LOW)/highlow*VOLUME);
Sum(II,Periods)/Sum(VOLUME,Periods)*100;{II%}
25;{Reference lines}
0;
-25;

21-Day AD%
Periods:=Input("Periods",5,125,21);{ad% periods}
highlow:=If(HIGH>LOW,HIGH-LOW,-1);{flag zero ranges as -1}
AccDist:=If(highlow=-1,0,(CLOSE-OPEN)/highlow*VOLUME);
Sum(AccDist,Periods)/Sum(VOLUME,Periods)*100;{ad%}
25;{Reference lines}
0;
-25;

Bolinger Squeez LONG


If(LLVBars(Stdev(C,20),125)<7,1,0)AND
Cross(CLOSE,BBandTop(CLOSE,20,SIMPLE,2));

Bolinger Squeez SHORT


If(LLVBars(Stdev(C,20),125)<7,1,0)AND
Cross(BBandBot(CLOSE,20,SIMPLE,2),CLOSE);
Bolinger SVE_BB%B
period:=Input("%b period:",1,100,18);
TeAv:=Input("Tema average:",1,30,8);
afwh:=Input("Standard deviation high ",.1,5,1.6);
afwl:= Input("Standard deviation Low ",.1,5,1.6);
afwper:= Input("Standard deviation period ",1,200,63);
haOpen:=(Ref((O+H+L+C)/4,-1) + PREV)/2;
haC:=((O+H+L+C)/4+haOpen+Max(H,haOpen)+Min(L,haOpen))/4;
TMA1:= Tema(haC,TeAv);

TMA2:= Tema(TMA1,TeAv);
Diff:= TMA1 - TMA2;
ZlHA:= TMA1 + Diff;
percb:=(Tema(ZLHA,TeAv)+2*Stdev(Tema(ZLHA,TeAv),period)-Mov(Tema(ZLHA,TeAv),peri
od,WEIGHTED))/(4*Stdev(Tema(
ZLHA,TeAv),period))*100;
percb;
50+afwh*Stdev(percb,afwper);
50-afwl*Stdev(percb,afwper);
50

Force Index 13 EMA Smooth


FI:=(C-Ref(C,-1))*V;Mov(FI,13,E)
Force Index 2EMA Smooth
FI:=(C-Ref(C,-1))*V;Mov(FI,2,E)
Force Index Normal
V*(C-Ref(C,-1))

MODIFIED ATR WITH TRAILING STOPS


period:=Input("14:",1,100,5);
atrfact:=Input("1:",1,10,3.5);
HiLo:=If(H-L<1.5*Mov(H-L,period,S),H-L,1.5*Mov(H-L,period,S));
Href:=If(L<=Ref(H,-1),H-Ref(C,-1),(H-Ref(C,-1))-(L-Ref(H,-1))/2);
Lref:=If(H>=Ref(L,-1),Ref(C,-1)-L,(Ref(C,-1)-L)-(Ref(L,-1)-H)/2);
diff1:=Max(HiLo,Href);
diff2:=Max(diff1, Lref);
atrmod:=Wilders(diff2,period);
loss:=atrfact*atrmod;
trail:=
If(C>PREV AND Ref(C,-1)>PREV,
Max(PREV, C-loss),
If(C<PREV AND Ref(C,-1)<PREV,
Min(PREV,C+loss),
If(C>PREV,C-loss,C+loss)));
Trail

Price Zone Oscillator


Period:=Input("Y" ,2 ,200 ,14 );
R :=If(C>Ref(C,-1),C,-C);
CP :=Mov(R,period ,E);
TC :=Mov(C,period ,E);
PZO :=100*(CP/TC);

PZO
VPCI
x:=Input("long term periods",30,200,50);
y:=Input("short term periods",5,30,10);
(Mov(C,x,VOL)-Mov(C,x,S))*
(Mov(C,y,VOL)/Mov(C,y,S))*
(Mov(V,y,S)/Mov(V,x,S))
Volume Zone Oscilator
Period := Input("Y",2 ,200 ,14 );
R :=If(C>Ref(C,-1),V,-V);
VP :=Mov(R,Period ,E);
TV :=Mov(V,Period ,E);
VZO :=100*(VP/TV);
VZO
VOLUME WEIGHTED MACD
ShortPeriod:=Input("ShortPeriod",5,125,12);{Short average periods}
LongPeriod:=Input("LongPeriod",5,125,26);{Long average periods}
SignalPeriod:=Input("SignalPeriod",5,125,9);{Signal periods}
Short:=Sum(CLOSE*VOLUME,ShortPeriod)/Sum(VOLUME,ShortPeriod);
Long:=Sum(CLOSE*VOLUME,LongPeriod)/Sum(VOLUME,LongPeriod);
Signal:=Mov(Short-Long,SignalPeriod,E);
Short-Long;
Signal;
VOLATILITY PROFIT INDICATOR CUSTOM
Mov(H,13,E)+(2*ATR(10))

VOLATILITY TRAILING STOP LOSS CUSTOM


HHV(C-(2*ATR(10)),15)

52
yr:=Input("Lookback Nr of years",1,100,1);
plot:=Input("Year's Hi/Lo: [1]Values, [2]Signals, [3]Start",1,3,1);
{ Last available day/month/year }
ToDay:=LastValue(DayOfMonth());
ToMnth:=LastValue(Month());
lastYear:=LastValue(Year())-yr;
{ 52-week period }
52week:=Year()>lastYear

OR (Year()=lastYear AND (Month()>ToMnth


OR Month()=ToMnth AND DayOfMonth()>=ToDay));
{ 52-week signal }
start:=52week AND Alert(52week=0,2);
{ 52-week Hi/Lo }
init:=Cum(1)=1;
hi:=If(52week,HighestSince(1,start OR init,H),
C);
lo:=If(52week,LowestSince(1,start OR init,L),C);
{ 52-week Hi/Lo signals }
hiSignals:=H>Ref(hi,-1) AND 52week AND start=0;
loSignals:=L<Ref(lo,-1) AND 52week AND start=0;
{ Plot in own window }
If(plot=1,hi,If(plot=2,hiSignals,0));
If(plot=1,lo,If(plot=2,-loSignals,start))

You might also like