calling custom indicator inside bot/ea through resources that has nested custom indicator - page 3

 

Same here


trying to  embed indicators into an EA



#resource "\\Indicators\\StepMA pdf nmc 3.01 mtf + arrows.ex4"

double b0 = iCustom(NULL,0,"::\\Indicators\\StepMA pdf nmc 3.01 mtf + arrows.ex4","Current time frame",PdfMaLength,Sensitivity,StepSize,Variance,Mean,0,HighLow,    0,1);



2025.06.28 14:48:52.371 2010.03.02 05:00:01  cannot load 'D:\MT\MetaTrader 4\MQL4\Experts\Total EA 07.ex4::Indicators\StepMA pdf nmc 3.01 mtf + arrows.ex4'

2025.06.28 14:48:52.371 2010.03.02 05:00:01  cannot load resource 'D:\MT\MetaTrader 4\MQL4\Experts\Total EA 07.ex4::Indicators\StepMA pdf nmc 3.01 mtf + arrows'.ex4


it does that for every indicator i'm tryin to include

the resource part works (it includes the indicators correctly), that's the calling that fails (i've tried everything)

Jeff


 
Jean Francois Le Bas #:


You would have come accross this reponse before as you have been on this forum long enuf, however, i will post it anyway...

As this is a technical forum, you need to post all the details that you can get, including what you want to happen, how you have tried to do it, ie your code, and clearly show where you have printed the result on your journal.

Otherwise your only responses will be such as "we can not read your mind', 'we can not see your screen' and the favorite of many: "our crystal balls are cracked and broken".

 
Jean Francois Le Bas #:

When using #resource, the correct call in iCustom is not "::\\Indicators\\...", but simply "::StepMA pdf nmc 3.01 mtf + arrows", without the path or file extension.

Make sure the indicator file is placed in MQL4\Indicators\ before compiling the EA, so the resource is embedded correctly. Also, it's advisable to avoid spaces or special characters in the file name, as they may cause subtle issues when referencing the resource.

 
Miguel Angel Vico Alba #:

When using #resource, the correct call is not with "::\\Indicators\\..." but simply "::StepMA pdf nmc 3.01 mtf + arrows".

Make sure the indicator is compiled inside MQL4\Indicators before building the EA. Also, avoid spaces or symbols in file names when possible, they can cause subtle path issues.

thanks but I tried this I tried pretty much every iteration possible

 
Jean Francois Le Bas #thanks but I tried this I tried pretty much every iteration possible

If calling "::StepMA pdf nmc 3.01 mtf + arrows" didn’t work, the problem might be the embedding itself.

Make sure the indicator is in MQL4\Indicators\ before compiling, that it doesn’t depend on other files, and try renaming it to something simpler; long names with spaces can silently fail.

 
Miguel Angel Vico Alba #:

If calling "::StepMA pdf nmc 3.01 mtf + arrows" didn’t work, the problem might be the embedding itself.

Make sure the indicator is in MQL4\Indicators\ before compiling, that it doesn’t depend on other files, and try renaming it to something simpler; long names with spaces can silently fail.

thanks for trying to help me


I renamed an indicator I was using to zlm.ex4 and imported but it  still can't find the file (and I tried everything :

::\\zlm.ex4 

::zlm

::\\Indicators\\zlm

::\\Indicators\\zlm.ex4

....etc...

none worked.


is it possible that it's the #resource line that is wrong ? it can't find the file afterwards ?

 

ok so I just tried something different : I put the indicator in the EXPERTS folder

and then used it the same way AND IT WORKED!!!


so this might be a solution : just put all your indis in the Experts folder and use this syntax :

#resource "zlm.ex4"

string IndiName = "::zlm.ex4";


use it AS IS and it will work !!! so happy


Jeff

 

but now I got problems with indicator that restrict renaming...


like this one : SSL


2025.07.01 16:45:34.530 2010.03.31 01:00:01  ::SSL (eAverages + dots + bands + filter).ex4 GBPUSD,H1: Alert: Invalid File Name
 
Jean Francois Le Bas #:

but now I got problems with indicator that restrict renaming...


like this one : SSL


oh shit it changed file name when I uploaded it ! please rename to "

SSL (eAverages + dots + bands + filter).ex4

"

 
I got the same issue with many indis now ...:-(