- www.mql5.com
- Questions and Answers about Panel and Dialogs (Standard Library- MQL4)
- *** PLEASE SEARCH BEFORE POSTING ***
- Can someone tell me why do the objects disappear from time to time? Thanks!
I've been researching the topic for some time now, but haven't been able to find the answers I was looking for. My question: Is it possible to control the features of the Visual Wizard programmatically? More broadly, my question relates to metaprogramming (code generating other code). There are several known techniques used in code gen, like expression trees, custom libraries (eg. codeDOM, T4) and plain writing of code to a string. What features in particular does MQL provide to facilitate metaprogramming? If it is not too much to ask, could somebody describe, in general terms of course, how Visual Wizard or any other EAbuilder generate MQL code? In addition, I couldn't find any references to Reflection in MQL documentation. Does it mean the language does not support this powerful technology (I'm only asking because it is used in expression trees for code gen)? If you cannot answer my questions directly, could you at least pinpoint the direction I should aim my research to? Thank you in advance for any help you can give me.
Hi Burton,
Code generating other code ?, that sound silly. Did you meant Visual Programming (https://en.wikipedia.org/wiki/Visual_programming_language or just google that as well) ?.
If you meant visual programming, then here's my IMHO, visual programming is not powerful technology, they can not replace hand written programming. Visual programming by large is used mainly by people who does not understand computer language. There's also lack and limitation, simply to say there are not much ideas that can be implemented by using visual programming, mostly caused by visual programming it self and lack of programming knowledge of it's user. Many feature of programming language cannot be represent by visual programming, for example how to visualize classes and structures ?. In MQL4.com, we reviews some MQL4 EA that created by visual programming - they are terrible (EA Builder and Molanis).
By the time these people learn programming language, they will realize that they can write a better software than a visual programming does.
That's my short IMHO reply if you meant Visual Programming.
If you meant something else, ... ups ...this is embarrassing, please disregards my reply as well.
:D
I think you mean something like this?
MQL5-Studio for HiAsm: http://mql-studio.ru/setup-mql5.htm
HiAsm Studio: http://hiasm.com/
Video (MQL5-Studio) : http://mql-studio.ru/player/video/1.mp4
Unfortunately, only in Russian.
Spasibo, tovarish, to chto nujno! Thanks, FinGeR! The program you referenced has some great capabilities along with environment commands that can be used to programmatically generate diagrams that subsequently generate MQL code. Brilliant! Also, the author, being such a kind person, gives a thorough description of how the program does what it does, and that sheds some light on how code generation occurs, although it's still pretty dark in here. In addition, while examining the discussion of this piece of software on the Russian side of MQL forum I stumbled across a very interesting block of code that I want to share here: https://www.mql5.com/ru/forum/3088/page2#comment_45377 . Urain claims that this code, supplied with a numerical position of an object in a list, is capable of retrieving a pointer to this object without knowing that object's type. This could very well be the first step towards reflection in MQL language.
Despite all this useful info, my question still stands, code generating process is still very unclear to me. How do you examine .mqh/mq5 files to know what classes are hidden there, what state they are in and how they behave? I'll try to bug HiAsm developer with my questions and experiment with Urain's code in the meanwhile, but if somebody possess knowledge in this sphere, I beg you to share it here.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use