I will write an advisor free of charge - page 160

 
Kedrov #:

Thanks for the reply!

Tried per c 2 and either alternately removed 2 or changed it to 1. Nothing worked.

Then took the NOT OPCOMPILED one - installed it, checked it - all fine.

Then just RECOMMENDED it, without going into the code at all. And everything came back. The vertical line returned. Does that mean that the compilation is to blame, or not?

The point is that the compiled indicator always goes to the chart. Therefore, the compilation is not to blame.

Either 0 or a random negative number is written into the buffer that draws such a line.

By the way, check with other parameters. And I will look at the code in detail in the evening


And per - it doesn't need to be changed to numbers at all.

 
Maksim Sovenko #:

The point is that you always have a compiled indicator going to the chart. Therefore the compilation is not to blame.

Either 0 or a random negative number is put into the buffer, which draws such a line.

By the way, check with other parameters. And I will look at the code in detail in the evening


And per - it doesn't need to be changed to numbers at all.

Thanks for the reply, Maxim!

I have some questions:

When I install the indicator in a data catalogue and then update the base through the indicators panel or just turn off and on the terminal, it is the same compilation, theoretically. But the indicator works after such compilation.

But when I compile through the editor, it doesn't work. It's strange for me, I don't understand it at all.

"andper- it doesn't need to be changed to numbers at all" - so I didn't change it to numbers. I was changing the digits that were in conjunction with per. For example, per/2.0. I've exercised in such cases, but it didn't work.

And thank you very much for - "And I'll look at the code in detail tonight".

I got cheeky, Maxim, but I want to ask one more question - is it possible, theoretically, to attach not a price, but an object - a circle - to МА end?

I used it to denote EMA 50, for clarity - see the picture in the picture. EMA 50 has been marked by moving-average-ribbon indicator with periods of 40 and 60. Then I had an idea to replace this circle with the price, because while changing TF the circle does not coincide with the indicator and the size of the circle is too weird.

Well, now I have gone further - why don't we replace the price at EMA with the price of the circle?

But it is all theoretical investigation. I am not ready to make a final decision yet. The price is enough, for now.

Thank you for your responsiveness!

I will wait for the results of your code review.

Good luck!

Regards,

Alexander

Files:
snrv.jpg  75 kb
 
Are there any experts in the Pine language? I need to recompile an indicator from PINE into MQL5 and make an Expert Advisor based on it
 
AHors #:
Are there any experts in Pine? I need to recompile an indicator from PINE into MQL5 and make an Expert Advisor based on it

there is

https://www.mql5.com/ru/job

Торговые приложения для MetaTrader 5 на заказ
Торговые приложения для MetaTrader 5 на заказ
  • 2021.11.17
  • www.mql5.com
Самый большой фриланс c разработчиками программ на MQL5
 
Mehroj1234 #:
Hello, I need to create a simple robot based on the zig zag indicator to put limit orders on highs and lows. Anybody who is more or less available to help, at least with advice. Thanks in advance,

You would first understand the algorithm of the zigzag, when the extremum appears and where the price is at that moment, and more precisely at which extremes the limiters are needed, at the last, or earlier. And where the price should be at that time, it will not necessarily be between the last two extrema, the zigzag will be redrawn. Describe the algorithm more precisely.

 
Maksim Sovenko #:

..... I'll look at the code in detail tonight

Good afternoon Maxim!

Sorry it didn't work out. And I was so hoping, including the advice regarding the "circle"!

Good luck!

 
How do I draw a line (ray) from an extremum to an extremum? How does ZigZag do it

There are coordinates - low and high prices
 
Ivan Butko #:
How do I draw a line (ray) from extremum to extremum? How does ZigZag do it

There are coordinates - low and high prices

Resolved.

 
Kedrov #:

Good afternoon, Maxim!

I'm sorry it didn't work out. And I was so hopeful, including the advice regarding the "circle"!

Good luck!

Hello, Alexander. On a business trip, no terminal at hand.

On the Circle. I need to write a script or an indicator that will redraw the object when the price, timeframe changes.

Example of construction here:https://docs.mql4.com/ru/constants/objectconstants/enum_object/obj_ellipse

OBJ_ELLIPSE - Типы объектов - Константы объектов - Константы, перечисления и структуры - Справочник MQL4
OBJ_ELLIPSE - Типы объектов - Константы объектов - Константы, перечисления и структуры - Справочник MQL4
  • docs.mql4.com
OBJ_ELLIPSE - Типы объектов - Константы объектов - Константы, перечисления и структуры - Справочник MQL4
 
Can someone write a scriptor in mt5, which, after running, gives a list of available instruments with bdb bar? Bdb bar, it is also reversal, with a minimum below the previous and closing in the top 30% and vice versa, above and closing in the bottom 30%. There are about 3 thousand instruments.