Professional Documents
Culture Documents
ObjectDelete("M0P"+name); ObjectDelete("BDU"+name);
ObjectDelete("M1P"+name); ObjectDelete("BDD"+name);
ObjectDelete("M2P"+name); ObjectDelete("BDL"+name);
ObjectDelete("M3P"+name); ObjectDelete("BDR"+name);
ObjectDelete("M4P"+name);
ObjectDelete("M5P"+name); ObjectDelete("f214a"+name);
ObjectDelete("f236a"+name);
ObjectDelete("M0L"+name); ObjectDelete("f382a"+name);
ObjectDelete("M1L"+name); ObjectDelete("f50a"+name);
ObjectDelete("M2L"+name); ObjectDelete("f618a"+name);
ObjectDelete("M3L"+name); ObjectDelete("f764a"+name);
ObjectDelete("M4L"+name); ObjectDelete("f786a"+name);
ObjectDelete("M5L"+name);
ObjectDelete("f214b"+name);
ObjectDelete("BZ"+name); ObjectDelete("f236b"+name);
ObjectDelete("SZ"+name); ObjectDelete("f382b"+name);
ObjectDelete("f50b"+name);
ObjectDelete("BDU"+name); ObjectDelete("f618b"+name);
ObjectDelete("BDD"+name); ObjectDelete("f764b"+name);
ObjectDelete("BDL"+name); ObjectDelete("f786b"+name);
ObjectDelete("BDR"+name);
ObjectDelete("f214p"+name);
ObjectDelete("f214a"+name); ObjectDelete("f236p"+name);
ObjectDelete("f236a"+name); ObjectDelete("f382p"+name);
ObjectDelete("f382a"+name); ObjectDelete("f50p"+name);
ObjectDelete("f50a"+name); ObjectDelete("f618p"+name);
ObjectDelete("f618a"+name); ObjectDelete("f764p"+name);
ObjectDelete("f764a"+name); ObjectDelete("f786p"+name);
ObjectDelete("f786a"+name);
ObjectDelete("f214l"+name);
ObjectDelete("f214b"+name); ObjectDelete("f236l"+name);
ObjectDelete("f236b"+name); ObjectDelete("f382l"+name);
ObjectDelete("f382b"+name); ObjectDelete("f50l"+name);
ObjectDelete("f50b"+name); ObjectDelete("f618l"+name);
ObjectDelete("f618b"+name); ObjectDelete("f764l"+name);
ObjectDelete("f764b"+name); ObjectDelete("f786l"+name);
ObjectDelete("f786b"+name);
ObjectDelete("open"+name);
ObjectDelete("f214p"+name); ObjectDelete("high"+name);
ObjectDelete("f236p"+name); ObjectDelete("low"+name);
ObjectDelete("f382p"+name); ObjectDelete("close"+name);
ObjectDelete("f50p"+name);
ObjectDelete("f618p"+name); ObjectDelete("openp"+name);
ObjectDelete("f764p"+name); ObjectDelete("highp"+name);
ObjectDelete("f786p"+name); ObjectDelete("lowp"+name);
ObjectDelete("closep"+name);
ObjectDelete("f214l"+name); }
ObjectDelete("f236l"+name);
ObjectDelete("f382l"+name); bool PlotTrend(const long chart_ID=0,
ObjectDelete("f50l"+name); string name="trendline",
ObjectDelete("f618l"+name); const int subwindow=0,
ObjectDelete("f764l"+name); datetime time1=0,
ObjectDelete("f786l"+name); double price1=0,
datetime time2=0,
ObjectDelete("open"+name); double price2=0,
ObjectDelete("high"+name); const color clr=clrBlack,
ObjectDelete("low"+name); const ENUM_LINE_STYLE style=STYLE_SOLID,
ObjectDelete("close"+name); const int width=2,
const bool back=true,
ObjectDelete("openp"+name); const bool selection=false,
ObjectDelete("highp"+name); const bool ray=false,
ObjectDelete("lowp"+name); const bool hidden=true)
ObjectDelete("closep"+name); {
} ResetLastError();
if(!
bool PlotTrend(const long chart_ID=0, ObjectCreate(chart_ID,name,OBJ_TREND,subwindow,time1,
string name="trendline", price1,time2,price2))
const int subwindow=0, {
datetime time1=0, Print(__FUNCTION__,": failed to create arrow =
double price1=0, ",GetLastError());
datetime time2=0, return(false);
double price2=0, }
const color clr=clrBlack, ObjectSetInteger(chart_ID,name,OBJPROP_COLOR,clr);
const ENUM_LINE_STYLE style=STYLE_SOLID, ObjectSetInteger(chart_ID,name,OBJPROP_STYLE,style);
const int width=2, ObjectSetInteger(chart_ID,name,OBJPROP_WIDTH,width);
const bool back=true, ObjectSetInteger(chart_ID,name,OBJPROP_BACK,back);
const bool selection=false,
const bool ray=false, ObjectSetInteger(chart_ID,name,OBJPROP_SELECTABLE,sele
const bool hidden=true) ction);
{
ResetLastError(); ObjectSetInteger(chart_ID,name,OBJPROP_SELECTED,selecti
if(! on);
ObjectCreate(chart_ID,name,OBJ_TREND,subwindow,ti ObjectSetInteger(chart_ID,name,OBJPROP_RAY,ray);
me1,price1,time2,price2))
{ ObjectSetInteger(chart_ID,name,OBJPROP_HIDDEN,hidden);
Print(__FUNCTION__,": failed to create arrow = return(true);
",GetLastError()); }
return(false);
} bool PlotRectangle( const long chart_ID=0,
string name="rectangle",
ObjectSetInteger(chart_ID,name,OBJPROP_COLOR,clr); const int subwindow=0,
datetime time1=0,
ObjectSetInteger(chart_ID,name,OBJPROP_STYLE,style) double price1=1,
; datetime time2=0,
double price2=0,
ObjectSetInteger(chart_ID,name,OBJPROP_WIDTH,widt const color clr=clrGray,
h); const bool back=true,
const bool selection=false,
ObjectSetInteger(chart_ID,name,OBJPROP_BACK,back); const bool hidden=true)
{
ObjectSetInteger(chart_ID,name,OBJPROP_SELECTABLE if(!
,selection); ObjectCreate(chart_ID,name,OBJ_RECTANGLE,subwindow,ti
me1,price1,time2,price2))
ObjectSetInteger(chart_ID,name,OBJPROP_SELECTED,s {
election); Print(__FUNCTION__,": failed to create arrow =
ObjectSetInteger(chart_ID,name,OBJPROP_RAY,ray); ",GetLastError());
return(false);
ObjectSetInteger(chart_ID,name,OBJPROP_HIDDEN,hid }
den); ObjectSetInteger(chart_ID,name,OBJPROP_COLOR,clr);
return(true); ObjectSetInteger(chart_ID,name,OBJPROP_BACK,back);
}
ObjectSetInteger(chart_ID,name,OBJPROP_SELECTABLE,sele
bool PlotRectangle( const long chart_ID=0, ction);
string name="rectangle",
const int subwindow=0, ObjectSetInteger(chart_ID,name,OBJPROP_HIDDEN,hidden);
datetime time1=0, return(true);
double price1=1, }
datetime time2=0,
double price2=0, bool PlotText( const long chart_ID=0,
const color clr=clrGray, string name="text",
const bool back=true, const int subwindow=0,
const bool selection=false, datetime time1=0,
const bool hidden=true) double price1=0,
{ const string text="text",
if(! const string font="Arial",
ObjectCreate(chart_ID,name,OBJ_RECTANGLE,subwind const int font_size=10,
ow,time1,price1,time2,price2)) const color clr=clrGray,
{ const ENUM_ANCHOR_POINT anchor =
Print(__FUNCTION__,": failed to create arrow = ANCHOR_LEFT_UPPER,
",GetLastError()); const bool back=true,
return(false); const bool selection=false,
} const bool hidden=true)
{
ObjectSetInteger(chart_ID,name,OBJPROP_COLOR,clr); ResetLastError();
if(!
ObjectSetInteger(chart_ID,name,OBJPROP_BACK,back); ObjectCreate(chart_ID,name,OBJ_TEXT,subwindow,time1,pr
ice1))
ObjectSetInteger(chart_ID,name,OBJPROP_SELECTABLE {
,selection); Print(__FUNCTION__,": failed to create arrow =
",GetLastError());
ObjectSetInteger(chart_ID,name,OBJPROP_HIDDEN,hid return(false);
den); }
return(true); ObjectSetString(chart_ID,name,OBJPROP_TEXT,text);
} ObjectSetString(chart_ID,name,OBJPROP_FONT,font);
if(PlotZones){ PlotText(0,"PPL"+name,0,tmend,PP,"PP","Arial",8,ColorPP,A
NCHOR_LEFT_UPPER);
PlotRectangle(0,"BZ"+name,0,tmestrt,S3,tmend,S4,Col
orBuyZone); PlotText(0,"S1L"+name,0,tmend,S1,"S1","Arial",8,ColorSup,
ANCHOR_LEFT_UPPER);
PlotRectangle(0,"SZ"+name,0,tmestrt,R3,tmend,R4,Col
orSellZone);} PlotText(0,"S2L"+name,0,tmend,S2,"S2","Arial",8,ColorSup,
ANCHOR_LEFT_UPPER);
if(PlotPivots){
PlotText(0,"S3L"+name,0,tmend,S3,"S3","Arial",8,ColorSup,
PlotTrend(0,"R6"+name,0,tmestrt,R6,tmend,R6,ColorR ANCHOR_LEFT_UPPER);}
es,StylePivots,WidthPivots); if(PlotPivotPrices){
PlotTrend(0,"R5"+name,0,tmestrt,R5,tmend,R5,ColorR PlotText(0,"R3P"+name,0,tmestrt,R3,DoubleToString(R3,4),"
es,StylePivots,WidthPivots); Arial",8,ColorRes,ANCHOR_LEFT_UPPER);
PlotTrend(0,"R4"+name,0,tmestrt,R4,tmend,R4,ColorR PlotText(0,"R2P"+name,0,tmestrt,R2,DoubleToString(R2,4),"
es,StylePivots,WidthPivots); Arial",8,ColorRes,ANCHOR_LEFT_UPPER);
PlotTrend(0,"R3"+name,0,tmestrt,R3,tmend,R3,ColorR PlotText(0,"R1P"+name,0,tmestrt,R1,DoubleToString(R1,4),"
es,StylePivots,WidthPivots); Arial",8,ColorRes,ANCHOR_LEFT_UPPER);
PlotTrend(0,"R2"+name,0,tmestrt,R2,tmend,R2,ColorR PlotText(0,"PPP"+name,0,tmestrt,PP,DoubleToString(PP,4),"
es,StylePivots,WidthPivots); Arial",8,ColorPP,ANCHOR_LEFT_UPPER);
PlotTrend(0,"R1"+name,0,tmestrt,R1,tmend,R1,ColorR PlotText(0,"S1P"+name,0,tmestrt,S1,DoubleToString(S1,4),"
es,StylePivots,WidthPivots); Arial",8,ColorSup,ANCHOR_LEFT_UPPER);
PlotTrend(0,"PP"+name,0,tmestrt,PP,tmend,PP,ColorPP PlotText(0,"S2P"+name,0,tmestrt,S2,DoubleToString(S2,4),"
,StylePivots,WidthPivots); Arial",8,ColorSup,ANCHOR_LEFT_UPPER);
PlotTrend(0,"S1"+name,0,tmestrt,S1,tmend,S1,ColorSu PlotText(0,"S3P"+name,0,tmestrt,S3,DoubleToString(S3,4),"
p,StylePivots,WidthPivots); Arial",8,ColorSup,ANCHOR_LEFT_UPPER);}}}
PlotTrend(0,"S3"+name,0,tmestrt,S3,tmend,S3,ColorSu PlotTrend(0,"PRTop"+name,0,tmestrt,PRTop,tmend,PRTop,
p,StylePivots,WidthPivots); PivotRangeColor,PivotRangeStyle,1);
PlotTrend(0,"S4"+name,0,tmestrt,S4,tmend,S4,ColorSu PlotTrend(0,"PRBottom"+name,0,tmestrt,PRBottom,tmend,
p,StylePivots,WidthPivots); PRBottom,PivotRangeColor,PivotRangeStyle,1);
if(!PlotPivots || (shift >= Days2Plot)){
PlotTrend(0,"S5"+name,0,tmestrt,S5,tmend,S5,ColorSu
p,StylePivots,WidthPivots); PlotTrend(0,"PP"+name,0,tmestrt,PP,tmend,PP,ColorPP,Styl
ePivots,WidthPivots);}}
PlotTrend(0,"S6"+name,0,tmestrt,S6,tmend,S6,ColorSu
p,StylePivots,WidthPivots); if(PlotMidpoints){if (shift < Days2Plot){
if(PlotPivotLabels){
PlotTrend(0,"M0"+name,0,tmestrt,M0,tmend,M0,ColorM02
PlotText(0,"R6L"+name,0,tmestrt,R6,"R161","Arial",8,C ,StyleMidpoints,WidthMidpoints);
olorRes,ANCHOR_LEFT_UPPER);
PlotTrend(0,"M1"+name,0,tmestrt,M1,tmend,M1,ColorM02
PlotText(0,"R5L"+name,0,tmestrt,R5,"R138","Arial",8,C ,StyleMidpoints,WidthMidpoints);
olorRes,ANCHOR_LEFT_UPPER);
PlotTrend(0,"M2"+name,0,tmestrt,M2,tmend,M2,ColorM02
PlotText(0,"R4L"+name,0,tmestrt,R4,"R100","Arial",8,C ,StyleMidpoints,WidthMidpoints);
olorRes,ANCHOR_LEFT_UPPER);
PlotTrend(0,"M3"+name,0,tmestrt,M3,tmend,M3,ColorM35
PlotText(0,"R3L"+name,0,tmestrt,R3,"R78","Arial",8,Col ,StyleMidpoints,WidthMidpoints);
orRes,ANCHOR_LEFT_UPPER);
PlotTrend(0,"M4"+name,0,tmestrt,M4,tmend,M4,ColorM35
PlotText(0,"R2L"+name,0,tmestrt,R2,"R61","Arial",8,Col ,StyleMidpoints,WidthMidpoints);
orRes,ANCHOR_LEFT_UPPER);
PlotTrend(0,"M5"+name,0,tmestrt,M5,tmend,M5,ColorM35
PlotText(0,"R1L"+name,0,tmestrt,R1,"R38","Arial",8,Col ,StyleMidpoints,WidthMidpoints);
orRes,ANCHOR_LEFT_UPPER); if(PlotPivotLabels){
PlotText(0,"PPL"+name,0,tmestrt,PP,"PP","Arial",8,Colo PlotText(0,"M0L"+name,0,tmend,M0,"M0","Arial",8,ColorSu
rPP,ANCHOR_LEFT_UPPER); p,ANCHOR_LEFT_UPPER);
PlotText(0,"S1L"+name,0,tmestrt,S1,"S38","Arial",8,Col PlotText(0,"M1L"+name,0,tmend,M1,"M1","Arial",8,ColorSu
orSup,ANCHOR_LEFT_UPPER); p,ANCHOR_LEFT_UPPER);
PlotText(0,"S2L"+name,0,tmestrt,S2,"S61","Arial",8,Col PlotText(0,"M2L"+name,0,tmend,M2,"M2","Arial",8,ColorSu
orSup,ANCHOR_LEFT_UPPER); p,ANCHOR_LEFT_UPPER);
PlotText(0,"S3L"+name,0,tmestrt,S3,"S78","Arial",8,Col PlotText(0,"M3L"+name,0,tmend,M3,"M3","Arial",8,ColorRe
orSup,ANCHOR_LEFT_UPPER); s,ANCHOR_LEFT_UPPER);
PlotText(0,"S4L"+name,0,tmestrt,S4,"S100","Arial",8,Co PlotText(0,"M4L"+name,0,tmend,M4,"M4","Arial",8,ColorRe
lorSup,ANCHOR_LEFT_UPPER); s,ANCHOR_LEFT_UPPER);
PlotText(0,"S5L"+name,0,tmestrt,S5,"S138","Arial",8,Co PlotText(0,"M5L"+name,0,tmend,M5,"M5","Arial",8,ColorRe
lorSup,ANCHOR_LEFT_UPPER); s,ANCHOR_LEFT_UPPER);}
if(PlotPivotPrices){
PlotText(0,"S6L"+name,0,tmestrt,S6,"S161","Arial",8,Co
lorSup,ANCHOR_LEFT_UPPER);} PlotText(0,"M0P"+name,0,tmestrt,M0,DoubleToString(M0,4
if(PlotPivotPrices){ ),"Arial",8,ColorSup,ANCHOR_LEFT_UPPER);
PlotText(0,"R6P"+name,0,tmend,R6,DoubleToString(R6 PlotText(0,"M1P"+name,0,tmestrt,M1,DoubleToString(M1,4
,4),"Arial",8,ColorRes,ANCHOR_RIGHT_UPPER); ),"Arial",8,ColorSup,ANCHOR_LEFT_UPPER);
PlotText(0,"R5P"+name,0,tmend,R5,DoubleToString(R5 PlotText(0,"M2P"+name,0,tmestrt,M2,DoubleToString(M2,4
,4),"Arial",8,ColorRes,ANCHOR_RIGHT_UPPER); ),"Arial",8,ColorSup,ANCHOR_LEFT_UPPER);
PlotText(0,"R4P"+name,0,tmend,R4,DoubleToString(R4 PlotText(0,"M3P"+name,0,tmestrt,M3,DoubleToString(M3,4
,4),"Arial",8,ColorRes,ANCHOR_RIGHT_UPPER); ),"Arial",8,ColorRes,ANCHOR_LEFT_UPPER);
PlotText(0,"R3P"+name,0,tmend,R3,DoubleToString(R3 PlotText(0,"M4P"+name,0,tmestrt,M4,DoubleToString(M4,4
,4),"Arial",8,ColorRes,ANCHOR_RIGHT_UPPER); ),"Arial",8,ColorRes,ANCHOR_LEFT_UPPER);
PlotText(0,"R2P"+name,0,tmend,R2,DoubleToString(R2 PlotText(0,"M5P"+name,0,tmestrt,M5,DoubleToString(M5,4
,4),"Arial",8,ColorRes,ANCHOR_RIGHT_UPPER); ),"Arial",8,ColorRes,ANCHOR_LEFT_UPPER);}}}
if(PlotMiddle){ PlotTrend(0,"f214a"+name,0,tmestrt,f214,tmend,f214,Color
Fibots,StyleFibots1,WidthFibots1);
PlotTrend(0,"M0"+name,0,tmestrt,M0,tmend,M0,Color
M02,StyleMidpoints,WidthMidpoints); PlotTrend(0,"f382a"+name,0,tmestrt,f382,tmend,f382,Color
Fibots,StyleFibots1,WidthFibots1);
PlotTrend(0,"M1"+name,0,tmestrt,M1,tmend,M1,Color
M02,StyleMidpoints,WidthMidpoints); PlotTrend(0,"f50a"+name,0,tmestrt,f50,tmend,f50,ColorFib
ots,StyleFibots1,WidthFibots1);
PlotTrend(0,"M2"+name,0,tmestrt,M2,tmend,M2,Color
M02,StyleMidpoints,WidthMidpoints); PlotTrend(0,"f618a"+name,0,tmestrt,f618,tmend,f618,Color
Fibots,StyleFibots1,WidthFibots1);
PlotTrend(0,"M3"+name,0,tmestrt,M3,tmend,M3,Color
M35,StyleMidpoints,WidthMidpoints); PlotTrend(0,"f786a"+name,0,tmestrt,f786,tmend,f786,Color
Fibots,StyleFibots1,WidthFibots1);
PlotTrend(0,"M4"+name,0,tmestrt,M4,tmend,M4,Color
M35,StyleMidpoints,WidthMidpoints); PlotTrend(0,"f214b"+name,0,tmestrt+TimePeriod*10,f214,t
mend,f214,ColorFibots,StyleFibots2,WidthFibots2);
PlotTrend(0,"M5"+name,0,tmestrt,M5,tmend,M5,Color
M35,StyleMidpoints,WidthMidpoints); PlotTrend(0,"f382b"+name,0,tmestrt+TimePeriod*10,f382,t
if(PlotPivotLabels){ mend,f382,ColorFibots,StyleFibots2,WidthFibots2);
PlotText(0,"M0L"+name,0,tmend,M0,"M0","Arial",8,Co PlotTrend(0,"f50b"+name,0,tmestrt+TimePeriod*10,f50,tm
lorSup,ANCHOR_RIGHT_UPPER); end,f50,ColorFibots,StyleFibots2,WidthFibots2);
PlotText(0,"M1L"+name,0,tmend,M1,"M1","Arial",8,Co PlotTrend(0,"f618b"+name,0,tmestrt+TimePeriod*10,f618,t
lorSup,ANCHOR_RIGHT_UPPER); mend,f618,ColorFibots,StyleFibots2,WidthFibots2);
PlotText(0,"M2L"+name,0,tmend,M2,"M2","Arial",8,Co PlotTrend(0,"f786b"+name,0,tmestrt+TimePeriod*10,f786,t
lorSup,ANCHOR_RIGHT_UPPER); mend,f786,ColorFibots,StyleFibots2,WidthFibots2);
if(PlotFibotLabels){
PlotText(0,"M3L"+name,0,tmend,M3,"M3","Arial",8,Co
lorRes,ANCHOR_RIGHT_UPPER); PlotText(0,"f214l"+name,0,tmend,f214,"21.4%","Arial",8,Col
orFibots,ANCHOR_LEFT_UPPER);
PlotText(0,"M4L"+name,0,tmend,M4,"M4","Arial",8,Co
lorRes,ANCHOR_RIGHT_UPPER); PlotText(0,"f382l"+name,0,tmend,f382,"38.2%","Arial",8,Col
orFibots,ANCHOR_LEFT_UPPER);
PlotText(0,"M5L"+name,0,tmend,M5,"M5","Arial",8,Co
lorRes,ANCHOR_RIGHT_UPPER);} PlotText(0,"f50l"+name,0,tmend,f50,"50%","Arial",8,ColorFi
if(PlotPivotPrices){ bots,ANCHOR_LEFT_UPPER);
PlotText(0,"M0P"+name,0,tmestrt,M0,DoubleToString( PlotText(0,"f618l"+name,0,tmend,f618,"61.8%","Arial",8,Col
M0,4),"Arial",8,ColorSup,ANCHOR_LEFT_UPPER); orFibots,ANCHOR_LEFT_UPPER);
PlotText(0,"M1P"+name,0,tmestrt,M1,DoubleToString( PlotText(0,"f786l"+name,0,tmend,f786,"78.6%","Arial",8,Col
M1,4),"Arial",8,ColorSup,ANCHOR_LEFT_UPPER); orFibots,ANCHOR_LEFT_UPPER);}
if(PlotFibotPrices){
PlotText(0,"M2P"+name,0,tmestrt,M2,DoubleToString(
M2,4),"Arial",8,ColorSup,ANCHOR_LEFT_UPPER); PlotText(0,"f214p"+name,0,tmestrt,f214,DoubleToString(f2
14,4),"Arial",8,ColorFibots,ANCHOR_LEFT_UPPER);
PlotText(0,"M3P"+name,0,tmestrt,M3,DoubleToString(
M3,4),"Arial",8,ColorRes,ANCHOR_LEFT_UPPER); PlotText(0,"f382p"+name,0,tmestrt,f382,DoubleToString(f3
82,4),"Arial",8,ColorFibots,ANCHOR_LEFT_UPPER);
PlotText(0,"M4P"+name,0,tmestrt,M4,DoubleToString(
M4,4),"Arial",8,ColorRes,ANCHOR_LEFT_UPPER); PlotText(0,"f50p"+name,0,tmestrt,f50,DoubleToString(f50,4
),"Arial",8,ColorFibots,ANCHOR_LEFT_UPPER);
PlotText(0,"M5P"+name,0,tmestrt,M5,DoubleToString(
M5,4),"Arial",8,ColorRes,ANCHOR_LEFT_UPPER);}} PlotText(0,"f618p"+name,0,tmestrt,f618,DoubleToString(f6
18,4),"Arial",8,ColorFibots,ANCHOR_LEFT_UPPER);
if(PlotFibots){
PlotText(0,"f786p"+name,0,tmestrt,f786,DoubleToString(f7
PlotTrend(0,"f236a"+name,0,tmestrt,f236,tmend,f236, 86,4),"Arial",8,ColorFibots,ANCHOR_LEFT_UPPER);}}}
ColorFibots,StyleFibots1,WidthFibots1);
if(PlotYesterdayOHLC){if (shift < Days2Plot){
PlotTrend(0,"f382a"+name,0,tmestrt,f382,tmend,f382,
ColorFibots,StyleFibots1,WidthFibots1); PlotTrend(0,"open"+name,0,tmestrt,open,tmestrt+TimePeri
od*10,open,ColorO,StyleOHLC,WidthOHLC);
PlotTrend(0,"f50a"+name,0,tmestrt,f50,tmend,f50,Colo //
rFibots,StyleFibots1,WidthFibots1); PlotTrend(0,"high"+name,0,tmestrt,high,tmestrt+TimePerio
d*10,high,ColorH,StyleOHLC,WidthOHLC);
PlotTrend(0,"f618a"+name,0,tmestrt,f618,tmend,f618, //
ColorFibots,StyleFibots1,WidthFibots1); PlotTrend(0,"low"+name,0,tmestrt,low,tmestrt+TimePeriod
*10,low,ColorL,StyleOHLC,WidthOHLC);
PlotTrend(0,"f786a"+name,0,tmestrt,f786,tmend,f786,
ColorFibots,StyleFibots1,WidthFibots1); PlotTrend(0,"close"+name,0,tmestrt,close,tmestrt+TimePeri
od*10,close,ColorC,StyleOHLC,WidthOHLC);
PlotTrend(0,"f236b"+name,0,tmestrt+TimePeriod*10,f if(PlotOHLCPrices){
236,tmend,f236,ColorFibots,StyleFibots2,WidthFibots2)
; PlotText(0,"openp"+name,0,tmestrt+TimePeriod*10,open,D
oubleToString(rangeopen1,1)+"/"+DoubleToString(rangeope
PlotTrend(0,"f382b"+name,0,tmestrt+TimePeriod*10,f n2,1)+"%","Arial",8,ColorO,6);
382,tmend,f382,ColorFibots,StyleFibots2,WidthFibots2)
; PlotText(0,"closep"+name,0,tmestrt+TimePeriod*10,close,D
oubleToString(rangeclose1,1)+"/"+DoubleToString(rangeclos
PlotTrend(0,"f50b"+name,0,tmestrt+TimePeriod*10,f5 e2,1)+"%","Arial",8,ColorC,6);}}}
0,tmend,f50,ColorFibots,StyleFibots2,WidthFibots2); if(PlotYesterdayHL){if (shift < Days2Plot){
PlotTrend(0,"f618b"+name,0,tmestrt+TimePeriod*10,f PlotTrend(0,"high"+name,0,tmestrt,high,tmestrt+TimePerio
618,tmend,f618,ColorFibots,StyleFibots2,WidthFibots2) d*60,high,ColorH,StyleOHLC,WidthOHLC);
;
PlotTrend(0,"low"+name,0,tmestrt,low,tmestrt+TimePeriod
PlotTrend(0,"f786b"+name,0,tmestrt+TimePeriod*10,f *60,low,ColorL,StyleOHLC,WidthOHLC);}}
786,tmend,f786,ColorFibots,StyleFibots2,WidthFibots2)
; }
if(PlotFibotLabels){
int init()
PlotText(0,"f236l"+name,0,tmend,f236,"23.6%","Arial", {
8,ColorFibots,ANCHOR_RIGHT_UPPER); if(TimePeriod==PERIOD_M1||
TimePeriod==PERIOD_CURRENT)
PlotText(0,"f382l"+name,0,tmend,f382,"38.2%","Arial", {TimePeriod=PERIOD_M5;period="M5";}
8,ColorFibots,ANCHOR_RIGHT_UPPER); if(TimePeriod==PERIOD_M5){period="M5";}
if(TimePeriod==PERIOD_M15){period="M15";}
PlotText(0,"f50l"+name,0,tmend,f50,"50%","Arial",8,Co if(TimePeriod==PERIOD_M30){period="M30";}
lorFibots,ANCHOR_RIGHT_UPPER); if(TimePeriod==PERIOD_H1){period="H1";}
if(TimePeriod==PERIOD_H4){period="H4";}
PlotText(0,"f618l"+name,0,tmend,f618,"61.8%","Arial", if(TimePeriod==PERIOD_D1){period="D1";}
8,ColorFibots,ANCHOR_RIGHT_UPPER); if(TimePeriod==PERIOD_W1){period="W1";}
if(TimePeriod==PERIOD_MN1){period="MN1";}
PlotText(0,"f786l"+name,0,tmend,f786,"78.6%","Arial", return(0);
8,ColorFibots,ANCHOR_RIGHT_UPPER);} }
if(PlotFibotPrices){
int deinit()
PlotText(0,"f236p"+name,0,tmestrt,f236,DoubleToStrin {
g(f236,4),"Arial",8,ColorFibots,ANCHOR_LEFT_UPPER); for(shift=0;shift<=CountPeriods;shift++)
{
PlotText(0,"f382p"+name,0,tmestrt,f382,DoubleToStrin LevelsDelete(period+shift);
g(f382,4),"Arial",8,ColorFibots,ANCHOR_LEFT_UPPER); }
LevelsDelete("F"+period);
PlotText(0,"f50p"+name,0,tmestrt,f50,DoubleToString(f Comment("");
50,4),"Arial",8,ColorFibots,ANCHOR_LEFT_UPPER); return(0);
}
PlotText(0,"f618p"+name,0,tmestrt,f618,DoubleToStrin
g(f618,4),"Arial",8,ColorFibots,ANCHOR_LEFT_UPPER); int start()
{
PlotText(0,"f786p"+name,0,tmestrt,f786,DoubleToStrin for(shift=0;shift<=CountPeriods;shift++)
g(f786,4),"Arial",8,ColorFibots,ANCHOR_LEFT_UPPER);} {
} LevelsDelete(period+shift);
}
if(PlotYesterdayOHLC){ LevelsDelete("F"+period);
PlotTrend(0,"open"+name,0,tmestrt,open,tmestrt+Tim for(shift=CountPeriods-1;shift>=0;shift--)
ePeriod*13,open,ColorO,StyleOHLC,WidthOHLC); {
timestart = iTime(NULL,TimePeriod,shift);
PlotTrend(0,"high"+name,0,tmestrt,high,tmestrt+Time timeend = iTime(NULL,TimePeriod,shift)
Period*20,high,ColorH,StyleOHLC,WidthOHLC); +TimePeriod*60;
PlotTrend(0,"low"+name,0,tmestrt,low,tmestrt+TimeP LevelsDraw(shift+1,timestart,timeend,period+shift,false);
eriod*20,low,ColorL,StyleOHLC,WidthOHLC); }
PlotTrend(0,"close"+name,0,tmestrt,close,tmestrt+Tim if(PlotFuturePivots)
ePeriod*13,close,ColorC,StyleOHLC,WidthOHLC); {
if(PlotOHLCPrices){ timestart=iTime(NULL,TimePeriod,0)+TimePeriod*60;
timeend=iTime(NULL,TimePeriod,0)+TimePeriod*120;
PlotText(0,"openp"+name,0,tmestrt+TimePeriod*10,op
en,DoubleToString(rangeopen1,1)+"/"+DoubleToString( LevelsDraw(0,timestart,timeend,"F"+period,true);
rangeopen2,1)+"%","Arial",8,ColorO,6); }
PlotText(0,"closep"+name,0,tmestrt+TimePeriod*10,cl return(0);
ose,DoubleToString(rangeclose1,1)+"/"+DoubleToStrin }
g(rangeclose2,1)+"%","Arial",8,ColorC,6);}}
if(PlotBorders){
if((future==false)&&(shift != 0)){
//
PlotTrend(0,"BDU"+name,0,tmestrt,R3,tmend,R3,Color
Border,StyleBorder,WidthBorder); // top
//
PlotTrend(0,"BDD"+name,0,tmestrt,S3,tmend,S3,Color
Border,StyleBorder,WidthBorder); // bottom
PlotTrend(0,"BDL"+name,0,tmestrt,R3,tmestrt,S3,Color
Border,StyleBorder,WidthBorder); // left
PlotTrend(0,"BDR"+name,0,tmend,R3,tmend,S3,ColorB
order,StyleBorder,WidthBorder);}} // right
int init()
{
if(TimePeriod==PERIOD_M1||
TimePeriod==PERIOD_CURRENT)
{TimePeriod=PERIOD_M5;period="M5";}
if(TimePeriod==PERIOD_M5){period="M5";}
if(TimePeriod==PERIOD_M15){period="M15";}
if(TimePeriod==PERIOD_M30){period="M30";}
if(TimePeriod==PERIOD_H1){period="H1";}
if(TimePeriod==PERIOD_H4){period="H4";}
if(TimePeriod==PERIOD_D1){period="D1";}
if(TimePeriod==PERIOD_W1){period="W1";}
if(TimePeriod==PERIOD_MN1){period="MN1";}
return(0);
}
int deinit()
{
for(shift=0;shift<=CountPeriods;shift++)
{
LevelsDelete(period+shift);
}
LevelsDelete("F"+period);
Comment("");
return(0);
}
int start()
{
for(shift=0;shift<=CountPeriods;shift++)
{
LevelsDelete(period+shift);
}
LevelsDelete("F"+period);
for(shift=CountPeriods-1;shift>=0;shift--)
{
timestart = iTime(NULL,TimePeriod,shift);
timeend = iTime(NULL,TimePeriod,shift)
+TimePeriod*60;
LevelsDraw(shift+1,timestart,timeend,period+shift,false
);
}
if(PlotFuturePivots)
{
timestart=iTime(NULL,TimePeriod,0)+TimePeriod*60;
timeend=iTime(NULL,TimePeriod,0)+TimePeriod*120;
LevelsDraw(0,timestart,timeend,"F"+period,true);
}
return(0);
}