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
I have created my Expert Advisor in Wizard. I do not know mql very well. Could you please explain me what to do by the example of envelopes?
The CSignalEnvelopes class does not have such a market model.
Conclusion: We need to improve the class (or write our own class).
2011.10.06 23:00:34 Solaris executor EURUSDm,M1: cannot call function 'InfoOfTrading' from dll 'Solaris.dll' (error 127)
What is the difference between calling functions from dll in MT4 and MT5? I compile a dll, it works fine in MT5, but in MT4 it generates an error:
2011.10.06 23:00:34 Solaris executor EURUSDm,M1: cannot call function 'InfoOfTrading' from dll 'Solaris.dll' (error 127)
Give me a description of the function prototype, please. Most likely you used _stdcall design for MT5.
MT5 has a more flexible mechanism for linking DLL function names - it automatically supports both _stdcall (more advanced with name decoration) and _cdecl (old classic method). MetaTrader 4 only supports _cdecl calls.
Have you read the article"How to write a DLL for MQL5 and share data in 10 minutes?"It explains in detail how to call DLL functions.
Provide a description of the function prototype, please. Most likely for MT5 you used _stdcall design.
MT5 has a more flexible mechanism for linking DLL function names - it automatically supports both _stdcall (more advanced with name decoration) and _cdecl (old classic method). MetaTrader 4 only supports _cdecl calls.
Read the article"How to write a DLL for MQL5 and exchange data in 10 minutes?" - there is a detailed description of DLL function calls.
Tried to declare it that way:
And so:
instead of the old one:
But now a different error:
2011.10.07 01:35:05 Solaris executor EURUSDm,M1: function 'InfoOfTrading' call from dll 'Solaris.dll' critical errorI read the article.
In the settings of the project explicitly specified the way of calling:
And in MT5 still works without errors.
In general, the signals are described in the Help in exactly the way you need them. You can see it here. The picture shows the settings of CCI indicator. Therefore, most likely, your Expert Advisor will not be based only on the signals of the Envelopes indicator. There is also CCI.
Right, sorry about that. I posted the wrong picture. But it doesn't change the matter. Here's a picture from the EA on envelopes only.
What do I do? How do I fix it?
By the way, in the surs example from standard MT4 delivery the call is made via __stdcall:
and it works fine.
By the way, in the surs example from the standard MT4 delivery the call via __stdcall:
and it works fine.
In the MT4 example:
MT4_EXPFUNC char* __stdcall GetStringValue(char *spar)
и имена экспортируемых функций явно описываются через *.def файл:
LIBRARY ExpertSample
EXPORTS GetIntValue
GetDoubleValue
GetStringValue
GetArrayItemValue
SetArrayItemValue
GetRatesItemValue
SortStringArray
ProcessStringArray
stdcall appears to be supported. I'm not sure it's correct to describe parameter passing via & for fours.
The MT4 example:
MT4_EXPFUNC char* __stdcall GetStringValue(char *spar)
и имена экспортируемых функций явно описываются через *.def файл:
LIBRARY ExpertSample
EXPORTS GetIntValue
GetDoubleValue
GetStringValue
GetArrayItemValue
SetArrayItemValue
GetRatesItemValue
SortStringArray
ProcessStringArray
stdcall turns out to be supported. I'm not sure if it's correct to describe parameter passing via & for the four.
I'm completely unlearned in two years with 4. :)
1. it turns out that a variable passed by reference cannot be written into a dll. You have to use an array for that.
2. and it is obligatory to use *.def file.
Here are actually 2 differences of working with 4's and 5's dlls that I discovered, there may be more.