A request to developers for the ability to draw trend lines or trend channels in MetaTrader 5 based on angles with a precision of 12 decimal places.

 

Hello,

I have a request/suggestion for the developers.

Please implement a feature for drawing trend lines or trend channels in MetaTrader 5 that allows for precise drawing—accurate to 10–12 decimal places—by inputting a specific angle value (using a consistent scale across all timeframes and zoom levels).

Thank you for your attention; I look forward to your response.


سلام

من از توسعه دهندگان درخواستی در قالب یک پیشنهاد دارم.

لطفا برای رسم خطوط ترند یا کانالهای ترند در متاتریدر۵ امکانی را ایجاد کنید بصورتی که بتوان با وارد کردن مقدار زاویه  ( بصورت مقیاسی واحد  درهمه تایم فریم ها و همه سطوح زوم )  با دقت ۱۰-۱۲ رقم اعشار رسم خطوط یا کانال ها را انجام داد.

باتشکر از توجه تان منتظر پاسخگویی شما هستم 

Documentation on MQL5: Object Types / Constants, Enumerations and Structures
Documentation on MQL5: Object Types / Constants, Enumerations and Structures
  • www.mql5.com
When a graphical object is created using the ObjectCreate() function, it's necessary to specify the type of object being created, which can be one...
 
MT5's built-in angle tool fails at this because it measures the angle in screen pixels, so 30° on H1 isn't 30° on M15 or after you zoom, and you want the angle to be fixed property of the line . 
 
Seyyed Masoud Nasrollah zadeh:
Please implement a feature for drawing trend lines or trend channels in MetaTrader 5 that allows for precise drawing—accurate to 10–12 decimal places—by inputting a specific angle value...

12 digits are supported in the following trendline script:

AngleTrendLineStatic Script for MT5
AngleTrendLineStatic Script for MT5
  • www.mql5.com
Here is trendline generating script that has an input, Angle deg , that allows up to 89.999999999999 degrees to be set for an upward angle, and down to -89.999999999999 degrees to be set for a
 
Victor Paul Hamilton #:
MT5's built-in angle tool fails at this because it measures the angle in screen pixels, so 30° on H1 isn't 30° on M15 or after you zoom, and you want the angle to be fixed property of the line . 
If that is the correct interpretation of the OP's request, it strikes me as impossible. Any line, by definition, requires 2 points. I don't see how both points can be transferred to a different size x or y axis while maintaining a persistant angle.
 
  1. 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!

  2. You can get the slope from a trendline: m=ΔPrice÷ΔTime or m=ΔPrice÷Δ(bar index). Changing the price scale, bar width, or window size, changes the apparent angle, the slope is constant. Angle is meaningless.

  3. 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.)

  4. 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

 
William Roeder #:
  1. 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!

  2. You can get the slope from a trendline: m=ΔPrice÷ΔTime or m=ΔPrice÷Δ(bar index). Changing the price scale, bar width, or window size, changes the apparent angle, the slope is constant. Angle is meaningless.

  3. 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.)

  4. 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

Converting to pixels and taking the arctan gives the apparent angle, which changes with zoom. That's the very behaviour the original poster was complaining about, so it's the wrong direction for his request.

Fair to say it could just as well be called a slope, with the angle only a convenient way to type it in. The substance is the same.

So let's call it a slope but you are correct and make good points  on all fronts 
 
William Roeder #:
You can create an angled line using one point and setting the angle (Object Properties - Objects Constants - Standard Constants, Enumerations and Structures - MQL4 Reference.)

Here is the MQL5 "version" of that in an indicator:

AngleTrendLineKeep Indicator for MT5
AngleTrendLineKeep Indicator for MT5
  • www.mql5.com
Here is a trendline generating indicator that has an input, Angle deg , that allows up to 89.999999999999 degrees to be set for an upward angle, and down to -89.999999999999 degrees to be set for a