Metastock Formula

rkkarnani

Well-Known Member
Dear Mr.Karnani,

How to use VWAP in ID is explained nicely by smarttrade in his thread "Thoughts on Day-swing trading". Kindly go thorugh if interested.

If possible pl give the formula/logic for operating VWAP on EOD basis.

Thanks!
Thanks for the info!! Will look for the formula on EOD VWAP and post the same in a day or two!!
 

mangup

Well-Known Member
Metastock Formula Expert Pl help . . . .. . !

Pl help me by making a metastock indicator formula for below conditions:-

Name of the formula VWAP
1. TF - 1 min
2. I have open, high, low, close & volume values of every 1 min candle.
3. Calculated Typical Price = (H+L+C)/3
4. Multiply Typical price x Volume
5. Calculate Cumm of (Typical price x Volume)
6. Calculate Cumm Volume
7. VWAP = Cumm of (Typical price x Volume)/Cumm Volume

I want to start the calculation a fresh with the start of the day's first candle.
VWAP line must move on the chart along with the formation of candles.

Also i want to make indicator for :-
Diff between close & VWAP in histogram format.

Kindly help me.
 
hi friends

I have one formula for amibroker any one have same formula for metastock.


and formula is


_SECTION_BEGIN("Ensign Volatility Stop");

// Ensign Volatility Stop
// get the multiple of 9 period EMA of ATR_Ensign
k=Param("multiplication factor", 1,0.5,5,0.1);

period=k*9;
VS_raw = 2.3 * EMA(ATR(1), period);

// for longs, VS line is below price
loline = VS_below_price = HHV(Close, period) - VS_raw;

// for shorts, VS line is above price
hiline = VS_above_price = LLV(Close, period) + VS_raw;
between = IIf (C < hiline AND C > loline, 1, 0);
up = IIf(C > hiline OR (H > Ref(H, -1) AND H > hiline), 1, 0);
dn = IIf(C < loline OR (L < Ref(L, -1) AND L < loline), 1, 0);
upcond = IIf(between AND BarsSince(up) < BarsSince(dn) , 1, 0);
dncond = IIf(between AND BarsSince(dn) < BarsSince(up) , 1, 0);
upline = IIf(up OR upcond, loline, Null);
dnline = IIf(dn OR dncond, hiline, Null);

Buy=upline;
Sell=dnline;

Col = IIf(Buy,colorGreen,IIf(Sell,colorRed,colorBlack));

Plot(C, "", col, styleBar);

Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);

shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, colorBrightGreen, colorRed ),0, IIf( Buy, Low, High ) );
 

rkkarnani

Well-Known Member
hi friends

I have one formula for amibroker any one have same formula for metastock.


and formula is


_SECTION_BEGIN("Ensign Volatility Stop");

// Ensign Volatility Stop
// get the multiple of 9 period EMA of ATR_Ensign
k=Param("multiplication factor", 1,0.5,5,0.1);

period=k*9;
VS_raw = 2.3 * EMA(ATR(1), period);

// for longs, VS line is below price
loline = VS_below_price = HHV(Close, period) - VS_raw;

// for shorts, VS line is above price
hiline = VS_above_price = LLV(Close, period) + VS_raw;
between = IIf (C < hiline AND C > loline, 1, 0);
up = IIf(C > hiline OR (H > Ref(H, -1) AND H > hiline), 1, 0);
dn = IIf(C < loline OR (L < Ref(L, -1) AND L < loline), 1, 0);
upcond = IIf(between AND BarsSince(up) < BarsSince(dn) , 1, 0);
dncond = IIf(between AND BarsSince(dn) < BarsSince(up) , 1, 0);
upline = IIf(up OR upcond, loline, Null);
dnline = IIf(dn OR dncond, hiline, Null);

Buy=upline;
Sell=dnline;

Col = IIf(Buy,colorGreen,IIf(Sell,colorRed,colorBlack));

Plot(C, "", col, styleBar);

Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);

shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, colorBrightGreen, colorRed ),0, IIf( Buy, Low, High ) );
Maybe something similar.. you can adjust the Parameters as desired... (Have no idea about Amibroker, hence just posting a Voaltality based Stop)

Volatility-Based Trailing Stops - Stop loss from Chande & Kroll's The New Technical Trader p.167. There are three input variables to play with.

{Volatility Stop (Long)}
Pds1:= Input("ATR Lookback?",2,100,10);
Mult:= Input("ATR Multiplier?",1,20,3);
Pds2:= Input("HHV Lookback?",2,100,20);
PrelimStop:= HHV(H,Pds1) - ATR(Pds1)*Mult;
ActualStop:= HHV(PrelimStop,Pds2);
ActualStop

{Volatility Stop (Short)}
Pds1:= Input("ATR Lookback?",2,100,10);
Mult:= Input("ATR Multiplier?",1,20,3);
Pds2:= Input("LLV Lookback?",2,100,20);
PrelimStop:= LLV(L,Pds1) + ATR(Pds1)*Mult;
ActualStop:= LLV(PrelimStop,Pds2);
ActualStop
 
Re: Metastock Formula-- Woodies CCI Indicator Wanted

Dear All,

Can anyone help me with the Woodies CCI Indicator panel as well as exploration for Metastock please??

Thanks a ton in advance,

Regards,
Can somebody help me with this????? Would really be very grateful!!!!!!!!!!

Thanks a ton in advance,

Cheers
 

rkkarnani

Well-Known Member
Can anyone give the Metastock formula for the following indicators which are in Amibroker

1.TRD
2.MACDO-MACD Oscillator

Thanks
The MetaStock formulae for the MACD Histogram Momentum Oscillator is:

((Mov(CLOSE,12,E)-Mov(CLOSE,26,E)) -Mov(Mov(CLOSE,12,E)
-Mov(CLOSE,26,E),9,E))/Mov(CLOSE,26,E)

Most charting programs will allow users to overlay indicators with support/resistance lines. These lines can be positioned over the MACD histogram momentum oscillator to create overbought and oversold zones. There are no set rules or values for creating these zones and they can be adjusted to suit the behavior of each individual share as shown in the following chart. (Could not attach chart as my attachment quota of 100 KB is full)Note that the scale of the MACD oscillator is of no importance and its magnitude will vary dramatically from share to share.
 

Similar threads