Académique Documents
Professionnel Documents
Culture Documents
| styleNoLabel );
j=Haclose;
//================================================== ===========================
======================= ===================
//=========================Indicator================ ===========================
======================= ============================
f=ATR(14);
rfsctor = WMA(H-L, Per);
revers = k * rfsctor;
Trend = 1;
NW[0] = 0;
for(i = 1; i < BarCount; i++)
{
if(Trend[i-1] == 1)
{
if(j[i] < NW[i-1])
{
Trend[i] = -1;
NW[i] = j[i] + Revers[i];
}
else
{
Trend[i] = 1;
if((j[i] - Revers[i]) > NW[i-1])
{
NW[i] = j[i] - Revers[i];
}
else
{
NW[i] = NW[i-1];
}
}
}
if(Trend[i-1] == -1)
{
if(j[i] > NW[i-1])
{
Trend[i] = 1;
NW[i] = j[i] - Revers[i];
}
else
{
Trend[i] = -1;
if((j[i] + Revers[i]) < NW[i-1])
{
NW[i] = j[i] + Revers[i];
}
else
{
NW[i] = NW[i-1];
}
}
}
}
//===============system================
Plot(NW, "", IIf(Trend == 1, 27, 4), 4);
Buy=Cover=Cross(j,nw);
Sell=Short=Cross(nw,j);
SWING =WriteIf(j > nw, "UPTREND","DOWNTREND");
GfxSetTextColor( colorGreen );
GfxTextOut( "SWING = " +SWING, textoffset + 1, 256 );
GfxSelectFont("Arial", 8 );
shape = Buy * shapeCircle + Sell * shapeCircle;
//PlotShapes( shape, IIf( Buy, colorGreen, colorOrange ), 0, IIf( Buy, Low-f, Hi
gh+f));
_SECTION_END();
_SECTION_BEGIN("Intraday MA Oprekan Isfandi");
Periods = Param("Periods", 15, 2, 200, 1, 10 );
CG=MA(C,Periods);
Plot(CG, "MA",IIf(CG<=Low,ParamColor("Color_U", colorRed ),ParamColor("Color_D",
colorOrange )), styleThick=13 );
amv0=Volume*(O+C)/2;
Life_line= Sum(amv0,88)/Sum(Volume,88);
Plot( Life_line, "Life_line", ParamColor("Color", colorBlack ), ParamStyle("Styl
e") );
FL=HHV(CG,2);
support=HHV(CG,2);
FS=CG-(FL-CG);
Plot(support, "support_line", colorRed,styleThick=12);
Plot(FS, "", colorDarkGreen,styleThick=12);
_SECTION_END();