Hello,
How do you do that using Object create?
thanks
OBJ_HLINE uses price as an input.
OBJ_TREND uses time and price
Perhaps you should read the manual. MQL4 Reference → ObjectCreate → ENUM_OBJECT → OBJ_TREND → example code.
How To Ask Questions The Smart Way. (2004)
How To Interpret Answers.
RTFM and STFW: How To Tell You've Seriously Screwed Up.
What I mean is the anchor points.
I think this is my problem. How to use datetime as anchor points. Let just say first coordinate is 930 AM london time. Then my second coordinate is 5 pm london time.
OBJPROP_TIME1 | 0 | datetime | Value to set/get first coordinate time part. |
OBJPROP_TIME2 | 2 | datetime | Value to set/get second coordinate time part. |
What I mean is the anchor points.
I think this is my problem. How to use datetime as anchor points. Let just say first coordinate is 930 AM london time. Then my second coordinate is 5 pm london time.
OBJPROP_TIME1 | 0 | datetime | Value to set/get first coordinate time part. |
OBJPROP_TIME2 | 2 | datetime | Value to set/get second coordinate time part. |
Hello,
How do you do that using Object create?
thanks
Subject: Hline drawn from Time A to Time B.
As these pros pointed out, a particular object of a certain type may use either pixel coordinates or time/price.
Visually an object may be what your looking for but functionally it may not be. Hline uses price only
As William and the other pros here pointed out, when studying the example shown for OBJ_TREND you can also see ObjectMove below and see how time,price is used and declared throughout the example.
Now study Hline and there is no such time/price used. It may visually look like something you want but it may not be.
Trendline can be a Ray in both directions similar to Hline but uses 2 time and 2 price parameters or it can if you want to.
This properties table shows more about this too.
https://docs.mql4.com/constants/objectconstants/enum_object_property
- docs.mql4.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
How do you do that using Object create?
thanks