Get Spider Indicator return values

Mir.Ebrahim Jafarpour Zonuzi  

Hi every body i want to get return value from an indicator names Spider Indicator 

i use iCustome Function in MQL4 i have to mention that i use MT4 Here is my Code:


//+------------------------------------------------------------------+
//|                                                    SpiderBot.mq4 |
//|                        Copyright 2020, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property strict
#resource "\\Indicators\\SpiderIndicator1.ex4" 
#resource "\\Indicators\\SpiderIndicator2.ex4"
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//---
   
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---
   
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
 {


      double spider1 = iCustom(Symbol(),Period(),"SpiderIndicator1",1,1);
   
      //double spider2 = iCustom(Symbol(),Period(),"SpiderIndicator2",1,0);
      //Print("Handle invalid for ... error= ", GetLastError());
      Print(spider1);
      //Print(spider2);
      //Print("Hi");
    
 }
//+------------------------------------------------------------------+

I get unknown Resource Type error when i try to compile it what should i do?


Irwan Adnan  
Mir.Ebrahim Jafarpour Zonuzi:

Hi every body i want to get return value from an indicator names Spider Indicator 

i use iCustome Function in MQL4 i have to mention that i use MT4 Here is my Code:


I get unknown Resource Type error when i try to compile it what should i do?

Try to delete both #resource line

Irwan Adnan  
Mir.Ebrahim Jafarpour Zonuzi:
if i delete resource lines how i have to call it?

it automatically call the indicators. Maybe I get you wrong, but have you try to delete those lines?

mntiwana  
Mir.Ebrahim Jafarpour Zonuzi:

Hi every body i want to get return value from an indicator names Spider Indicator 

i use iCustome Function in MQL4 i have to mention that i use MT4 Here is my Code:


I get unknown Resource Type error when i try to compile it what should i do?

Always try using reliable and original named indicators rather than renamed stuff

these i think are MACD and ADX indicators

William Roeder  
Mir.Ebrahim Jafarpour Zonuzi: I get unknown Resource Type error when i try to compile it what should i do?
  1. Make sure the indicators are in the «DataFolder»\Indicators.
              Data Structure in MetaTrader 4 Build 600 and Higher - MQL4 Articles 2014.02.03

  2. Why are you trying to use a resource? If you really want a resource, fix the iCustom call (№ 3). Otherwise, just drop the #resource.

  3. #resource "\\Indicators\\SpiderIndicator2.ex4"
    ⋮
          double spider1 = iCustom(Symbol(),Period(),"SpiderIndicator1",1,1);

    You are trying to call a local indicator, not the one in the resource.
              Use the publicly released code - MQL5 programming forum 2017.02.20
              Resources - MQL4 Reference

    Be aware that using resources is 40x times slower than using CIs directly.
              A custom indicator as a resource - MQL4 programming forum 2019.11.26

    Also make use there are no spaces in the path.
              Getting error 4802 when loading custom indicator that loads another custom indicator with iCustom - Technical Indicators - MQL5 programming forum.