Angle of trendline

 

My Obj_trend starts from price1, time1 and extends to price2, time2

Please share the formula to derive angle from price1,time1 to price 2,time2 in degree unit

Documentation on MQL5: Constants, Enumerations and Structures / Objects Constants / Object Types
Documentation on MQL5: Constants, Enumerations and Structures / Objects Constants / Object Types
  • www.mql5.com
Object Types - Objects Constants - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Arpit T:

My Obj_trend starts from price1, time1 and extends to price2, time2

Please share the formula to derive angle from price1,time1 to price 2,time2 in degree unit

Angles are meaningless as they will change when chart is zoomed or price range changes.

 
Keith Watford #:

Angles are meaningless as they will change when chart is zoomed or price range changes.

ok so what is OBJPROP_ANGLE is being used? i just want that, regardless if it changes or not

i want to have it read like this
 
Arpit T #:

ok so what is OBJPROP_ANGLE is being used? i just want that, regardless if it changes or not

i want to have it read like this

As ! believe that trendline angles are useless, I can't assist. I never use angles with trendlines.

 

Angle in regards to Forex chart or Stock chart changes depending on your monitor size (i.e. screen resolution) and size of chart in your screen.

Angle you are looking at is not necessarily the same angle other will do.


If you are in doubt, do a simple experiment.

For example, draw a triangle in your chart and see how the height of triangle is changed as you stretch or reduce the height of chart.

If you still believe the angle is important after this exercise, I can not stop you using the angle.

Kind regards.

 
But isn't this only true for the naked eye?

While an angle is calculated by Pythagoras, sine and cosine and the input values don't change, the angle will stay the same value?

Meaning, if I put in seconds as distance from left to right, and price from bottom to top, using points as price distance, I get a triangle. These values won't change, or do they??

Then I should be able to construct a persistent triangle and therefore also get persistent angles.

Although these values don't change, their displaying does, depending on scale of price and time.

But the underlying angles calculation should always give the same results.
 
Dominik Christian Egert #:
But isn't this only true for the naked eye?

While an angle is calculated by Pythagoras, and the input valu s don't change, the angle will stay the same value?

Meaning, if I put in seconds as distance from left to right, and price from bottom to top, using points as price distance, I get a triangle. These values won't change, or do they??

Then I should be able to construct a persistent triangle and therefore also get persistent angles.

Although these values don't change, their displaying does, depending on scale of price and time.

But the underlying angles calculation should always give the same results.

You are talking about slope, not angles and yes, slope is consistent

 
Dominik Christian Egert #:
But isn't this only true for the naked eye?

While an angle is calculated by Pythagoras, sine and cosine and the input values don't change, the angle will stay the same value?

Meaning, if I put in seconds as distance from left to right, and price from bottom to top, using points as price distance, I get a triangle. These values won't change, or do they??

Then I should be able to construct a persistent triangle and therefore also get persistent angles.

Although these values don't change, their displaying does, depending on scale of price and time.

But the underlying angles calculation should always give the same results.


It is good that you have distinguised between displaying value and slope. However, the problem could be beyond the displaying value.

For example, we do not know how much price should be equte to one second because there is no scientific reference for this.

There can be too many choices from here opening up subjectivity.

Some people might equite 1 tick to one second but some other can equite 10 ticks to one second.

Likewise, some people can equite 1 tick to one mintue but some other can equte 10 ticks to one minute. 

Even worse, some people can equte 1 tick to 10 seconds but some other can equte 1 tick to one milliscond. 

Depending on what you think is useful, there is no clear answer on this.

In addition, usefulness of this slope can be all changed depending on the data per timeframe and per symbol.


The same idea was visited by people who studied Gann's method including myself.

Due to the same reason, I given up on this 45 degree in Gann's angle many years ago. 

You can read this third section: Question of Scale in this wikipedia.

https://en.wikipedia.org/wiki/Gann_angles


For your information, I did not write this wikipedia document but someone else did it.


However, after all these points, some people still use the 45 degree in Gann's angle. 

If you like to use, then we can not stop you using them.

 
Arpit T:

My Obj_trend starts from price1, time1 and extends to price2, time2

Please share the formula to derive angle from price1,time1 to price 2,time2 in degree unit

Hi Arpit. You need to think about this slightly differently. I suggest you think in terms of gradients rather than angles. The gradient is then simply the change in price divided by the time taken for that change to occur. The steeper the gradient the stronger the trend. The shallower the gradient, the weaker the trend. Positive gradients indicate up trends and negative gradients indicate down trends.

However there is an important point here. Taking this simple approach will allow you to compare the strength of trendlines like-for-like across a single symbol within a short period of time. If you want to compare trend strengths across multiple symbols that trade at very different price values (or much longer periods of time where the price varies significantly), this won't work well and you'll need to convert the 'change in price' to a percentage (of the instruments value). This then allows you to compare like-for-like across instruments that trade at very different price values such as USDJPY (135.192) and EURUSD (1.05590).

Hope this helps.

 
Keith Watford #:

Angles are meaningless as they will change when chart is zoomed or price range changes.

I believe angles are very important part in making highly precise trading decisions, however scaling may be important but there are methods available to scale a chart as per Gann's method

They are also useful in study when technical analysis is done from one high to second high or one low to second low for measuring time similar to the methods explained by Carolyn Boroden

These gives us insight of aggressiveness in price for further studies

 

Try to help further and to summarize what I have got to.


Angle in degree and radian can be definitive when we talk about the same scale in both X axis and Y axis.

For example, if the measuring unit in X axis and Y axis are identical like the meter or centimeter, then the angle can be definitive. 

However, the measuring unit in X axis and Y axis are different, then it could be not the case.


Hope this is helpful just in case that some one revisting this question and they need a short answer on the same question.


So if the measuring unit in X axis and Y axis are different, then just like some one suggested the slope (or gradient) could be one alternative. 

However, volatility may be another alternative.

For trading, the geometric volatility might be much better alternative to anything else because you can equte price and time in the same scale.

Reason: