Discussion of article "Visual strategy builder. Creating trading robots without programming" - page 8

 
Andrey Barinov:

Thanks for the comments!

In your indicator, the panel does not occupy all the space of the chart, so the chart layout does not change. I have a panel on the whole available size, and if I don't change the chart layout, there will be unpleasant artefacts.

The chart scheme doesn't change because it is not necessary. If you need to draw something, a "window" with its own colour background is created under the plot for drawing. And everything is drawn in this window.

The RectLabelCreate function from the MQL description is used. A window is drawn using this function. It can be as large as the whole chart area. Just as it is done in the terminal, when you need to display the menu.

And in case of any changes on the chart, the window is redrawn using the chartevent function. And no artefacts are observed.


The approach to everything is as follows. Someone has done it. And everything works for him. Why can't it work for me? Then I don't understand something. We have to look for the possibility of realisation.

 
mkron:
Will there be a full description or a tutorial? According to the examples, everything seems to be simple, but if you look at the ready-made template with the same crossing MAs, then much is unclear. In the example given in the article, the SL and TP parameters are entered into the icon of opening trades, while in the template these input parameters hang on separate squares with gears. In short, without a normal description, I, as a person far from mql, am afraid to buy.

This case is described in the second example in the article. Why and when it is better to do so.

There will be no tutorial, but the set of tutorials, of course, will be expanded.

If you have any questions about the construction of schemes you can always ask me in a private message, I will be happy to help you understand.

 
Eugeni Neumoin:

The chart layout does not change because it is not necessary. If something needs to be drawn, a "window" with its own colour background is created under the area to be drawn. And everything is drawn in this window.

The RectLabelCreate function from the MQL description is used. A window is drawn using this function. It can be as large as the whole chart area. The same way it is done in the terminal, when you need to display a menu.

And in case of any changes on the chart, the window is redrawn using the chartevent function. And no artefacts are observed.


The approach to everything is as follows. Someone has done it. And it works for them. Why can't it work for me? Then I'm missing something. I have to look for a way to make it work.

Thank you!

By artefacts I meant, for example, time and price scales.

There is no problem to return the chart to its original state, even after changing its properties. I just don't see it as critical yet.

 
Andrey Barinov:

There is no problem to return the graph to its original state, even after changing its properties. It just doesn't seem to be critical yet.

I put your utility on a chart where I had a lot of graphical const ructions. After removing the utility from the chart, all the plots crashed.

That is, I had to reopen the window with a clean chart and draw everything again. Is this normal?

Then the description (in the article) should contain a warning in large red letters at the very beginning that the utility should be run on a clean chart.

 
Eugeni Neumoin:

I put your utility on a chart where I had a lot of graphical const ructions. After removing the utility from the chart, all plots failed.

That is, I had to reopen the window with a clean chart and draw everything again. Is this normal?

Then the description (in the article) should contain a warning in large red letters at the very beginning that the utility should be run on a clean chart.

I apologise for the inconvenience. I will think about fixing this problem.

 

Respect to the author for a great article and product - great work, professional design.

From disadvantages, IMHO - very redundant and confusing structure of sources, I think that this is not a good way for those who want to learn to write code themselves.

In connection with this question - a lot of empty comments, are they recognition markers, and is there any possibility of parsing arbitrary code and converting it back into a schema?

 
Ivan Negreshniy:

Respect to the author for a great article and product - great work, professional design.

From disadvantages, IMHO - very redundant and confusing structure of sources, I think that this is not a good way for those who want to learn to write code themselves.

In this regard, a question - a lot of empty comments, are they recognition markers, and is there any possibility of parsing arbitrary code and converting it back into a schema?

Thanks for your comments!

There is no possibility to automatically convert code back into a schema. But, if necessary, it can be done manually.

The code has a form that I am comfortable reading. The original goal was not to teach people to write code themselves using this application.

 

Great product! Second day working in it almost around the clock. Thank you!

I have a question - is it possible to limit the number of transactions per candlestick? To have only one transaction (opening/closing a position) per candlestick. I often after closing a buy position I immediately open a sell position, and so on, and on one candlestick there can be dozens of such open/close transactions. I understand that it is the algorithm of the Expert Advisor itself, but if there was such a convenient setting - it would be just great.

 
FominDudS:

Great product! Second day working in it almost around the clock. Thank you!

I have a question - is it possible to limit the number of transactions per candlestick? To have only one transaction (opening/closing a position) per candlestick. I often after closing a buy position I immediately open a sell position, and so on, and on one candlestick there can be dozens of such open/close transactions. I understand that it is the algorithm of the Expert Advisor, but if there was such a convenient setting - it would be great.

Such a limitation can be done in different ways. You really need to look at the algorithm.
1. There is an element "new bar". Sometimes it can be useful for this purpose.
2. You can check the history, and see how many trades have been opened since the beginning of the candle. If it is more than 0, then do not open any more.
3. You can use the Variable element as a trigger / flag that a position has already been opened.

Try
 
I have been waiting for this feature for a long time.. 😅😅😅
Kudos to the developer. Hopefully MetaTrader can implement this feature in their next version release without having to download it from the marketplace.. 🤗


1st comment! Yay!