How can I load custom indicators for Market (in a EA)

 

hi, I get this error:

How can I solve this?

 

I looked the checks for publication, and the error persists in a different way

test on EURUSD,H1 (netting)
 2022.02.01 00:00:00   cannot load resource 'Tester\Agent-127.0.0.1-3000\MQL5\Experts\Monday_Morning_Stacks_Maker.ex5::Indicators\Heiken_Ashi_copy.ex5'
 loading of Heiken_Ashi_copy EURUSD,H1 failed [4016]
 2022.02.01 00:00:00   cannot load custom indicator '::Indicators\Heiken_Ashi_copy.ex5' [4802]
 2022.02.01 00:00:00   indicator create error
 OnInit critical error
 tester stopped because OnInit failed
 disconnected
there are no trading operations
 

how can I load a custom indicator (the other one I managed to load it)?


test on EURUSD,H1 (netting)
 2021.02.01 00:00:00   cannot load resource 'Tester\Agent-127.0.0.1-3031\MQL5\Experts\Monday_Morning_Stacks_Maker.ex5::Indicators\fibos.ex5'
 loading of fibos EURUSD,H1 failed [4016]
 2021.02.01 00:00:00   cannot load custom indicator '::Indicators\fibos.ex5' [4802]
 2021.02.01 00:00:00   indicator create error in 'Monday Morning Stacks Maker.mq5' (1,1)
 OnInit critical error
 tester stopped because OnInit failed
 disconnected
there are no trading operations
 

Load it like this:

handle = iCustom(_Symbol, _Period, "Market\\Indicator", param1, param2, param3);

you don't need to include the extension .EX5 in the path


Pass all the input parameters if the indicator is using buffers (check the data window.... view - Data Window)

Do not pass any input parameters if the indicator is using objects instead of buffers. If you don't see any buffer names in the data window, then it's a given that the indicator is not using buffers.

 

You have to include your custom indicators as resources

Read more: https://www.mql5.com/en/docs/runtime/resources

Documentation on MQL5: MQL5 programs / Resources
Documentation on MQL5: MQL5 programs / Resources
  • www.mql5.com
Programs in MQL5 allow working with sound and graphic files: PlaySound() plays a sound file; ObjectCreate() allows creating user interfaces using...
 
Le Minh Duc #:

You have to include your custom indicators as resources

Read more: https://www.mql5.com/en/docs/runtime/resources

it's not necessary, the Market directory (where purchased indicators automatically go) is understood by the software

 
Conor Mcnamara #:

it's not necessary, the Market directory (where purchased indicators automatically go) is understood by the software

Yes it's necessary for an EA to validate on the Market.

 
Alain Verleyen #:

Yes it's necessary for an EA to validate on the Market.

Alright, didn't know this, but good to know