Download MetaTrader 5

How to change OBJ_HLINE to OBJ_TREND ?

To add comments, please log in or register
Develop applications to order. Make profit using Freelance service!
laurixx
42
laurixx 2015.04.07 16:22 

I want to change line length. At the moment line is full line from the left side of the screen to the right side of the screen. I want them from today to the right side.

At the moment lines made by OBJ_HLINE but I saw somewhere was recommendation to use OBJ_TREND instead of. But If I just change HLINE to TREND, line comes diagonal not horizontal. What I miss?

if(ObjectFind("D_S2 line")!=0)
        {
         ObjectCreate(0,"D_S2 line",OBJ_HLINE,0,time[0],D_S2);
         ObjectSet("D_S2 line",OBJPROP_STYLE,STYLE_SOLID);
         ObjectSet("D_S2 line",OBJPROP_WIDTH,2);
         ObjectSet("D_S2 line",OBJPROP_COLOR,Blue);
        }
      else
        {
         ObjectMove("D_S2 line",0,time[0],D_S2);
Alexander Voronkov
18871
Alexander Voronkov 2015.04.07 18:13  
laurixx:

I want to change line length. At the moment line is full line from the left side of the screen to the right side of the screen. I want them from today to the right side.

At the moment lines made by OBJ_HLINE but I saw somewhere was recommendation to use OBJ_TREND instead of. But If I just change HLINE to TREND, line comes diagonal not horizontal. What I miss?

if(ObjectFind("D_S2 line")!=0)
        {
         ObjectCreate(0,"D_S2 line",OBJ_TREND,0,Time[0],D_S2,iTime(_Symbol,1440,0),D_S2);
         ObjectSet("D_S2 line",OBJPROP_STYLE,STYLE_SOLID);
         ObjectSet("D_S2 line",OBJPROP_WIDTH,2);
         ObjectSet("D_S2 line",OBJPROP_COLOR,Blue);
         ObjectSet("D_S2 line", OBJPROP_RAY,0);
        }
laurixx
42
laurixx 2015.04.07 19:00  
Fillellin:
Thank you, works perfect ;)
To add comments, please log in or register