void f00() { int Li0=iBarShift(NULL,PERIODD1,Time[0])+1; Gihigh444=…
- User
void f0_0() { int Li_0=iBarShift(NULL,PERIOD_D1,Time[0])+1; G_ihigh_444= iHigh(NULL,PERIOD_D1,Li_0); G_ilow_452 = iLow(NULL,PERIOD_D1,Li_0); G_datetime_468=iTime(NULL,PERIOD_D1,Li_0); if(TimeDayOfWeek(G_datetime_468)==0) { G_ihigh_444= MathMax(G_ihigh_444,iHigh(NULL,PERIOD_D1,Li_0+1)); G_ilow_452 = MathMin(G_ilow_452,iLow(NULL,PERIOD_D1,Li_0+1)); } Gd_460=G_ihigh_444-G_ilow_452; f0_1(); } // 177469F06A7487E6FDDCBE94FDB6FD63 int f0_1() { if(ObjectFind("FiboUp")==-1) ObjectCreate("FiboUp",OBJ_FIBO,0,G_datetime_468,G_ihigh_444+Gd_460,G_datetime_468,G_ihigh_444); else { ObjectSet("FiboUp",OBJPROP_TIME2,G_datetime_468); ObjectSet("FiboUp",OBJPROP_TIME1,G_datetime_468); ObjectSet("FiboUp",OBJPROP_PRICE1,G_ihigh_444+Gd_460); ObjectSet("FiboUp",OBJPROP_PRICE2,G_ihigh_444); } ObjectSet("FiboUp",OBJPROP_LEVELCOLOR,G_color_428); ObjectSet("FiboUp",OBJPROP_FIBOLEVELS,13); ObjectSet("FiboUp",OBJPROP_FIRSTLEVEL,0.0); ObjectSetFiboDescription("FiboUp",0,"(100.0%) - %"); ObjectSet("FiboUp",212,0.382); ObjectSetFiboDescription("FiboUp",2,"(138.2%) - %"); ObjectSet("FiboUp",214,0.618); ObjectSetFiboDescription("FiboUp",4,"(161.8%) - %"); ObjectSet("FiboUp",216,1.0); ObjectSetFiboDescription("FiboUp",6,"(200.0%) - %"); ObjectSet("FiboUp",218,1.5); ObjectSetFiboDescription("FiboUp",8,"(250.0%) - %"); ObjectSet("FiboUp",220,2.0); ObjectSetFiboDescription("FiboUp",10,"(300.0%) - %"); ObjectSet("FiboUp",222,3.0); ObjectSetFiboDescription("FiboUp",12,"(400.0%) - %"); ObjectSet("FiboUp",224,4.0); ObjectSetFiboDescription("FiboUp",14,"(500.0%) - %"); ObjectSet("FiboDn",211,0.236); ObjectSetFiboDescription("FiboDn",1,"(-23.6%) - %"); ObjectSet("FiboDn",213,0.5); ObjectSetFiboDescription("FiboDn",3,"(-50.0%) - %"); ObjectSet("FiboDn",215,0.764); ObjectSetFiboDescription("FiboDn",5,"(-76.4%) - %"); ObjectSet("FiboDn",217,1.236); ObjectSetFiboDescription("FiboDn",7,"(-123.6%) - %"); ObjectSet("FiboDn",219,1.5); ObjectSetFiboDescription("FiboDn",9,"(-150.0%) - %"); ObjectSet("FiboDn",221,1.764); ObjectSetFiboDescription("FiboDn",11,"(-176.4%) - %"); ObjectSet("FiboDn",223,2.5); ObjectSetFiboDescription("FiboDn",13,"(-250.0%) - %"); ObjectSet("FiboDn",225,3.5); ObjectSetFiboDescription("FiboDn",15,"(-350.0%) - %"); ObjectSet("FiboDn",227,4.5); ObjectSetFiboDescription("FiboDn",17,"(-450.0%) - %"); ObjectSet("FiboDn",OBJPROP_RAY,TRUE); ObjectSet("FiboDn",OBJPROP_BACK,TRUE); if(Gi_440) { if(ObjectFind("FiboIn")==-1) ObjectCreate("FiboIn",OBJ_FIBO,0,G_datetime_468,G_ihigh_444,G_datetime_468+86400,G_ilow_452); else { ObjectSet("FiboIn",OBJPROP_TIME2,G_datetime_468); ObjectSet("FiboIn",OBJPROP_TIME1,G_datetime_468+86400); ObjectSet("FiboIn",OBJPROP_PRICE1,G_ihigh_444); ObjectSet("FiboIn",OBJPROP_PRICE2,G_ilow_452); } ObjectSet("FiboIn",OBJPROP_LEVELCOLOR,G_color_432); ObjectSet("FiboIn",OBJPROP_FIBOLEVELS,7); ObjectSet("FiboIn",OBJPROP_FIRSTLEVEL,0.0); ObjectSetFiboDescription("FiboIn",0,"Daily LOW (0.0) - %"); ObjectSet("FiboIn",212,0.382); ObjectSetFiboDescription("FiboIn",2,"(38.2) - %"); ObjectSet("FiboIn",214,0.618); ObjectSetFiboDescription("FiboIn",4,"(61.8) - %"); ObjectSet("FiboIn",216,1.0); ObjectSetFiboDescription("FiboIn",6,"Daily HIGH (100.0) - %$"); ObjectSet("FiboIn",OBJPROP_RAY,TRUE); ObjectSet("FiboIn",OBJPROP_BACK,TRUE); } else ObjectDelete("FiboIn"); return (0); }
- Assistant
It seems you have provided code from a MetaTrader 4 (MT4) Expert Advisor (EA) or script, written in the MetaQuotes Language 4 (MQL4). This code defines a couple of functions: and . The purpose of these functions is to calculate Fibonacci levels for the trading chart and create graphical objects on the MT4 platform to display these levels. Let's examine what each function does: