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
No I need to get into my code for auto trading.
Can I read that trendline into my code?
No I need to get into my code for auto trading.
Can I read that trendline into my code?
Yes , do you have a screenshot of that trendline ?
Or you want the trendline of the last 10 candles ?
No what I want is I need to determine the slope of the trendline.
Like in this discussion.
No what I want is I need to determine the slope of the trendline.
Like in this discussion.
And the trendline name is "angle" on the chart ?
No from my program, I'll calculate slope of current price trend. Slope is steep, it is trending, so I'll consider to trade.
If slope is not steep, I won't enter trade.
No from my program, I'll calculate slope of current price trend. Slope is steep, it is trending, so I'll consider to trade.
If slope is not steep, I won't enter trade.
Im sorry i'm confused .
Here is an example that get's the price and times of a trendline object , if you don't mean that let me know.
Put it on experts , put it on a chart , draw a trendline object and look at the experts log.
There is no angle from 2 anchor points. An angle requires distance divided by distance; a unit-less number. A chart has price and time. What is the angle of going 30 miles in 45 minutes? Meaningless!
You can get the slope from a trendline: m=ΔPrice÷ΔTime. Changing the price scale, bar width, or window size, changes the apparent angle, the slope is constant. Angle is meaningless.
You can create an angled line using one point and setting the angle (Object Properties - Objects Constants - Standard Constants, Enumerations and Structures - MQL4 Reference.) The line is drawn that angle in pixels. Changing the axes scales does NOT change the angle (and thus is meaningless.)
If you insist, take the two price/time coordinates, convert them to pixel coordinates and then to apparent angle with arctan.
How to get the angle of a trendline and place a text object to it? - Trend Indicators - MQL4 programming forum - Page 2
If it is a double, there is no price and time, only a value, and trying to read from an object is nonsense. Now answer the question.
Can't be done.
There is no angle from 2 anchor points. An angle requires distance divided by distance; a unit-less number. A chart has price and time. What is the angle of going 30 miles in 45 minutes? Meaningless!
You can get the slope from a trendline: m=ΔPrice÷ΔTime. Changing the price scale, bar width, or window size, changes the apparent angle, the slope is constant. Angle is meaningless.
You can create an angled line using one point and setting the angle (Object Properties - Objects Constants - Standard Constants, Enumerations and Structures - MQL4 Reference.) The line is drawn that angle in pixels. Changing the axes scales does NOT change the angle (and thus is meaningless.)
If you insist, take the two price/time coordinates, convert them to pixel coordinates and then to apparent angle with arctan.
How to get the angle of a trendline and place a text object to it? - Trend Indicators - MQL4 programming forum - Page 2
well in theory he/she could get how much atr prior point 1 each bar moves the price by ,with dropping the time calculation though and only going by bars distance from p1.
Then she/he could try and teach the ea what those figures mean since it would be moved out of the "what i see as a human" spectrum