Questions from Beginners MQL5 MT5 MetaTrader 5 - page 315

 
Kronos1026:

Hello, I have a question: I need an EA on mql5 to visually display the data calculated by it on a chart as a line. i.e. the EA returns the predicted price value for each bar. how to implement this exactly from the EA. Thank you in advance for your help.


p.s. The data calculated by the EA (prices) is stored in an array.

https://www.mql5.com/ru/docs/constants/objectconstants/enum_object

Документация по MQL5: Стандартные константы, перечисления и структуры / Константы объектов / Типы объектов
Документация по MQL5: Стандартные константы, перечисления и структуры / Константы объектов / Типы объектов
  • www.mql5.com
Стандартные константы, перечисления и структуры / Константы объектов / Типы объектов - справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
What type of object to use (essentially I have an array of points that need to be connected by a line)
 
Kronos1026:
What type of object to use (essentially I have an array of points that need to be connected by a line)

https://www.mql5.com/ru/docs/constants/objectconstants/enum_object/obj_trend

Документация по MQL5: Стандартные константы, перечисления и структуры / Константы объектов / Типы объектов / OBJ_TREND
Документация по MQL5: Стандартные константы, перечисления и структуры / Константы объектов / Типы объектов / OBJ_TREND
  • www.mql5.com
Стандартные константы, перечисления и структуры / Константы объектов / Типы объектов / OBJ_TREND - справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 

Trending is good, but here's a question:

how can, or what can replace the trend line, be used to draw a line connecting points (some values) with coordinates in pixels rather than time/price. I can draw a histogram, but how can I draw a line?

The trend line can of course be used by converting the values to another coordinate system, but then this line drawn on the graph, the bastard, moves with the graph and does not stay in the correct coordinates when the graph is shifted.

 
artmedia70:

Trend is good, but here's a question:

how can, or what can replace the trend line, be used to draw lines connecting points (some values) with coordinates in pixels rather than time/price. I can draw a histogram, but what about a line?

Of course, a trend line can be used by transforming values into a different coordinate system, but then, this line drawn on the chart moves together with the chart and does not stay in the correct coordinates when the chart is shifted.

haven't tried that

ChartXYToTimePrice()
 
artmedia70:

Trend is good, but here's a question:

how can, or what can replace the trend line, be used to draw a line connecting points (some values) with coordinates in pixels rather than time/price. I can draw a histogram, but what about a line?

The trend can of course be used by converting the values to another coordinate system, but then this line drawn on the chart, the bastard, moves along with the chart and does not stay in the correct coordinates when the chart is shifted.

try this one, it shows coordinates at the top

the trend is pixel by pixel x1=100,y1=100,x2=680,y2=450

Only there are no ticks now, move the mouse over the chart.

Files:
trendyx.ex5  7 kb
trendyx.ex4  8 kb
 

Please advise how to download the indicator. I press the download button, a window pops up asking if mt5 is installed or not, I press installed, then nothing happens.

 
Motor11:

Please advise how to download the indicator. I press the download button, a window pops up asking if mt5 is installed or not, I press installed, then nothing happens.

Download from the terminal itself - all this is in the terminal, what you see here on the site - tabs in the terminal market or library
 
Motor11:

Please advise how to download the indicator. I press the download button, a window pops up asking if mt5 is installed or not, I press installed, then nothing happens.

Please, what browser do you use to download and what operating system do you use?
 
pako:

Try this one, at the top it says

the trend is pixel by pixel x1=100,y1=100,x2=680,y2=450

only there are no ticks now, move the mouse over the chart

How does ex4 help?
Reason: