_SECTION_BEGIN("HI LO");
//Price
SetChartBkGradientFill( ParamColor("BgTop",colorBlack),ParamColor("BgBottom",colorBlack),ParamColor("Titleblock",colorBlack));
colorHighliter = IIf(C >= O,ParamColor("CandleUpColor", ColorRGB(0, 128, 0)),ParamColor("CandleDnColor", ColorRGB(128, 0, 0)));
SetBarFillColor(colorHighliter);
//Plot(C, "Close", IIf(colorHighliter == ColorRGB(128, 0, 128), ColorRGB(255, 0, 255), IIf(colorHighliter == ColorRGB(128, 128, 0), ColorRGB(255, 255, 0), IIf(C > O, ColorRGB(0, 255, 0), IIf(C < O, ColorRGB(255, 0, 0), ColorRGB(255, 255, 255))))), styleCandle, Null, Null, 0, 1);
Plot(C, "Close", IIf(colorHighliter == ColorRGB(128, 0, 128), ColorRGB(255, 0, 255), IIf(colorHighliter == ColorRGB(128, 128, 0), ColorRGB(255, 255, 0), IIf(C > O, ColorRGB(0, 255, 0), IIf(C < O, colorPink, ColorRGB(255, 255, 255))))), styleCandle, Null, Null, 0, -1);
//Plot(C, "Close", IIf(C >= O, ColorRGB(0, 0, 0), ColorRGB(255, 255,255)), styleCandle, Null, Null, 0, -1);
PDHClr = ParamColor( "PrvDayHighColor", colorRed);
TDHClr = ParamColor( "2DayHighColor", colorDarkRed);
PDLClr = ParamColor( "PrvDayLowColor", colorYellow);
TDLClr = ParamColor( "2DayLowColor", colorDarkYellow);
PDCClr = ParamColor( "PrvDayCloseColor", colorGrey50);
TDClrs = ParamColor("TodayColors",colorOrange );
Legend = ParamToggle("Show legends","Show|Hide",1);
if (Legend == 0)
Legends = "\nLegends\n"
+ EncodeColor(PDHClr) + "PreviousDayHigh ----------------\n"
+ EncodeColor(TDHClr) + "TwoDayDayHigh ----------------\n"
+ EncodeColor(PDLClr) + "PreviousDayLow ----------------\n"
+ EncodeColor(TDLClr) + "TwoDayLow ----------------\n"
+ EncodeColor(PDCClr) + "PreviousDayClose----------------\n"
+ EncodeColor(TDClrs) + "TodayColors ----------------" ;
else
Legends = "";
Title = EncodeColor( colorWhite) + "2TF Candles+Levels " + Date() + ", LH = " + NumToStr(Ref(H,-1), 1.2) + ", LL = " + NumToStr(Ref(L,-1), 1.2) + "\n" + EncodeColor( TDClrs ) + "- O = "
+ NumToStr(O, 1.2) +", H = " + NumToStr(H, 1.2) + ", L = " + NumToStr(L, 1.2) + ", C = " +
NumToStr(C, 1.2) + Legends;
_SECTION_BEGIN("HTF Price");
Cl = TimeFrameGetPrice("C",inHourly);
Op = TimeFrameGetPrice("O",inHourly);
Hi = TimeFrameGetPrice("H",inHourly);
Lo = TimeFrameGetPrice("L",inHourly);
BarLayer = Param("BarLayer", -2, -5, 5, 1) ;
HourlybarClr = ParamColor( "HourlyBaarColor", ColorRGB(120,120,0));
HourlyUpClr = ParamColor( "HourlyUpColor", ColorRGB(40,40,120));
HourlyDnClr = ParamColor( "HourlyDnColor", ColorRGB(80,20,20));
Plot(Lo,"Lo",HourlybarClr,styleStaircase|styleNoLabel);
Plot(Hi,"Hi",HourlybarClr,styleStaircase|styleNoLabel);
PlotOHLC(Lo,Hi,Lo,Hi,"Hourly",IIf(Cl>Op,HourlyUpClr,HourlyDnClr),styleCloud|styleNoLabel,0,0,0,BarLayer);
PHi = TimeFrameGetPrice("H",inHourly,-1);
PLo = TimeFrameGetPrice("L",inHourly,-1);
UP = Cross(H,PHi+5); DN = Cross(PLo-5,L);
//if (SelectedValue(UP)) Say( "JOSH Please WAKE-UP . . . , We need to look for Long trades now . . ." );
//if (SelectedValue(DN)) Say( "JOSH Please WAKE-UP . . . , We need to look for Short trades now . . ." );
//AlertIf (UP, "SOUND D:\\WINDOWS\\MEDIA\\TADA.WAVE", "AUDIO ALERT", 2 );
//AlertIf (DN, "SOUND D:\\WINDOWS\\MEDIA\\TADA.WAVE", "AUDIO ALERT", 2 );
//if (SelectedValue(DN)) Say( "JOSH Please WAKE-UP . . . , We need to look for Short trades now . . ." );
_SECTION_END();
_SECTION_BEGIN("Magnified Market Price");
//by Vidyasagar, [email protected]//
FS=Param("Font Size",15,15,100,1);
GfxSelectFont("Arial", FS, 900, italic = False, underline = False, True );
GfxSetBkMode( colorWhite );
GfxSetTextColor( ParamColor("Color",colorYellow) );
//Hor=Param("Horizontal Position",800,800,800,800);
Hor=Param("Horizontal Position",1150,1,1500,20);
Ver=Param("Vertical Position",380,20,500,50);
GfxTextOut(""+C,Hor , Ver );
GfxTextOut(Date(),Hor-100 , 1 );
/*
YC=TimeFrameGetPrice("C",inDaily,-1);
DD=Prec(C-YC,2);
xx=Prec((DD/YC)*100,2);
GfxSelectFont("Arial", 12, 700, italic = False, underline = False, True );
GfxSetBkMode( colorWhite );
GfxSetTextColor(ParamColor("Color",colorYellow) );
GfxTextOut(""+DD+" ("+xx+"%)", Hor+5, Ver+15 );
*/
_SECTION_END();
/*
_SECTION_BEGIN("PreviousDay HI-LO");
DayH = TimeFrameGetPrice("H", inDaily, -1); DayHI = LastValue (DayH,1);// yesterdays high
DayL = TimeFrameGetPrice("L", inDaily, -1); DayLI = LastValue (DayL,1); // yesterdays low
DayC = TimeFrameGetPrice("C", inDaily, -1); DayCI = LastValue (DayC,1); // yesterdays close
DayO = TimeFrameGetPrice("O", inDaily); DayOI = LastValue (DayO,1); // current day open
DH = TimeFrameGetPrice("H", inDaily); DHI = LastValue (DH,1);// Todays high
DL = TimeFrameGetPrice("L", inDaily); DLI = LastValue (DL,1); // Todays low
DBYH = TimeFrameGetPrice("H", inDaily, -2); DBYHI = LastValue (DBYH,1);// yesterdays high
DBYL = TimeFrameGetPrice("L", inDaily, -2); DBYLI = LastValue (DBYL,1); // yesterdays low
numbars = LastValue(Cum(Status("barvisible")))-1;
Hts = -33.5;
//Today = Ref(LastValue(DaysSince1900()),-1);
Today = LastValue(DaysSince1900());
YHL = ParamToggle("Yesterday HI LO","Show|Hide",1);
YdClrs = ParamColor("YesterdayColors", colorTurquoise);
if(YHL==1) {
// Plot(DayL,"YL",PDLClr,styleDots|styleNoLine|styleNoRescale|styleNoTitle|styleNoLabel,0,0,2);
Plot(DayH,"YH",PDHClr,styleDots|styleNoLine|styleNoRescale|styleNoTitle|styleNoLabel,0,0,2);
Plot(DayC,"PDC",PDCClr,styleDots|styleNoLine|styleNoRescale|styleNoTitle|styleNoLabel,0,0,2);
Plot(DBYH,"DBYH",TDHClr,styleDots|styleNoLine|styleNoRescale|styleNoTitle|styleNoLabel);
Plot(DBYL,"DBYL",TDLClr,styleDots|styleNoLine|styleNoRescale|styleNoTitle|styleNoLabel);
Plot(IIf(Today ==DaysSince1900(),DL,Null),"DL",TDClrs,styleLine|styleThick|styleNoRescale|styleNoTitle|styleNoLabel);
Plot(IIf(Today==DaysSince1900(),DH,Null),"DH",TDClrs,styleLine|styleThick|styleNoRescale|styleNoTitle|styleNoLabel);
Plot(IIf(Today==DaysSince1900(),DayO,Null),"DO",TDClrs,styleLine|styleThick|styleNoRescale|styleNoTitle|styleNoLabel);
Dist = 2;
PlotText("__YH " + DayH, LastValue(BarIndex())-(numbars/Hts), DayHI, PDHClr);
// PlotText("__YL" + DayL, LastValue(BarIndex())-(numbars/Hts), DayLI, PDLClr);
PlotText("__YC " , LastValue(BarIndex())-(numbars/Hts), DayCI, PDCClr);
PlotText("__DO " , LastValue(BarIndex())-(numbars/Hts)+Dist, DayOI, TDClrs);
PlotText("__DH " , LastValue(BarIndex())-(numbars/Hts)+Dist, DHI, TDClrs);
PlotText("__DL " , LastValue(BarIndex())-(numbars/Hts)+Dist, DLI, TDClrs);
PlotText("__BYH " , LastValue(BarIndex())-(numbars/Hts)+Dist, DBYHI, TDHClr);
PlotText("__BYL " , LastValue(BarIndex())-(numbars/Hts)+Dist, DBYLI, TDLClr);
}
Rn = Param("RN",50,50,1000,50,0);
Miny = Status("axisminy");
yl = int(Miny/Rn)*Rn;
Maxy = Status("axismaxy");
yh = int(Maxy/Rn)*Rn;
i=yl;
while( i>= yl AND i<=yh )
{
//PlotShapes(shapeSmallCircle,colorGold,0, i,0);
//PlotText( "__________", LastValue(BarIndex())-(numbars/Hts)-6, i, colorGold );
Plot(IIf(Today == DaysSince1900(),i,Null), "S3",colorGold,styleLine|styleNoRescale|styleNoTitle|styleNoLabel,0,0,2);
i=i+Rn;
}
_SECTION_END();
_SECTION_BEGIN("PIVOTS");
// Pivot Levels //
PP = (DayL + DayH + DayC)/3; PPI = LastValue (PP,1); // Pivot
R1 = (PP * 2) - DayL; R1I = LastValue (R1,1); // Resistance 1
S1 = (PP * 2) - DayH; S1I = LastValue (S1,1); // Support 1
R2 = PP + R1 - S1; R2I = LastValue (R2,1); // Resistance 2
S2 = PP - R1 + S1; S2I = LastValue (S2,1); // Support 2
R3 = PP + R2 - S1; R3I = LastValue (R3,1); // Resistance 3
S3 = PP - R2 + S1; S3I = LastValue (S3,1); // Support 3
Today = LastValue(DaysSince1900());
ClrPivots = ParamColor("PivotColors",colorPaleGreen);
ppl = ParamToggle("Pivot Levels","Show|Hide",1);
if(ppl==1) {
Plot(IIf(Today == DaysSince1900(),PP,Null), "PP",colorGold,styleLine|styleNoRescale|styleNoTitle)|styleNoLabel;
Plot(IIf(Today == DaysSince1900(),R1,Null), "R1",ClrPivots,styleLine|styleNoRescale|styleNoTitle|styleNoLabel);
Plot(IIf(Today == DaysSince1900(),S1,Null), "S1",ClrPivots,styleLine|styleNoRescale|styleNoTitle|styleNoLabel);
Plot(IIf(Today == DaysSince1900(),R2,Null), "R2",ClrPivots,styleLine|styleNoRescale|styleNoTitle|styleNoLabel);
Plot(IIf(Today == DaysSince1900(),S2,Null), "S2",ClrPivots,styleLine|styleNoRescale|styleNoTitle|styleNoLabel);
Plot(IIf(Today == DaysSince1900(),R3,Null), "R3",ClrPivots,styleLine|styleNoRescale|styleNoTitle|styleNoLabel);
Plot(IIf(Today == DaysSince1900(),S3,Null), "S3",ClrPivots,styleLine|styleNoRescale|styleNoTitle|styleNoLabel);
PlotText(" -Pivot "+PP, LastValue(BarIndex())-(numbars/Hts)+2, PPI, colorGold);
PlotText(" -R1", LastValue(BarIndex())-(numbars/Hts)+2, R1I, ClrPivots);
PlotText(" -S1", LastValue(BarIndex())-(numbars/Hts)+2, S1I, ClrPivots);
PlotText(" -R2", LastValue(BarIndex())-(numbars/Hts)+2, R2I, ClrPivots);
PlotText(" -S2", LastValue(BarIndex())-(numbars/Hts)+2, S2I, ClrPivots);
PlotText(" -R3", LastValue(BarIndex())-(numbars/Hts)+2, R3I, ClrPivots);
PlotText(" -S3", LastValue(BarIndex())-(numbars/Hts)+2, S3I, ClrPivots);
}
PHClr = ParamColor("Prv-highColor", colorGreen);
PLClr = ParamColor("Prv-lowColor", colorLightYellow);
/*PH = LastValue(Ref(H, -1));
PH = LastValue(H);
Plot(PH, "PH",PHClr,styleLine|styleNoRescale|styleNoTitle,0,0,5);
//PL = LastValue(Ref(L, -1));
PL = LastValue(L);
(PL, "PL",PLClr,styleLine|styleNoRescale|styleNoTitle,0,0,5);
*/
_SECTION_END();
_SECTION_BEGIN("Time");
tempnum = Now( 4 ) - TimeNum();
TimeRem = Interval() - ((int(tempnum[BarCount - 1] / 100) * 60) + (tempnum[BarCount - 1] - int(tempnum[BarCount - 1] / 100) * 100));
if (TimeRem[BarCount - 1] < 0) TimeRem = 0;
MinuteVar = int(TimeRem / 60);
SecondsVar = int(frac(TimeRem / 60) * 60);
TitleTimeRem = EncodeColor(colorWhite) + MinuteVar + ":" + WriteIf(SecondsVar > 9, "", "0") + SecondsVar;
Hora=Param("Horizontal Positiona",100,1,1200,1);
Vera=Param("Vertical Positiona",30,1,830,1);
GfxSetBkMode( colorWhite );
FST=Param("Font Size Time",12,11,100,1);
GfxSelectFont( "Arial", FST, 700, italic = False, underline = False, True );
GfxSetTextColor(ParamColor("Color",colorWhite) );
GfxTextOut( "Time Left "+MinuteVar+":"+WriteIf(SecondsVar > 9, "","0")+SecondsVar+"", Hora , Vera );
_SECTION_END();
_SECTION_BEGIN("Peaking Volumes");
Vol = Param("PeakVol", 1000, 1000, 1000000, 10000);
MAV = Param("MA Period", 10, 10, 100, 1);
HiVolume = IIf(V > (2 * MA(V,MAV)) AND V > Vol, True, False);
PlotShapes(shapeSmallCircle * HiVolume, IIf(C > O, colorBlack, colorWhite), 0, (O+C)/2, 0);
_SECTION_END();
_SECTION_BEGIN("PreDHLCDayHLRN");
LV_Datenum=LastVisibleValue(DateNum()); //Calculate Date Number of Last Visible Bar
//Hor0 = Param("Hor0",900,0,1368,1);
//Ver0 = Param("Ver0",30,0,768,1);
CurrentDayBars=BarsSince(DateNum()<LV_Datenum); //Calculate number of bars for last visible day
PDay_Datenum=Ref(DateNum(),-CurrentDayBars); //Calculate Date number of previous day
P2Day_Datenum=BarsSince(DateNum()<LastValue(PDay_Datenum));//Calculate Date number of day before previous day
z=P2Day_Datenum-CurrentDayBars;
// Calculation of Last Visible Day High
// Day High = Higher of Highest Open or Highest Close during the day
Hi0=IIf(HHV(C,CurrentDayBars)> HHV(O,CurrentDayBars),HHV(C,CurrentDayBars),HHV(O,CurrentDayBars));
//Hi0bar=HHVBars(Hi0,CurrentDayBars);
x20=BarCount-LastValue(CurrentDayBars)-5;
x21=BarCount-1;
y20=LastVisibleValue(Hi0);
y21=y20;
Line2 = LineArray( x20, y20, x21, y21,1 );
Plot( Line2, "day high line", TDClrs,styleThick|styleNoTitle|styleNoLabel,0,0,5);
PlotText("DH " + y21, LastValue(BarIndex())+6, y21, TDClrs);
//Calculation of Last Visible Day Day Low
//Li0=LLV(L,CurrentDayBars);
//Day Low = Lower of Lowest Open or Lowest Close during the day
Li0=IIf(LLV(C,CurrentDayBars)< LLV(O,CurrentDayBars),LLV(C,CurrentDayBars),LLV(O,CurrentDayBars));
Li0bar=LLVBars(Li0,CurrentDayBars);
x30=BarCount-LastValue(CurrentDayBars)-4;
//x31=BarCount-1;
y30=LastVisibleValue(Li0);
y31=y30;
Line3 = LineArray( x30, y30, x21, y31, 1 );
Plot( Line3, "day low line", TDClrs,styleThick|styleNoTitle|styleNoLabel,0,0,5 );
PlotText("DL " + y31, LastValue(BarIndex())+6, y31, TDClrs);
//Calculation of Day Open
//Day Open = Open of Fis
dao=Ref(Open,-CurrentDayBars+1);
x101=BarCount-1-LastValue(CurrentDayBars-1);
y101=LastValue(dao);
y111=y101;
Line2=LineArray( x101, y101, x21, y111, 1 );
Plot( Line2, "DO Line", ParamColor("Open line", colorWhite),styleThick|styleNoTitle|styleNoLabel ,0,0,0);
PlotText("DO " + y101, LastValue(BarIndex())-20, y111, TDCLRs);
//Calculation of Previous Day High
//Hi=Ref(HHV(H,z),-CurrentDayBars);
Hi=IIf(Ref(HHV(C,z),-CurrentDayBars) > Ref(HHV(O,z),-CurrentDayBars), Ref(HHV(C,z),-CurrentDayBars), Ref(HHV(O,z),-CurrentDayBars));
Hibar=Ref(HHVBars(Hi,z),-CurrentDayBars)+CurrentDayBars;
x0=BarCount-1-LastValue(Hibar)-4;
//x1=BarCount-1;
y0=LastValue(Hi);
y1=y0;
Line = LineArray( x0, y0, x21, y1, 1 );
Plot( Line, "high line", ParamColor("PDH", PDHClr),styleThick|styleNoTitle|styleNoLabel,0,0,5 );
PlotText("PDH " + y0, LastValue(BarIndex())+6, y1, PDHClr);
//Calculation of Previous Day Close
pc=Ref(Close,-CurrentDayBars);
x10=BarCount-1-LastValue(CurrentDayBars)-5;
x11=BarCount-1;
y10=LastValue(pc);
y11=y10;
Line1=LineArray( x10, y10, x11, y11, 1 );
Plot( Line1, "Close line", ParamColor("Close line", colorWhite),styleThick|styleNoTitle|styleNoLabel ,0,0,5);
PlotText("PDC " + y11, LastValue(BarIndex())-26, y11, PDCClr);
//Calculation of Previous Day LOW
//Lo=Ref(LLV(L,z),-CurrentDayBars);
Lo=IIf(Ref(LLV(C,z),-CurrentDayBars) < Ref(LLV(O,z),-CurrentDayBars), Ref(LLV(C,z),-CurrentDayBars), Ref(LLV(O,z),-CurrentDayBars));
Lobar=Ref(LLVBars(Lo,z),-CurrentDayBars)+CurrentDayBars;
x00=BarCount-1-LastValue(Lobar)-5;
x01=BarCount-1;
//x01=Status("lastvisiblebar")+10;
y00=LastValue(Lo);
y01=y00;
Line11=LineArray(x00,y00,x01,y01,1);
Plot(Line11,"Low Line",ParamColor("PDL", PDLCLr),styleThick|styleNoTitle|styleNoLabel,0,0,5);
PlotText("PDL " + y01, LastValue(BarIndex())+6, y01, PDLClr);
//Calculation of Round Numbers on Chart
yh = int(Max(y0,y20)/50)*50;
yl = int(Min(y00,y30)/50)*50;
i=yl;
while( i>= yl AND i<=yh )
{i1 = i;
Linex=LineArray(x0,i,x21,i1);
//Linex=LineArray(LastValue(z),i,x1,i1);
Plot(Linex,"",ParamColor("RoundNumber", colorGrey40),styleThick|styleNoTitle,0,0,5);
i=i+50;
}
_SECTION_END();
/*
*/
_SECTION_BEGIN("SRSARTFtj2");
usetf = ParamToggle("Use TF", "No|Yes", 1) ;
// Author: Pratap Balakrishnan
// Copyright: All rights reserved. Not to be circulated or shared or posted on websites without the author's written permission.
// email id: [email protected]
//
/*
This creates a band of period-moving average for the given TF
(TF should be equal to or higher than current chart TF).
*/
alloff = ParamToggle("All off", "No|Yes", 0) ;
// Rh = ParamField("High", 1) ;
// Rl = ParamField("Low", 2) ;
tf = Param("TF", 3, 1, 100000, 1);
Periods = Param("Periods", 13, 2, 1000, 1 );
showzone = ParamToggle("Show Zone", "No|Yes", 1) ;
Layer = Param("Layer", -2, -5, 5, 1) ;
shift = Param("Shift", 0, -100, 100, 1) ;
showtitle = ParamToggle("Show Title", "No|Yes", 0) ;
showlabel = ParamToggle("Show Label", "No|Yes", 1) ;
isema = ParamToggle("MA Type", "MA|EMA", 1) ;
MAstyle = ParamStyle("MA Style", styleThick|styleDashed) ;
MAwidthper = Param("MA Width %", 0, 0, 10, 1) ;
MAwidth = SelectedValue(C) * MAwidthper /100 ;
Clrup = ParamColor( "Color Up", colorTurquoise);
Clrdown = ParamColor( "Color Down", colorRose);
Clrsw = ParamColor( "Color SW", colorLavender);
isexpandLast = ParamToggle("Expand Mode", "First|Last", 0);
styledisp = 0 ;
if (NOT showtitle)
styledisp |= styleNoTitle ;
if (NOT showlabel)
styledisp |= styleNoLabel ;
expandmode = expandFirst ;
if (isexpandLast)
expandmode = expandLast ;
if (NOT alloff)
{
Oldintrvl = Interval() ;
if (usetf)
{
tfs = tf *in1Minute ;
TimeFrameSet(tfs) ;
}
else
tfs = Interval() ;
if (isema)
MAhtf = EMA(H, Periods) ;
else
MAhtf = MA(H, Periods) ;
if (isema)
MAltf = EMA(L, Periods) ;
else
MAltf = MA(L, Periods) ;
str = NumToStr(tf, 1.0)+"Min"+"-P"+NumToStr(Periods, 1.0) ;
Clr = IIf(MAltf > Ref(MAltf, -1 ), ClrUp,
IIf(MAhtf < Ref(MAhtf, -1 ), ClrDown,
Clrsw)) ;
if (usetf)
TimeFrameRestore() ; //TimeFrameSet(Oldintrvl) ;
if (usetf)
MAhtfe = TimeFrameExpand(MAhtf, tfs, expandmode ) ;
else
MAhtfe = MAhtf ;
if (usetf)
MAltfe = TimeFrameExpand(MAltf, tfs, expandmode ) ;
else
MAltfe = MAltf ;
if (usetf)
Clre = TimeFrameExpand(Clr, tfs, expandmode ) ;
else
Clre = Clr ;
RefMAhtfe = MAhtfe ;
RefMAltfe = MAltfe ;
RefClre = Clre ;
Plot( RefMAhtfe, str+" High", RefClre, MAstyle|styledisp|styleNoRescale, 0, 0, shift, 1 );
Plot( RefMAltfe, str+" Low", RefClre, MAstyle|styledisp|styleNoRescale, 0, 0, shift, 1 );
if (showzone)
PlotOHLC(RefMAhtfe, RefMAhtfe, RefMAltfe, RefMAltfe, "", RefClre, styleCloud|styleNoLabel|styledisp|styleNoRescale,Null, Null, shift, Layer) ;
if (MAwidth > 0)
{
PlotOHLC(RefMAhtfe+MAwidth, RefMAhtfe+MAwidth, RefMAhtfe-MAwidth, RefMAhtfe-MAwidth, "", RefClre, styleCloud|styleNoLabel|styledisp|styleNoRescale,Null, Null, shift) ;
PlotOHLC(RefMAltfe+MAwidth, RefMAltfe+MAwidth, RefMAltfe-MAwidth, RefMAltfe-MAwidth, "", RefClre, styleCloud|styleNoLabel|styledisp|styleNoRescale,Null, Null, shift) ;
}
showext = ParamToggle("Show Extension", "No|Yes", 1) ;
showextband = ParamToggle("Show Extension Band", "No|Yes", 1) ;
extend = Param("Extend", 20, 0, 100, 1) ;
showparam = ParamToggle("Show Key Param", "No|Yes", 1) ;
if (showext)
{
x0 = BarCount - (extend+1) ;
x1 = BarCount -1 ;
Hdlast = SelectedValue(RefMAhtfe) ;
Ldlast = SelectedValue(RefMAltfe) ;
Hplot = LineArray(x0, Hdlast, x1, Hdlast) ;
Plot(Hplot, "", RefClre, styleLine|styleNoLabel|styledisp|styleNoRescale, 0,0,extend) ;
LPlot = LineArray(x0, Ldlast, x1, Ldlast) ;
Plot(LPlot, "", RefClre, styleLine|styleNoLabel|styledisp|styleNoRescale, 0,0,extend) ;
if (showextband)
PlotOHLC(HPlot, HPlot, LPlot, LPlot, "", RefClre, styleCloud|styleNoLabel|styledisp|styleNoRescale, 0,0,extend,Layer ) ;
}
showparam = ParamToggle("Show Key Param", "No|Yes", 0) ;
if (showparam)
{
y = (SelectedValue(RefMAhtfe)+ SelectedValue(RefMAltfe)) /2 ;
tfsd = tfs ;
if (tfsd < Interval())
tfsd = Interval() ;
str = "TF = " + NumToStr(tfsd/in1Minute, 1.0) + " P = " + NumToStr(Periods, 1.0) ;
PlotText(str, BarCount+2, y, colorBlack) ;
}
}
_SECTION_END();