Download MetaTrader 5
To add comments, please log in or register
Publish your application in Cobe Base. Millions of traders will see it!
Dua Yong Rew
5399
Dua Yong Rew 2012.09.24 07:22 

Hi,

I have the codes to draw a horizontal trend line


datetime dt[];

ArraySetAsSeries(dt, true); 

if(CopyTime(Symbol(), PERIOD_D1, 0, 2, dt) <= 0) return(0); 

ObjectCreate(0, objname, OBJ_TREND, 0, dt[0], price, dt[1], price);

 

It draws a horizontal line from today's open hour to yesterday's open hour

but I want to draw from today's open to now (all the way to the right of the chart) 


Any idea? 

Documentation on MQL5: Standard Constants, Enumerations and Structures / Objects Constants / Object Types
Documentation on MQL5: Standard Constants, Enumerations and Structures / Objects Constants / Object Types
  • www.mql5.com
Standard Constants, Enumerations and Structures / Objects Constants / Object Types - Documentation on MQL5
Dua Yong Rew
5399
Dua Yong Rew 2012.09.25 03:19  

I somehow got it.

I added 24 * 60 * 60 to today's time

onewithzachy
2271
onewithzachy 2012.09.25 03:39  

Hi doshur,

I thought what you need is ObjectSetInteger() with OBJPROP_RAY_RIGHT or some PeriodSecond() to the right - click that.

 

-->> 911 <<--

 

Dua Yong Rew
5399
Dua Yong Rew 2012.10.13 10:46  
onewithzachy:

Hi doshur,

I thought what you need is ObjectSetInteger() with OBJPROP_RAY_RIGHT or some PeriodSecond() to the right - click that.

 

-->> 911 <<--

 

PeriodSecond() is useful

Thanks 

/
To add comments, please log in or register