OBJ_TREND versus OBJ_HLINE

 

Is it possible to have OBJ_TREND showing up as a price level on the right hand scale?  I don't want to use OBJ_HLINE because I want it to start at a specified point and not go right across the chart.

I am trying to do it via a drag and drop script


thank you


  ObjectCreate("Line     " + TimeNow + Price_on_Drop,OBJ_TREND,0,0,Price_on_Drop);  //OBJ_TREND

         ObjectSet("Line     " + TimeNow + Price_on_Drop,OBJPROP_COLOR,Line_Color);

         ObjectSet("Line     " + TimeNow + Price_on_Drop,OBJPROP_WIDTH,Line_Width);

         ObjectSet("Line     " + TimeNow + Price_on_Drop,OBJPROP_RAY,Line_Ray);

   //      ObjectSet("Line     " + TimeNow + Price_on_Drop,OBJPROP_RAY_RIGHT, True);   //kk testing this doens't work grrrr

   //      ObjectSet("Line     " + TimeNow + Price_on_Drop,OBJPROP_BACK, True);        // kk testing this 

Documentation on MQL5: Constants, Enumerations and Structures / Objects Constants / Object Types
Documentation on MQL5: Constants, Enumerations and Structures / Objects Constants / Object Types
  • www.mql5.com
When a graphical object is created using the ObjectCreate() function, it's necessary to specify the type of object being created, which can be one of the values of the ENUM_OBJECT enumeration. Further specifications of object properties are possible using functions for working with graphical objects.
Files:
like_this.png  2 kb
 
Deborah Harris: e OBJ_TREND showing up as a price level on the right hand scale? 
  1. Only HLine does that.
  2. Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
              General rules and best pratices of the Forum. - General - MQL5 programming forum
              Messages Editor