helo all can any one help me that what is stop loss line gray colour in
www.livesi
gnal.in pls post reply
Looks like super trend with some moving pivot,
super trend afl code
_SECTION_BEGIN("Super Trend");
period = Param("Period", 10, 1, 240, 1);
mult = Param("Multiplier", 3, 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, "Vol Stop",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();
_SECTION_BEGIN("Adaptive price channel");
//Adaptive price channel
//SetChartOptions(0,chartShowArrows|chartShowDates);
//_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
//Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
//Plot(C,"",colorBlack,styleCandle);
Lookback=20;
MaxLookback=Param("Max Lookback period",40,20,60,5);
MinLookback=Param("Min Lookback period",20,10,20,5);
Vol=StDev(C,30);
Change=(Vol-Ref(Vol,-1))/Ref(Vol,-1);
StartBar = BeginValue( BarIndex() ); ;
FinishBar = EndValue( BarIndex() );
i = StartBar;
for (i = StartBar+31; i<Finishbar; i++)
{
Lookback=round(Lookback[i-1]*(1+Change));
if(Lookback>MaxLookback)
{
Lookback=MaxLookback;
}
if(Lookback<MinLookback)
{
Lookback=MinLookback;
}
}
HighChannel=Ref(HHV(H,Lookback),-1);
LowChannel=Ref(LLV(L,Lookback),-1);
Plot(HighChannel,"",colorPink,styleThick | styleNoRescale);
Plot(LowChannel,"",colorSeaGreen,styleThick | styleNoRescale );
GraphXSpace=7;
_SECTION_END();