Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1569

 

Alexey Viktorov:

bool  ChartGetInteger( 
   long    chart_id,        // идентификатор графика 
   int     prop_id,         // идентификатор свойства 
   int     sub_window,      // номер подокна 
   long&   long_var         // сюда примем значение свойства 
   );

with identifiers CHART_PRICE_MIN and CHART_PRICE_MAX

CHART_FIXED_MAX

Chart fixed maximum

double

CHART_FIXED_MIN

Chart fixed minimum

double


How were you going to get the values ofdouble, with

bool ChartGetInteger

or

long ChartGetInteger

you are a documentation expert?

You also advised CHART_PRICE_MINand CHART_PRICE_MAX to get the values of min and max oscillator, which have their own data. :) Well... Well, if it isn't the expert in MQL documentation... :)

We study the documentation not attentively. But there is no understanding. Not because of this, but because of poor knowledge of the concept of programming and MQL in particular!

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

CHART_FIXED_MAX

Chart fixed maximum

double

CHART_FIXED_MIN

Chart fixed minimum

double


How were you going to get the values ofdouble, with

or

you are a documentation expert?

You also advised CHART_PRICE_MINand CHART_PRICE_MAX to get the values of min and max oscillator, which have their own data. :) Well... Well, if it isn't the expert in MQL documentation... :)

We study the documentation not attentively. But there is no understanding. Not because of this, but because of poor knowledge of the concept of programming and MQL in particular!

Actually yes, not a lot wrong, but I figured it out,

ChartGetDouble(0,CHART_PRICE_MIN,1));

ChartGetDouble(0,CHART_PRICE_MAX,1));

so it does what I need.

Now a new question, how to visualize the indicator out of the Expert Advisor? I.e. with this variant, I have to load the indicator manually, or the result shows 0.

 
AMarkov:

Actually yes, not much is wrong, but I figured it out,

ChartGetDouble(0,CHART_PRICE_MIN,1));

ChartGetDouble(0,CHART_PRICE_MAX,1));

does what it should.

And you're trying to get min and max values in the oscillator, not in the chart...? :)

Why write, that you need oscillator's values and not the chart's, if your problem definition changesso sharply?

I also gave you the code for the oscillator. It works very well. Foolishness...

 

Good day to you! I paid my EA rent but the payment was frozen for 7 days, can you explain what this is about?

 
1369190:
Good day to you! I paid for my EA, but the payment was frozen for 7 days, can you explain why?
Everything is written
Правила покупки торговых роботов, индикаторов, книг и журналов в MetaTrader Market
Правила покупки торговых роботов, индикаторов, книг и журналов в MetaTrader Market
  • www.mql5.com
Общие положения и правила пользования сервисом Market
 
Mihail Matkovskij:

And this is you trying to get min and max values in the oscillator, not in the chart?

I got the values I needed using the method above. But the thing is that these values can only be obtained when I manually load them on the indicator chart (in the tester in particular). I don't know how to load not only the indicator buffer, but also how to visualize it from the EA.

 
AMarkov:
I got the values I need by the method above. But the thing is that these values can be obtained only when you manually load them on a chart of an indicator (in the tester in particular). But I don't know how to load not only the indicator buffer, but also how to visualize it from the EA).
TesterHideIndicators(false);

Only the indicator has to be created programmatically.

Although created indicators are shown in the Expert Advisor at https://www.mql5.com/ru/docs/common/testerhideindicators anyway.

Документация по MQL5: Общие функции / TesterHideIndicators
Документация по MQL5: Общие функции / TesterHideIndicators
  • www.mql5.com
TesterHideIndicators - Общие функции - Справочник MQL5 - Справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
TesterHideIndicators(false);
Alas, it doesn't work. The indicators are only shown when stopped.
 
AMarkov:
Alas, it doesn't work. The indicators are only shown when stopped.

https://www.mql5.com/ru/docs/common/testerhideindicators

And there is an interesting possibility to hide indicators selectively.

You can also write an oscillator visualiser on Canva. I gave you the basisat https://www.mql5.com/ru/forum/160683/page1569#comment_23835904.

Документация по MQL5: Общие функции / TesterHideIndicators
Документация по MQL5: Общие функции / TesterHideIndicators
  • www.mql5.com
TesterHideIndicators - Общие функции - Справочник MQL5 - Справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
Mihail Matkovskij:

https://www.mql5.com/ru/docs/common/testerhideindicators

And there is an interesting possibility to hide indicators selectively.

You can also write an oscillator visualiser on Canva. I gave you the basisat https://www.mql5.com/ru/forum/160683/page1569#comment_23835904.

Thank you again for your input, but it was the vertical visual scale of my oscillator that I wanted. I got what I needed. But the subbokno (visualisation of the indicator) needs to be called manually, that's the bad thing. I do not know how to visualize the indicator from the Expert Advisor. I.e., when I install the Expert Advisor on a chart, the indicator is automatically displayed.
Reason: