- Aung Swar: As we know trendline object create use only int value and bar count.
Wrong. A trendline requires two coordinates: a price (double) and a time (datetime).
-
ObjectCreate("buyline",OBJ_TREND,0,Time[(int)yesterdayHigh],High[(int)yesterdayHigh],Time[(int)Prev4HHigh],High[(int)Prev4HHigh]);
YesterdayHigh is a price, like 0.95123. You can't use the current timeframe (Time[]) with that. Get the real time (iTime).
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
Hello every coders
Good day to you all.
I need some idea help.
As we know trendline object create use only int value and bar count.
I get problem when I try to draw a trendline from previous day high double value to 4hour high double value in 1hour timeframe.
Please see picture. I want to draw like this.
Yellow line is previous day high and green line is 4hour high and red trendline is to connect this swing point to draw trendline to confirm that is downtrend.
Here is my codes
No trendline on chart because double value change to int get only bar count (example 0 or 1).
This cannot be use in 1hour time frame
I know how to change double to int value as follow.
But this output 1 0r 0 not useful.
How can draw trendline from previous day high double value to 4hr high double value in object create function.
Please suggest me
Thanks for any help and appreciate that.