Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 968

 
Afternoon. On the W1 timeframe each bar has a real calendar Sunday date despite the fact that it opens at Monday prices. What is this oddity related to?
 
abeiks:
Good afternoon!
I need to measure and compare the distance between two MA lines. The unit of time and the unit of price are not suitable for measuring the distance. How do I measure distances in an MT4 chart?
Only in pips at the same time!
 

Good afternoon.

How can I get the maximum and minimum MACD value for a certain number of bars (e.g. 1000)? These values should then be used in the code to calculate formulas.

 
Red_Manticore:

Good afternoon.

How can I get the maximum and minimum MACD value for a certain number of bars (e.g. 1000)? These values should then be used in the code to calculate formulas.

See in the Documentation, in MetaEditor Help or search for: Highest() and Lowest(), which determine the bar number, and paste into High() and Low() to find the values you need!
 
borilunad:
See Documentation, Help in MetaEditor or search: Highest() and Lowest(), which define the bar number, and paste in High() and Low(), you will find the values you need!
But I need to get the high low of the indicator! MACD, not prices.
 
abeiks:
Good afternoon!
I need to measure and compare the distance between two MA lines. The unit of time and the unit of price are not suitable for measuring the distance. How do you measure distances in an MT4 chart?
Function: ChartTimePriceToXY
https://docs.mql4.com/ru/chart_operations/charttimepricetoxy

Input the value of MA, get the coordinates of a pixel in relation to the chart window, and then write an algorithm for calculating the distance between the two points.

 
Red_Manticore:
But I need to get the high low of the indicator! MACD, not prices.
See the documentation for array operations.
 
SunnYtheDreamer:
Function: ChartTimePriceToXY
https://docs.mql4.com/ru/chart_operations/charttimepricetoxy

Pass the MA values into it, get the pixel coordinates relative to the chart window, and then write an algorithm for calculating the distance between the two points.

How can you calculate the pixel if the chart is vertical? Only by pips!
 
borilunad:
How can you pixel if the graph is vertical? Only by pips!
You can remember the visible prices and times on the chart and compare them as soon as the chart stretches or something else and the visible areas decrease or increase. You can also place invisible labels on the chart at a certain distance, memorize the distance, and compare.
 
borilunad:
How can you pixel if the graph is vertical? Only by pips!
The scale can be fixed or the distance can be recalculated when the scale is changed. I don't know exactly why it needs to measure distances so specifically, but apparently it does. Although, maybe he just can't apply price units because they are double, and he needs int, but the question is not posed that way.