Questions from Beginners MQL5 MT5 MetaTrader 5 - page 173

 
snowman647:
I have 20 standard МА and several indicators in my Expert Advisor. How to make them not hinder to see the chart during testing with visualization?
Another variant - when binding indicator buffers, declare them as INDICATOR_CALCULATIONS instead of INDICATOR_DATA.
Усреднение ценовых рядов без дополнительных буферов для промежуточных расчетов
Усреднение ценовых рядов без дополнительных буферов для промежуточных расчетов
  • 2010.10.25
  • Nikolay Kositsin
  • www.mql5.com
Статья о традиционных и не совсем традиционных алгоритмах усреднения, упакованных в максимально простые и достаточно однотипные классы. Они задумывались для универсального использования в практических разработках индикаторов. Надеюсь, что предложенные классы в определенных ситуациях могут оказаться достаточно актуальной альтернативой громоздким, в некотором смысле, вызовам пользовательских и технических индикаторов.
 

Hello. Could you please tell me how to replace text from Comment() function? I have Comment() in int init() and I want a different text to appear in int start(). Can I just call it again and give new parameters? In this case the old parameters will be erased? And I need this to work in mql 4 code.

Документация по MQL5: Общие функции / Comment
Документация по MQL5: Общие функции / Comment
  • www.mql5.com
Общие функции / Comment - Документация по MQL5
 
How do I get the time of the found item using theArrayMaximum function?
 
barabashkakvn:
Ah, well, you should be more precise in your requests. Now it's counting correctly.

Good afternoon!

For comparison, I am attaching two pictures, one from MQL4 where my indicator is displayed (moving outside the midline) and one from MQL5.

I don't know why it does that. I do not know MQL5 very well. Probably the value is lost somewhere. The charts are 15 minute charts on the current date.

MQL4 MQL5

 
Please tell me how to bind the trading signals to a real trading account on the platformuTrader TP, the problem is that when you sign up in the login window pops up a comment that the username of the trading account can only be digital. and I have a login is the name of my mailbox. How, in this case, connect the robot to your real trading account?
Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Информация о счете
Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Информация о счете
  • www.mql5.com
Стандартные константы, перечисления и структуры / Состояние окружения / Информация о счете - Документация по MQL5
 
forexman77:

Good afternoon!

For comparison, I am attaching two pictures, one from MQL4 where my indicator is displayed (moving outside the midline) and one from MQL5.

I don't know why it does that. I do not know MQL5 very well. Probably the value is lost somewhere. The charts are 15 minute charts on the current date.

MQL4 MQL5

Give name of currency pair, timeframe and date period on which the screenshot is taken
 
barabashkakvn:
Give the name of the currency pair, the timeframe and the date period on which the screenshot is taken
EURUSD currency, bar where the line is broken 2014.01.10, 15 minute chart (current chart)
 
forexman77:
EURUSD currency, bar on which the line is broken 2014.01.10, 15 minute chart (current chart)
Look carefully at the MQL4 code of the indicator. It does not just subtract price and indicator value. When you understand from the code what the indicator calculates, I think you will immediately be able to make changes in the MQL5 indicator.
Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Информация о запущенной MQL5-программе
Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Информация о запущенной MQL5-программе
  • www.mql5.com
Стандартные константы, перечисления и структуры / Состояние окружения / Информация о запущенной MQL5-программе - Документация по MQL5
 
barabashkakvn:
Look carefully at the MQL4 code of the indicator. It does not just subtract price and indicator value. When you understand what is calculated by the indicator, I think you will be able to make changes in MQL5 indicator.

It gets the difference between the current price and the moving average. Although yes, I made a mistake, I used the maximum average line instead of the moving average.

But the breakdown of zero line is still there and in MQL5 it is not. I updated above pictures (moving average for calculation without shifts in 34 periods by kloz, red line,

in upper window, left graph, line in the middle). The same is obvious take the 34 period closing moving average and compare it to the 15 minute bar closing on October 10, 2014 and

you will see that the difference is 33 pips on a four-digit euro quote.

I know the code of the indicator in MQL4 well, as I made it myself.

 
forexman77:

It gets the difference between the current price and the moving average. Although yes, I made a mistake, I used the maximum average line instead of the moving average.

But the breakdown of zero line is still there and in MQL5 it is not. I updated above pictures (moving average for calculation without shifts in 34 periods by kloz, red line,

in upper window, left graph, line in the middle). The same is obvious take the 34 period closing moving average and compare it to the 15 minute bar closing on October 10, 2014 and

you will see that the difference is 33 pips on a four-digit euro quote.

I know the code of the indicator in MQL4 well as I made it myself.

Comparison of the two terminals

MQL5 indicator now calculates correctly and economically.

Files:
test.mq5  3 kb
Reason: