You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Basically .mq5 should call the .mqh file, which should in turn execute the command as if it were a main class. But I'm afraid this cannot be done in the MT5 context, or can it?
As I already anticipated I know the .mqh path but I need to trace back to that path via code.
If you don't learn MQL4/5, there is no common language for us to communicate. If we tell you what you need, you can't code it. If we give you the code, you don't know how to integrate it into your code.
You have been given the code. Call it. Show us your attempt (using the CODE button) and state the nature of your difficulty.
No free help (2017)
Thank you! Actually from the MQLInfoString(MQL_PROGRAM_PATH) function, you get the path to the .ex5 file. I need the .mqh one. I think it's a matter of implementing a C++ function on .mqh file. C++ is a language that unfortunately I don't know.
Basically .mq5 should call the .mqh file, which should in turn execute the command as if it were a main class. But I'm afraid this cannot be done in the MT5 context, or can it?
As I already anticipated I know the .mqh path but I need to trace back to that path via code.
Well you actually can . Here is how to test it
Now , compile trace_function_in_mqh.mq5 , you get an ex5.
Run it , it will give you the result of the following 4 string commands from each different call revealing the location name and function that was executed inside the mqh file
BUT (there's always at least one) this means your call function must be inside the mqh and you cannot trace a function that runs from another mqh .
Hope that was clear and as @Carl Schreiber and Paul Anscombe stated can't be done (trace what runs from where and its location if not called directly from that include)
here are the bits in the test , i'm not as advanced as the other guys so i don't know if these stop working when the ex5 is only present .
Here are the files . Cheers :)
You have only four choices:
Search for it (CodeBase or Market). Do you expect us to do your research for you?
MT4: Learn to code it.
MT5: Begin learning to code it.
If you don't learn MQL4/5, there is no common language for us to communicate. If we tell you what you need, you can't code it. If we give you the code, you don't know how to integrate it into your code.
Or pay (Freelance) someone to code it. Top of every page is the link Freelance.
Hiring to write script - General - MQL5 programming forum (2019)
We're not going to code it for you (although it could happen if you are lucky or the problem is interesting.) We are willing to help you when you post your attempt (using CODE button) and state the nature of your problem.
No free help (2017)
This message is in violation of Rule 1 of the forum .
We may be familiar with Williams tone but a user who is not often posting here is not . Kudos to the OP for being mature and just ignore it .
https://www.mql5.com/en/about/rules
Well you actually can . Here is how to test it
Now , compile trace_function_in_mqh.mq5 , you get an ex5.
Run it , it will give you the result of the following 4 string commands from each different call revealing the location name and function that was executed inside the mqh file
BUT (there's always at least one) this means your call function must be inside the mqh and you cannot trace a function that runs from another mqh .
Hope that was clear and as @Carl Schreiber and Paul Anscombe stated can't be done (trace what runs from where and its location if not called directly from that include)
here are the bits in the test , i'm not as advanced as the other guys so i don't know if these stop working when the ex5 is only present .
Here are the files . Cheers :)
Hi! thank you! I really appreciated your intervention. It works perfectly. I am reading the paths and that is what I was looking for. Your intervention was very valuable.
Anytime :)