Req:Plz Convert This for MetaStock

#1
one of my frnd built an Oscillator for AB but he can't code for meta so if any one can help me for tht I need tht for my Meta.
.......................................

_SECTION_BEGIN("Nefu's Trend Oscolleator");

period = Param("Period", 13, 1, 240, 1);
mult = Param("Multiplier", 1.7, 1, 240, 0.1);

f=ATR(period);

VS[0] = Close[0];
trend[0] = 0;
HighC[0]=0;
Lowc[0]=0;

for( i = period+1; i < BarCount; i++ )
{

vs = vs[i-1];
trend = trend[i-1];
highC = HighC[i-1];
lowc = lowc[i-1];

if ((trend>=0) && ( C <VS ))
{
trend =-1;
HighC = C;
lowc = C;
}

if ((trend<=0) && (C >VS))
{
trend=1;
HighC = C;
lowc = C;
}

if (trend==-1)
{
if (C<lowc) lowc = C;
VS= lowc+ (mult*f);
}


if (trend==1)
{
if (C>HighC) HighC = C;
VS= HighC-(mult*f);
}

}


Buy=Cross(Trend,0);
Sell=Cross(0, Trend);

Plot(Close,"Close",colorBlue,styleCandle);
Plot(VS, "TSL",IIf(trend==1,10,11 ),styleThick);

mkol = IIf( Trend==1, 10, 11);
Plot(5, "ribbon", mkol, styleOwnScale|styleArea|styleNoLabel, 0, -5); // Weekly trend

shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, colorGreen, colorRed ), 0, IIf( Buy, Low-f, High+f));
_SECTION_END();
.....................................................
Regards
 

Shailu

Active Member
#2
i also want meta now i am using amibroker so friend kindly tell me the link for downloading meta with real time data.
 

Similar threads