in OBJ_FIBO, can the retracement or extension levels be selected except high and low?
Arpit T #: i want these levels to react on OBJPROP_SELECTED
The object is selected as a whole. The individual lines are not selectable in isolation.
Those lines are defined and can be modified by the "Levels" properties for that object.
For more information study the FiboLevelsSet function in example code for OBJ_FIBO.
OBJPROP_LEVELS
Number of levels
int
OBJPROP_LEVELCOLOR
Color of the line-level
color modifier=level number
OBJPROP_LEVELSTYLE
Style of the line-level
ENUM_LINE_STYLE modifier=level number
OBJPROP_LEVELWIDTH
Thickness of the line-level
int modifier=level number
//+------------------------------------------------------------------+ //| Set number of levels and their parameters | //+------------------------------------------------------------------+ bool FiboLevelsSet(int levels, // number of level lines double &values[], // values of level lines color &colors[], // color of level lines ENUM_LINE_STYLE &styles[], // style of level lines int &widths[], // width of level lines const long chart_ID=0, // chart's ID const string name="FiboLevels") // object name { //--- check array sizes if(levels!=ArraySize(colors) || levels!=ArraySize(styles) || levels!=ArraySize(widths) || levels!=ArraySize(widths)) { Print(__FUNCTION__,": array length does not correspond to the number of levels, error!"); return(false); } //--- 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)); } //--- successful execution return(true); }
As long you know the top and bottom you can calculate them
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register