-
Define "failed"
"Doesn't work" is meaningless — just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires — meaningless.
How To Ask Questions The Smart Way. 2004
When asking about codeDo you really expect an answer? There are no mind readers here and our crystal balls are cracked.
How To Ask Questions The Smart Way. 2004
Be precise and informative about your problem -
Your indicator only has one buffer. It only puts a MA there. What do you expect to read? Define "failed"
- It also creates a trendline by angle which is useless.
-
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
-
-
Define "failed"
"Doesn't work" is meaningless — just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires — meaningless.
How To Ask Questions The Smart Way. 2004
When asking about codeDo you really expect an answer? There are no mind readers here and our crystal balls are cracked.
How To Ask Questions The Smart Way. 2004
Be precise and informative about your problem -
Your indicator only has one buffer. It only puts a MA there. What do you expect to read? Define "failed"
- It also creates a trendline by angle which is useless.
-
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
-
thanks for advice!
finally i edited icustom side source but still couldn't read value from ma_angle indicator.
please check
thanks for advice!
finally i edited icustom side source but still couldn't read value from ma_angle indicator.
please check
resolved
iCustom(NULL, 0, "Angle", 10, 3, clrBlue, 21, 0, 0, 1, 0)Good like reading the second buffer from an indicator with only one.
- 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.
actually i'm almost new to mql4 programming.
i have a angle indicator which is using MA and inside other EA i want to call this angle indicator and want to read angle value so i tried iCustom but every i tried all failed.
following is ma_angle source.
and this is icustom code what i tried.
double xx = iCustom(NULL, 0, "ma_angle",10,3,AliceBlue,21,0,0 ,0, 0);
Print("aaa "+xx);
anyone help much appreciate!