My approach. The core is the engine. - page 80

 
Александр:

Should your post be taken as an application to participate in the implementation?

I was looking at this thread too, but you don't seem to have read my previous post carefully.

If through freelancing, please do. What is the budget? At what point did it seem to you that I was reading inattentively?

 
Dmitry Fedoseev:

If through freelancing, please do. What's the budget? At what point did you think I wasn't reading carefully?

I'll refrain from suggesting freelancing.

I'll refrain from paying attention here:

Forum on trading, automated trading systems, and strategy testing

My approach. Core - Engine.

Alexander, 2018.12.16 16:12

My skills in MQL and programming in general are quite modest. ....

...If there is a way to speed up results without going too deep into the process, why not take advantage of it?

 

Example of a custom animation drawn by the EA in the engine window:

Control code in the EA:

void OnTimer()
  { 
   static int q1,a,b; 
   //------------------------------------
   if(!a)LOAD_CANVAS_Last_10_bars(); 
   //---------------------------------
   if(!b) q1++;
   if(q1 == 200)b = 1;
   if(b)q1--;
   if(!q1)b = 0;  
   //------------- 
   ELLIPSE(q1,q1,q1+q1*2,q1+q1,clrBlue);          
   //------------------------------------
  }

Added 14 drawing functions from the CCanvas class to the drawing block of the engine. These functions are called from the Expert Advisor. For this, the drawing functions wrapper functions have been added into file Connection_Properties.mqh

You can draw circles, rectangles, triangles, arches, ellipses, and lines.

Before calling the drawing functions, we have to specify on which canvas they will draw (e.g.LOAD_CANVAS_Last_10_bars();).

The technology is still in its raw state. As soon as I will debug it, I will post ready example.

 
Александр:

Good afternoon.

I am trying to build a toolbar for controlling enabling/disabling of custom trading functions and, respectively, correcting some of their parameters.

I have faced an impossibility to enable/disable the panel due to the absence of ChartEvent event in the Strategy Tester, when implementing the panel in the Expert Advisor's code.

Or the impossibility to open orders in case the panel is implemented in the indicator code.

Discussion here: https://www.mql5.com/ru/forum/294890

Peter offered me his help in developing the panel, which I couldn't refuse.

So the panel looks like this

or like this, when all the buttons are pressed:

under each button its parameters, which can be changed either by up/down arrows or by editing the edit field.

For the "Now" buttons the value is .Locking(false); for all other buttons .Locking(true);

For the "Trailing" button, add another parameter (switch) with values All/Each.

In addition, we have to add a drop-down list in the panel with the choice of timeframe and a window with the list of open orders by the current symbol with indication of the profit of each order (including the swap) and a cross in front of each of them to close it.

Peter, is this description enough for your TOR?

Here is the panel.

Please make adjustments to the appearance, and explain where exactly to place the "All/Each" switch, and also the release list with timeframes (I assume on top in the centre).

Buttons pressed:


 

As for trading in the tester, I'm solving that problem right now. I want to completely redo the communication between the EA and the engine. To implement it through "communication objects" (MT-objects which string description is used for data transmission between programs).

This can be a fast and versatile way of communication for normal communication and for communication in the test mode of the EA.

The current approach to communication overloads the OnChartEvent() event queue. The sending and receiving of messages between the EA and the engine is delayed if there are too many events, and this can be seen visually. Communicating through MT objects should eliminate this problem, because the receiving and sending of messages will be done outside of the OnChartEvent() event queue.

In theory, this should work...

 
Реter Konow:

Here is the panel.

Please make corrections to the appearance, and explain where exactly to put the "All/Each" switch, as well as the timeframe list (I guess at the top in the centre).

I think it would be better to make the panel the whole width of the working area (there will be more meta for the list of orders).

The Edit fields with labels Lot, Profit and next to the "Now" buttons should have hundredths (format 0.00).

I have experimented and came to a conclusion that it would be better to replace the field with the list of timeframes by Label and two buttons ("-" and "+"). Place at the level of the top row of buttons. Label in the middle, "-" button to the left, "+" button to the right of the Label. There will be space below for a list of open orders.

Place the All/Each switches below the "Trailing" buttons at the level of the "Profit" label.

This is my vision, but as far as I have understood, after reading the forum and watching your work, you have the desire and ability to draw, so I will not oppose your suggestions.

 
Александр:

1. I think it would be better to make the panel the full width of the working area (there would be more meta for the list of orders).

2. The Edit fields with labels Lot, Profit and next to the "Now" buttons should have hundredths (format 0.00).

3. I have experimented and came to the conclusion, that it is better to replace the field with the list of timeframes by Label and two buttons ("-" and "+"). Place at the level of the top row of buttons. Label in the middle, "-" button to the left, "+" button to the right of the Label. Below there will be space for list of open orders.

4. Place the All/Each switches below the Trailing buttons at the level of the Profit label.

5. This is my vision, but I have understood that, after reading the forum and watching your work, you have the talent and ability to draw, so I will not oppose your suggestions.

1. i.e. make the panel automatically adjust to the width of the chart? Or just to the width of the chart?

2. Will do.

3. I don't quite understand. You mean that timeframes should be set up in the entry field with +/- buttons? And we should not make a separate window with the list of orders? Everything on the panel?

4. The switch could be a simple button that changes text when pressed/repressed?

5. Add graphical elements.

(A small slider could be made as a switch. The slider would go right/left)

 
Реter Konow:

As for trading in the tester, I'm solving that problem right now. I want to completely redo the communication between the EA and the engine. To implement it through "communication objects" (MT-objects which string description is used for data transmission between programs).

This can be a fast and versatile way of communication for normal communication and for communication in the test mode of the EA.

The current approach to communication overloads the OnChartEvent() event queue. The sending and receiving of messages between the EA and the engine is delayed if there are too many events, and this can be seen visually. Communicating through MT objects should eliminate this problem, because the receiving and sending of messages will be done outside of the OnChartEvent() event queue.

In theory, it should work...

I'm not sure I fully understand the point.

Am I right understanding that you're going to implement communication between the EA and the panel in testing mode through OnChartEvent() events?

If so, the chances of success are not very high, because the events OnChartEvent() are not generated for the EA in the tester (only for the indicator).

https://www.mql5.com/ru/forum/294890/page4#comment_9914750 here it was suggested to replace OnChartEvent() events by OnTick() events.

I tried it, but it makes all composite objects (SpinEdit, ComboBox and others) stop working. The only method which allows to change variable values in the Button.Pressed() tester and only for standalone buttons (buttons not included into any complex object like SpinEdit)

SimplePanel проблема при переключении таймфрейма
SimplePanel проблема при переключении таймфрейма
  • 2018.12.16
  • www.mql5.com
В составе стандартного пакета MT4 имеется пример создания панели управления "Simple Panel...
 
Александр:

I'm not sure I fully understand the point.

Do I understand correctly, that you are going to realize communication between the EA and the panel in testing mode through the events OnChartEvent()?

If so, the chances of success are not very high, because the events OnChartEvent() are not generated for the EA in the tester (only for the indicator).

https://www.mql5.com/ru/forum/294890/page4#comment_9914750 here it was suggested to replace OnChartEvent() events by OnTick() events.

I tried it, but it makes all composite objects (SpinEdit, ComboBox and others) stop working. The only method which allows to change variable values in Button.Pressed() tester and only for standalone buttons (buttons not included into any complex object like SpinEdit)

It's a long explanation. But, trust my experience. The communication method will work.

The panel will be on a regular chart. The Expert Advisor in the tester. The panel will find the Expert Advisor in the Strategy Tester, create MT-objects and through their description "communicate" with the EA.

The OnChartEvent() works on the regular chart. It doesn't in the tester. But it will not prevent synchronization of parameter values.

I'm sure it will work.

It will be a matter of one week.

 
Реter Konow:

It's a long explanation. But, trust my experience. The communication method will work.

The panel will be on a normal chart. The Expert Advisor in the tester. The panel will find the Expert Advisor in the Strategy Tester, create MT-objects and through their description "communicate" with the EA.

The OnChartEvent() works on the regular chart. It doesn't in the tester. But it will not prevent synchronization of parameter values.

I'm sure it will work.

It will be a matter of one week.

It won't work.