Failed to compile file

To add comments, please log in or register
Gantrithor
20
Gantrithor  
When i try to download some indicators for my MT5 trading platform, sometimes I get this message in Journal: failed to compile file "C:\Program Files\MT5\Indicators\Downloads\<indicator name>.mq5". Most indicators work well but some just don't and i would like to understand why is it so. Thanks for reply.
Anthony Garot
1843
Anthony Garot  
Gantrithor:
When i try to download some indicators for my MT5 trading platform, sometimes I get this message in Journal: failed to compile file "C:\Program Files\MT5\Indicators\Downloads\<indicator name>.mq5". Most indicators work well but some just don't and i would like to understand why is it so. Thanks for reply.

My indicators (the ones I download manually) go here:

%APPDATA%\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5\Indicators\Downloads\

Maybe check to see if your indicators are going in the right place.

My next thought is to load and compile offending indicators using MetaEditor. That may give you the exact compilation error message.

forexp18
6
forexp18  
Gantrithor:
When i try to download some indicators for my MT5 trading platform, sometimes I get this message in Journal: failed to compile file "C:\Program Files\MT5\Indicators\Downloads\<indicator name>.mq5". Most indicators work well but some just don't and i would like to understand why is it so. Thanks for reply.

Be sure to save your indicator to the right folder.

To determine if its the right folder, open MetaTrader 5.

Click on File>Data folder. 

Click into the MQL5 > Indicators folder. Save your indicator here.

Next, open MetaEditor by pressing F4 in MetaTrader.

A pop up will appear. Click on your indicator from the navigator window to view the code.

Then click compile and see if there are any errors. The errors will appear in the toolbox window.

If there are errors, means there is some problem with the code. Solve these errors and you will be good to go.


Cheers,

Bryan

Gantrithor
20
Gantrithor  
forexp18:


It shows 2 errors in these 2 lines:


input Smooth_Method MA_Method_=MODE_EMA; //method of averaging

input Smooth_Method Signal_Method_=MODE_EMA; //method of averaging of MACD


saying:


"MODE_EMA" - cannot convert enum


in both cases.

Any idea? Thanks for reply.    


Edit: Nevermind, that editor is so user friendly so it offered me solution that fixed it. Thanks for help. Cheers.

To add comments, please log in or register