Canvas is cool! - page 98

 
Maxim Kuznetsov #:

If you do it via DLL, everything works :-)

but Canvas has nothing to do with it....

PS/ more precisely - it works exactly up to the moments of interactions with the chart. Dialogues of any kind, even in the browser, but it is impossible to interactively move a line on the chart...ChartEvent and all that is cut off with it...

I know how to write DLLs since kindergarten, how they can help, I don't understand. I put the question differently: how to make a GUI with buttons and input fields without using ChartEvent so that it works in the tester?

fxsaber #:

There are homemade Testers based on MT5 (based on the terminal, not a regular tester), where you can not only press buttons, but also use all indicators, graphical objects and even go back in time and control the price. I.e. the capabilities are far superior to MT4 and solutions outside of the MQ system. Without DLL, of course.

I'm going to make a panel for Market, so a standard tester is needed. Or will have to make a demo version to test the panel on a demo account.
 
Alexey Volchanskiy #:

I know how to write DLLs since kindergarten, I don't understand how they can help. I put the question differently: how to make a GUI with buttons and input fields without using ChartEvent, so that it works in the tester?

I'm going to make a panel for Market, so need a standard tester. Or will have to make a demo to test the panel on a demo account.

yes, we'll have to do something, not just get together :-))

first make the panel and then give a test-demo version. Because in the tester it doesn't work by-design.

 
Alexey Volchanskiy #:

I know how to write DLLs since kindergarten, I don't understand how they can help. I put the question differently: how to make a GUI with buttons and input fields without using ChartEvent so that it works in the tester?

I'm going to make a panel for Market, so need a standard tester. Or will have to make a demo to test the panel on a demo account.

No normal panel will work in a tester. Especially not on kanvas. There are poor solutions for MT4, but none for MT5. However, in MT4 you can establish a connection between the tester and the chart via a resource. I did it and everything worked. I have not tried to repeat the same trick after switching to MT5. It is more difficult to establish communication between Expert Advisors via resources in MT5. They can only read information in each other's resources, but not write. Such "communication" is problematic. But the main problem is different. It is not known whether this mechanism will work between an Expert Advisor in the MT5 tester and the panel on the MT5 chart. To test this theory, you should try to write something to the resource from the Expert Advisor in the tester and then read it through the Expert Advisor on the chart. If it succeeds, it will work fine and you can write a solution. But I highly doubt that it will work. Most likely, it is impossible to read the resource from the MT5 tester.

 
Реter Konow #:
Most likely it is impossible to read the resource from the MT5 tester.

If the problem is in catalogues - symlinks rule.

 
JRandomTrader #:

If the problem is catalogues - symlinks rule.

To each his own.

 
Реter Konow #:

No normal panel will work in the tester. All the more so on Canvas. There are poor solutions for MT4, but none for MT5. However, in MT4 you can establish a connection between the tester and the chart via a resource. I did it and everything worked. I have not tried to repeat the same trick after switching to MT5. It is more difficult to establish communication between Expert Advisors via resources in MT5. They can only read information in each other's resources, but not write. Such "communication" is problematic. But the main problem is different. It is not known whether this mechanism will work between an Expert Advisor in the MT5 tester and the panel on the MT5 chart. To test this theory, you should try to write something to the resource from the Expert Advisor in the tester and then read it through the Expert Advisor on the chart. If it succeeds, it will work fine and you can write a solution. But I highly doubt that it will work. Most likely, it is impossible to read the resource from the MT5 tester.

I have a 2 platform scalper. Buttons with a class derived from the standard CButton are used. Button state checking is done standardly in OnChartEvent. No cheesy solutions, everything is standard. And the lines are standard Horizontal Line. Everything works in MT4 tester, but not in MT5. That's why this post appeared, surely someone has overcome this bug with the MT5 tester.

 
Alexey Volchanskiy #:

I have a 2 platform scalper. Buttons with a class derived from the standard CButton are used. Button state checking is done in OnChartEvent as standard. No cheesy solutions, everything is standard. And the lines are standard Horizontal Line. Everything works in MT4 tester, but not in MT5. That's why this post appeared, surely someone has overcome this bug with the MT5 tester.

It is possible to transfer a large amount of information from the tester to the Expert Advisor on the chart via the resource and to trade with the help of the panel by hand too. The system is certainly more complex than checking the states of buttons of the "dead" panel in the tester, but the possibilities with it are much more.
 
Реter Konow #:
Through the resource you can transfer a large amount of information from the tester to the Expert Advisor on the chart and trade with the panel by hand too. The system is certainly more complex than checking the states of buttons of the "dead" panel in the tester, but the possibilities with it are much more.

Where would I read about resources, because I'm at zero, I didn't need them. Maybe you have an example?

 
Alexey Volchanskiy #:

Where to read up on resources, as I'm at zero, didn't need any. Maybe you have an example?

You can read about resources in the documentation where they are explained in detail. Other sources of information probably exist, but I haven't looked. There are a lot of examples of creating resources, but you will hardly find articles where the topic of linking an Expert Advisor in the MT4 tester with its copy on the chart is discussed. I realised my idea without knowing if someone had done it before me. Maybe yes, but maybe not. In any case, I can't show a practical example in the code, because the mechanism of EA communication was tightly integrated into my graphical engine and I didn't design it as an independent solution for public use.

However, if you wish, you can cope with this task. Study the topic of resources, develop a protocol for transferring information between advisors, write a simple variant, test and develop the solution.

To package messages into a resource, I advise you to use strings (string) and union array. In general terms, the EA forms a "message" from data blocks and writes it into a string through a delimiter. The string is converted to char type via StringToChar(), and char is converted to int via union and stored in the resource. The unread message flag is added and then the receiver unpacks the resource. It converts int back to char via union, then char converts back to string, splits the string into parts and distributes the data enclosed in it into its variables, some of which are implemented in algorithms and some of which are displayed in table fields. Roughly like this.
 
Nikolai Semko #:

I've had this implemented in the iCanvas library for a long time.

one instance of the Window structure W is automatically populated with each CHARTEVENT_CHART_CHANGE event

Mine is similar. But the problem is still, that you dont get informed all the time since many times the event is skipped/forgotten/not happening.