Failed to load - wrong type [Solved]
I am also getting the error "-.ex5 not found" When both the .ex5 and .mq5 files are in the /experts directory.
Also got the error "Metaeditor not found" When the editor is clearly installed. Many bugs with the mt client unfortunately. Have reinstalled multiple times using both mt4/and mt5 seperately
1) uninstalled mt5 and restarted
2) installed mt5, pressed f4 to open meta editor
3) Created new expert, pasted in the code. Press compile, save.
4) Start/resume debugging on history data.
This is when I get the wrong type error and I cannot run the EA
This should not be in the expert:
void OnStart()
Help:
Function |
Description |
The function is called when the Start event occurs to perform actions set in the script |
|
The function is called in indicators and EAs when the Init event occurs to initialize a launched MQL5 program |
|
The function is called in indicators and EAs when the Deinit event occurs to de-initialize a launched MQL5 program |
|
The function is called in EAs when the NewTick event occurs to handle a new quote |
|
The function is called in indicators when the Calculate event occurs to handle price data changes |
|
The function is called in indicators and EAs during the Timer periodic event generated by the terminal at fixed time intervals |
|
The function is called in EAs during the Trade event generated at the end of a trading operation on a trade server |
|
The function is called in EAs when the TradeTransaction event occurs to process a trade request execution results |
|
The function is called in EAs when the BookEvent event occurs to process changes in the market depth |
|
The function is called in indicators and EAs when the ChartEvent event occurs to process chart changes made by a user or an MQL5 program |
|
The function is called in EAs when the Tester event occurs to perform necessary actions after testing an EA on history data |
|
The function is called in EAs when the TesterInit event occurs to perform necessary actions before optimization in the strategy tester |
|
The function is called in EAs when the TesterDeinit event occurs after EA optimization in the strategy tester |
|
The function is called in EAs when the TesterPass even occurs to handle an arrival of a new data frame during EA optimization in the strategy tester |

- www.mql5.com
This should not be in the expert
Wow thank you so much for your help, I appreciate it. After reading the documentation I understand my error.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi this is my first time here sorry if this is the wrong place. I just started having this issue today, the code was working fine before. I'm using mt5 and getting "Error loading - wrong type." This is very frustrating for me because I cannot run any ea's as of today. Any guidance would be apprecated. I'll post my code down below. Thank you