Is it possible to select OBJ_FIBO levels?

 
in OBJ_FIBO, can the retracement or extension levels be selected except high and low?
 
Arpit T: in OBJ_FIBO, can the retracement or extension levels be selected except high and low?
Your question is unclear. Can you explain it in more detail? Screenshots would be helpful too.
 
Fernando Carreiro #:
Your question is unclear. Can you explain it in more detail? Screenshots would be helpful too.

i want these levels to react on OBJPROP_SELECTED

 
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);
  }
 
Fernando Carreiro #:

The individual lines are not selectable in isolation.


thanks

 
As long you know the top and bottom you can calculate them
Reason: