Questions from Beginners MQL5 MT5 MetaTrader 5 - page 756

 

If you have values C = tg(c) and B = tg(b), then, respectively, angles c = arctg(C) and b = arctg(B).
And then, based on the fact that the sum of angles in a triangle = 180 gr (gr is not grivs, it's degrees:), the angle a = 180 - (b + c) is required;

 
User_mt5:

If you have values C = tg(c) and B = tg(b), then respectively, angles c = arctg(C) and b = arctg(B).
And then, based on the fact that the sum of angles in a triangle = 180 gr (gr is not grivs, it's degrees:), the required angle a = 180 - (b + c);


The scales are different, unfortunately the values of the angles will be inadequate.

 

Hello, currently testing an EA on MT5 - and have a question about the quality of the quotes. For some reason the Euro-Australia H4 quotes are only available from the middle of March 2015, before that only daily quotes. And also the spread is inadequate - 190 pips. As a result I am not able to test the EA properly. I am attaching a screenshot, hope for help.

Files:
1.jpg  704 kb
 
igorbel:

The scales are different, unfortunately the angle values will be inadequate.

Then go back to the problem statement. In what sense do you want to get angles if the scales are different? What exactly do you want to get?

 
User_mt5:

Then go back to the problem statement. In what sense do you want to get angles if the scales are different? What exactly do you want to get?


So it does say what I want to get. I want to know if the angle of the intersection is obtuse or acute. I think I've already found the solution.

Using this formula of triangulation with tangents I find the height of triangle h (in my picture we draw a horizontal segment from angle A to line T0) - the incoming triangle is thus divided into two right angles. Knowing altitude and tangents of angles, I easily find the segments making side a (opposite to angle A), which is divided by altitude. And by the Pythagorean theorem I find the hypotenuse, i.e. side b (opposite angle B) and side c (opposite angle C).

In this way, I find all three sides of the triangle. And there I already use the ratio of squares of sides to determine whether it is obtuse or acute:

If a^2 + b^2 > c^2, then the angle opposing side c will be acute,
If a^2 + b^2 < c^2, the angle opposite to c will be obtuse.

Side c in my case is side a, and the opposite side is the angle A. Something like this :)
Решение треугольников — Википедия
  • ru.wikipedia.org
Решение треугольников (лат.  ) — исторический термин, означающий решение главной тригонометрической задачи: по известным данным о треугольнике (стороны, углы и т. д.) найти остальные его характеристики[1]. Существуют также обобщения этой задачи на случай, когда заданы другие элементы треугольника (например, медианы, биссектрисы, высоты, площадь...
 

Since about 15:00 yesterday, the MICEX quotes are no longer displayed in the demo. What is on forex and not our markets shows normally. What could be the problem?

 
BeforeFlight:

If we uncomment the remaining lines in OnStart() we get "newObjArray - parameter conversion not allowed".

2 questions: why, and how to fix it?

  1. An array of objects cannot be converted. Each element of such an array can, an array cannot.
  2. Templates or an array of pointers of a base class (I didn't check).

 

igorbel:

In this way, I have found all three sides of the triangle. And then I use the ratio of the squares of the sides to determine whether it is obtuse or acute:

If a^2 + b^2 > c^2, then the angle opposing side c will be acute,
If a^2 + b^2 < c^2, the angle opposing side c will be obtuse.

Side c in my case is side a, and the opposite is the angle A. Something like this :)

I guess we are speaking different languages.

Questions:

1. In what units are the sides of a triangle measured in your method?

2. Do you understand that the concept of "angle" implies a specific scale?
The scale changes by stretching and shrinking the price scale (cursor to scale and mouse) and/or the time scale (+ and - keys). If a specific scale is defined (which means that you can name how many points and minutes there are in 1 millimetre of screen), then the solution comes down to elementary geometry (the sides are expressed in millimetres, and then: ratio squares, tangents if you want, etc.).

 
User_mt5:

I guess we speak different languages.

Questions:

1. In what units are the sides of the triangle measured in your methodology?

2. Do you understand that the concept of "angle" implies a specific scale?
The scale changes by stretching and shrinking the price scale (cursor to scale and mouse) and/or the time scale (+ and - keys). If a specific scale is defined (which means that you can name how many points and minutes there are in 1 millimetre of screen), then the solution comes down to elementary geometry (the sides are expressed in millimetres, and then: ratio squares, tangents if you want, etc.).


My methodology is only a theory, which has not yet been proven in practice. Yes, I calculate sides based on values in different units - probably a problem. I'd like to get rid of absolutes altogether and operate only with ratios. What do you have to offer in essence?

The scale changes by stretching and shrinking the price scale (cursor to scale and mouse) and/or the time scale (+ and - keys).
I don't think that's a problem. Yes, visually an acute angle can turn into an obtuse angle or vice versa. But the values remain the same.
 
igorbel:

My methodology is only a theory, which has not yet been proven in practice. Yes, I calculate sides based on values in different units - that's probably a problem. I'd like to get rid of absolute values altogether and operate only with ratios. What do you have to offer in essence?

Essentially - clarify your theory. So far this theory looks like terminological confusion. The solution is not formed simply because the task itself is not clearly formulated. You can argue about how many devils can fit in the eye of a needle. But there's nothing to argue about. You simply have to express the size of the eye and the size of the devil in the same values, for example, in mm, then the solution is simple.

You're trying to assess colour in terms of "heavy" and "warm". That's very difficult. That's why this theory is still in its formative stages.

---------

Actually, there is such a notion as "gradient". It is an indicator that describes the "steepness" (of a graph). In the context of this industry this indicator can be expressed in the dimension of point/time. It is essentially a rate. This indicator will not depend on scale, as it is not attached to the graph. Use a gradient and do not use an angle.

Reason: