Hi Marcus,
The best way is to create Fibo without the 23.6 level. The OBJPROP here after could be used :
//--- set the number of levels
ObjectSetInteger(chart_ID,name,OBJPROP_LEVELS,levels);
//--- set the properties of levels in the loop
for(int i=0;i<levels;i++)
{
//--- level value
ObjectSetDouble(chart_ID,name,OBJPROP_LEVELVALUE,i,values[i]);
//--- level color
ObjectSetInteger(chart_ID,name,OBJPROP_LEVELCOLOR,i,colors[i]);
//--- level style
ObjectSetInteger(chart_ID,name,OBJPROP_LEVELSTYLE,i,styles[i]);
//--- level width
ObjectSetInteger(chart_ID,name,OBJPROP_LEVELWIDTH,i,widths[i]);
//--- level description
ObjectSetString(chart_ID,name,OBJPROP_LEVELTEXT,i,DoubleToString(100*values[i],1));
}
If you really want to delete a specific level, maybe you could change its color according to your background color ? (ObjectSetInteger(chart_ID,name,OBJPROP_LEVELCOLOR,i,colors[i]);)
An other way maybe is to use these object property : OBJPROP_FIBOLEVELS and OBJPROP_FIRSTLEVEL+n : https://www.mql5.com/en/forum/134775
Ghen
Hi Marcus,
The best way is to create Fibo without the 23.6 level. The OBJPROP here after could be used :
//--- set the number of levels
ObjectSetInteger(chart_ID,name,OBJPROP_LEVELS,levels);
//--- set the properties of levels in the loop
for(int i=0;i<levels;i++)
{
//--- level value
ObjectSetDouble(chart_ID,name,OBJPROP_LEVELVALUE,i,values[i]);
//--- level color
ObjectSetInteger(chart_ID,name,OBJPROP_LEVELCOLOR,i,colors[i]);
//--- level style
ObjectSetInteger(chart_ID,name,OBJPROP_LEVELSTYLE,i,styles[i]);
//--- level width
ObjectSetInteger(chart_ID,name,OBJPROP_LEVELWIDTH,i,widths[i]);
//--- level description
ObjectSetString(chart_ID,name,OBJPROP_LEVELTEXT,i,DoubleToString(100*values[i],1));
}
If you really want to delete a specific level, maybe you could change its color according to your background color ? (ObjectSetInteger(chart_ID,name,OBJPROP_LEVELCOLOR,i,colors[i]);)
An other way maybe is to use these object property : OBJPROP_FIBOLEVELS and OBJPROP_FIRSTLEVEL+n : https://www.mql5.com/en/forum/134775
Ghen
Hello Ghen,
Good idea! I think the best and easiest way is setting unwanted fib-level(s) to the background color.
Thank you!
Hello Ghen,
Good idea! I think the best and easiest way is setting unwanted fib-level(s) to the background color.
Thank you!
I just found that you can't set diffrent colors to specific fibo-levels.
it sets same color for all levels, no matter how you try.
Is this a bug of mql or i'm missing something?
Using level 0 as an example:
ObjectSetInteger(0,"Fibo_"+IntegerToString(i),OBJPROP_LEVELCOLOR,0,clrNONE);
ObjectSetString(0,"Fibo_"+IntegerToString(i),OBJPROP_LEVELTEXT,0,"");
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hey guys,
in the docs I didn''t find how to delete a fibo level after creating an OBJ_FIBO. I don't need the 23.6 level and so I want to delete it from my chart. Is that somehow possible?