Download MetaTrader 5

Official ZigZag indicator not loaded. why?

To add comments, please log in or register
Samuel Oyeniyi
379
Samuel Oyeniyi  

 The indicator ZigZag is in my roaming directory but I still get error 4802!!! I am logged on as administrator!

 

C:\Users\samoye\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5\Indicators\ZigZag.ex5

2015.05.09 10:52:36.130 searchzigzag (GBPUSD,D1) cannot load custom indicator 'ZigZag' [4802]

 I cannot see a definite resolution of error 4802 in the posts!!

Please help. 

//+------------------------------------------------------------------+
//|                                                 searchzigzag.mq5 |
//|                        Copyright 2015, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2015, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property script_show_inputs
//--- input parameters
input int      a=12;
input int      b=5;
input int      c=3;
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//---
 for(int i=1; i<=76; i++){

   if(iCustom(NULL,PERIOD_CURRENT,"ZigZag",a,b,c,0,i)!=0) {
         PrintFormat(i+","+PERIOD_H4+","+","+PERIOD_CURRENT+","+","+iCustom(NULL,PERIOD_CURRENT,"ZigZag",a,b,c,0,i));
     }
     }    
  }
//+------------------------------------------------------------------+
Alain Verleyen
Moderator
32402
Alain Verleyen  
Please check the documentation of iCustom(). With mql5 it returns an handle and only need the indicator parameters.
To add comments, please log in or register