int f01() { if(ObjectFind("FiboUp")==-1)…
- User
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
This code seems to be written in MQL4, a programming language designed specifically for developing automated trading scripts, custom technical indicators, and function libraries on the MetaTrader 4 (MT4) platform. The purpose of this
f0_1function is to create and configure Fibonacci retracement objects on the MT4 chart. It uses several built-in functions to manipulate chart objects.Here's a breakdown of the main tasks the function performs:
-
Creates or updates a Fibonacci retracement object named "FiboUp" with specific properties, such as price levels and times, that are likely based on the high price (
G_ihigh_444) of a certain bar on the chart.
-