How to upload indicator to market which uses iCustom (other indicators)

 
Hi there, I want to upload my new indicator to market but I keep getting error. I tried to use #resources but it just doest work. Any ideas?
 

Resource is the right way.

"Doesn't work" is pretty useless to help and answer you.

 
Mobin Zarekar: Hi there, I want to upload my new indicator to market but I keep getting error. I tried to use #resources but it just doest work. Any ideas?

We can't read your mind nor see your computer! If you need help, then provide more detailed information including a screenshot of the error report. Also, we cannot help you with your code without seeing it.

 
Alain Verleyen #:

Resource is the right way.

"Doesn't work" is pretty useless to help and answer you.

Thank you for your response and sorry for lack of explanation.

Here is my code  : //--- Define resources 

 #define INDI_AS_RESOURCE
 #resource "\\Indicators\\Sarir\\SarirInds\\CustomSDivergence.ex5";
 #resource "\\Indicators\\Sarir\\Import\\coral.ex5";

//--- create iCustom Handles 

RDHD[i].Handle = iCustom(name, TimeFrame, "::\\Indicators\\Sarir\\SarirInds\\CustomSDivergence.ex5",isNotAllSymbols,INDS_MACD);

CORAL[i].Handle = iCustom(name, TimeFrame, "::\\Indicators\\Sarir\\Import\\coral.ex5");


Indicator compiles correctly:


but here I face error on backtesting it during debugging:


full message of error is :

2023.05.18 11:18:52.780 2023.04.06 00:00:00   cannot load resource 'C:\Users\computername\AppData\Roaming\MetaQuotes\Tester\D0E8209F77C8CF37AD8BF550E51FF075\Agent-127.0.0.1-3000\MQL5\Indicators\Sarir\SarirInds\SFirstHidden.ex5::\Indicators\Sarir\SarirInds\CustomSDivergence.ex5'


and also I got following error from Market:

test on EURUSD,H1 (netting)
 expert file MQL5\Sarir\SarirInds\CustomSDivergence.ex5 open error [3]
 expert file MQL5\Indicators\Sarir\SarirInds\CustomSDivergence.ex5 open error [3]
 program file Sarir\SarirInds\CustomSDivergence.ex5 read error
 program file Indicators\Sarir\SarirInds\CustomSDivergence.ex5 read error
 loading of CustomSDivergence EURUSD,H1 failed [557]
 2020.05.01 00:00:00   cannot load custom indicator 'Sarir/SarirInds/CustomSDivergence.ex5' [4802]
 2020.05.01 00:00:00   indicator create error
 test98728 (EURUSD,H1) OnInit return code is -1
 cannot initialize indicator
 disconnected
 
Fernando Carreiro #:

We can't read your mind nor see your computer! If you need help, then provide more detailed information including a screenshot of the error report. Also, we cannot help you with your code without seeing it.

Sorry, I was thinking maybe a general method could be. I added detailed information on #3

How to upload indicator to market which uses iCustom (other indicators)
How to upload indicator to market which uses iCustom (other indicators)
  • 2023.05.18
  • www.mql5.com
Hi there, I want to upload my new indicator to market but I keep getting error. I tried to use #resources but it just doest work. Any ideas...
 
Mobin Zarekar #:

Thank you for your response and sorry for lack of explanation.

Here is my code  : //--- Define resources 

//--- create iCustom Handles 


Indicator compiles correctly:


but here I face error on backtesting it during debugging:


full message of error is :


and also I got following error from Market:

The name including path is too long.
 
Alain Verleyen #:
The name including path is too long.

Thank you,

I changed names and directories to decrease file path, but the error is still there. 

#define INDI_AS_RESOURCE
#resource "\\Indicators\\div.ex5";
#resource "\\Indicators\\coral.ex5";



ERROR:

2023.05.18 17:19:43.738 2023.04.06 00:00:00   cannot load resource 'C:\Users\computername\AppData\Roaming\MetaQuotes\Tester\D0E8209F77C8CF37AD8BF550E51FF075\Agent-127.0.0.1-3000\MQL5\Indicators\SFH.ex5::\Indicators\div.ex5'
 
Mobin Zarekar #:

Thank you,

I changed names and directories to decrease file path, but the error is still there. 



ERROR:

Your divergence indicator is calling other indicator(s) ?
 
 #resource "\\Indicators\\Sarir\\SarirInds\\CustomSDivergence.ex5";

RDHD[i].Handle = iCustom(name, TimeFrame, "::\\Indicators\\Sarir

I've only seen: #resource "\\Indicators… iCustom("::Indicators… Try removing the backslash in iCustom.
          Use the publicly released code - MQL5 programming forum (2017)

 
William Roeder #:

I've only seen: #resource "\\Indicators… iCustom("::Indicators… Try removing the backslash in iCustom.
          Use the publicly released code - MQL5 programming forum (2017)

You are right, I had missed it.
 
William Roeder #:

I've only seen: #resource "\\Indicators… iCustom("::Indicators… Try removing the backslash in iCustom.
          Use the publicly released code - MQL5 programming forum (2017)

Thanks , I changed as you said, my debugging error in compoiler eliminated but I still get error from auto-check bot of mql5 market .

test on EURUSD,H1 (netting)
 expert file MQL5\div.ex5 open error [2]
 expert file MQL5\Indicators\div.ex5 open error [2]
 program file div.ex5 read error
 program file Indicators\div.ex5 read error
 loading of div EURUSD,H1 failed [557]
 2019.05.01 00:00:00   cannot load custom indicator 'div.ex5' [4802]
 2019.05.01 00:00:00   indicator create error
 test98728 (EURUSD,H1) OnInit return code is -1
 cannot initialize indicator
 disconnected