Mpfx,
The OBJ_HLINE it's just a line without start/end.
You have to use OBJ_TREND to create a line with a defined start and end
The OBJ_HLINE it's just a line without start/end.
You have to use OBJ_TREND to create a line with a defined start and end
ObjectCreate("Line1", OBJ_TREND, 0, Time[20], Low[20], Time[0], Low[20]); ObjectSet("Line1", OBJPROP_COLOR, Blue ); ObjectSet("Line1", OBJPROP_RAY, 0 ); ObjectCreate("Line2", OBJ_TREND, 0, Time[20], High[20], Time[0], High[0]); ObjectSet("Line2", OBJPROP_COLOR, Red ); ObjectSet("Line2", OBJPROP_RAY, 0 );
Hope this help.
Matias Romeo
Custom Metatrader Systems
matiasdotromeoatgmail.com
Thanks Matias,
Much apprieciated, will try it out.....
Much apprieciated, will try it out.....
mpfx,
Since datetime variables represents the numbers of seconds since 00:00 January 1, 1970.
You can substract the numbers of seconds that a day represents ( 86400 = 24*60*60 ) times n (n=7).
Below is a script sample.
Since datetime variables represents the numbers of seconds since 00:00 January 1, 1970.
You can substract the numbers of seconds that a day represents ( 86400 = 24*60*60 ) times n (n=7).
Below is a script sample.
//+------------------------------------------------------------------+ //| script program start function | //+------------------------------------------------------------------+ int start() { datetime date = D'2005.05.09'; date -= 7*24*60*60; Print( TimeToStr(date) ); return(0); }
Hope this help
Matias Romeo
Custom Metatrader Systems
matiasdotromeoatgmail.com
Matias,
Once again a big Thank You, it was exactly what I needed, your help has been very much apprieciated :)
Good Trading to you..........
Once again a big Thank You, it was exactly what I needed, your help has been very much apprieciated :)
Good Trading to you..........
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
Or is there any method or code for assigning a starting point to a OBJ_HLINE ?
Thanks...