Cannot load custom indicator iCustom function

 

I'm trying to get values from a custom indicator into my Ea but i'm getting errors. I've compiled the indicator with name "tmp" saved in the path MQL5\indicators. 

Here is the Ea source. 

//+------------------------------------------------------------------+
//|                                                   icustomSND.mq5 |
//|                                      Copyright 2022, CoachX Fomo |
//|                                                                  |
//+------------------------------------------------------------------+
#property copyright "Copyright 2022, CoachX Fomo"
#property link      ""
#property version   "1.00"

input bool zone_show_weak=true;  // Show Weak Zones
input bool zone_show_untested = true;  // Show Untested Zones
input bool zone_show_turncoat = true; // Show Broken Zones

int OnInit()
  {
   return(INIT_SUCCEEDED);
  }
void OnDeinit(const int reason)
  {
//---
Print("Expert Removed");
   
  }
void OnTick()
  {
      double zoneData = iCustom(_Symbol, PERIOD_CURRENT, "tmp",zone_show_weak, zone_show_untested,zone_show_turncoat);
      Comment("custom indicator handle: ", zoneData);
      Print("Zones = ", zoneData, " error = ", GetLastError());
   
  }
//+------------------------------------------------------------------+

Here is the indicator and error message

Step on New Rails: Custom Indicators in MQL5
Step on New Rails: Custom Indicators in MQL5
  • www.mql5.com
I will not list all of the new possibilities and features of the new terminal and language. They are numerous, and some novelties are worth the discussion in a separate article. Also there is no code here, written with object-oriented programming, it is a too serous topic to be simply mentioned in a context as additional advantages for developers. In this article we will consider the indicators, their structure, drawing, types and their programming details, as compared to MQL4. I hope that this article will be useful both for beginners and experienced developers, maybe some of them will find something new.
Files:
tmp.mq5  36 kb
tmp.ex5  41 kb
 

Read the documentation.

You must use CopyBuffer to get the values.

Get the handle in OnInit().

https://www.mql5.com/en/docs/indicators/icustom

Documentation on MQL5: Technical Indicators / iCustom
Documentation on MQL5: Technical Indicators / iCustom
  • www.mql5.com
iCustom - Technical Indicators - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Keith Watford #:

Read the documentation.

You must use CopyBuffer to get the values.

Get the handle in OnInit().

https://www.mql5.com/en/docs/indicators/icustom

Okay thank you 
 

The indicator does not load despite the modifications. I've moved the indicator to a new folder "Indicators\Custom\tmp.ex5"

#property copyright "Copyright 2022, CoachX Fomo"
#property link      ""
#property version   "1.00"

input bool zone_show_weak=true;  // Show Weak Zones
input bool zone_show_untested = true;  // Show Untested Zones
input bool zone_show_turncoat = true; // Show Broken Zones

int OnInit()
  {
 
      double zoneData = iCustom(_Symbol, PERIOD_CURRENT, "Custom\\tmp",zone_show_weak, zone_show_untested,zone_show_turncoat);
      Comment("custom indicator handle: ", zoneData);
      Print("Zones = ", zoneData, " error = ", GetLastError());
      
   return(INIT_SUCCEEDED);
  }
void OnDeinit(const int reason)
  {
//---
Print("Expert Removed");
   
  }
void OnTick()
  {
      
   
  }
//+------------------------------------------------------------------+
Files:
 
Indicator iCustom
input int BackLimit=1000;  // Back Limit
input bool HistoryMode=false; // History Mode (with double click)
input string pus1="/////////////////////////////////////////////////";
input bool zone_show_weak=true;  // Show Weak Zones
double zoneData = iCustom(_Symbol, PERIOD_CURRENT, "Custom\\tmp",
bool zone_show_weak, 
bool zone_show_untested,
bool zone_show_turncoat
);
⋮

Parameters in iCustom do not match indicator.

 
Thank you very much it worked 
Reason: