iCustom Returns Only Period M1 instead of Period M15

 

Hello Guys.

I am new in the MQL4 world. I am trying to use ZigZagZug in my EA.

This is my call. The values which I am getting are correct but for Period M1 and not Period M15. What is my fault :( I know that parameters are correct but again I am getting only the results for Period M1 and not M15. I don't care if there is a zigzag on M1 but only for M15... 


Can you help me?

int n, i,shift;
      double zig_zag,zag, zig;
      datetime itm;

      i=0;
      while(n<2)
        {
         itm  = iTime(Symbol(), PERIOD_M15, i);
         shift = iBarShift(NULL,PERIOD_M15,itm);

         zig_zag=iCustom(NULL, PERIOD_M15, "ZigZagZug","--- Primary Indicator Settings ---",ZZ_Depth,ZZ_Backstep,ZZ_Deviation,false,false,"(High) Breakout has occured!","(Low) Breakout has occured!", 0, shift);
         zig=iCustom(NULL, PERIOD_M15, "ZigZagZug","--- Primary Indicator Settings ---",ZZ_Depth,ZZ_Backstep,ZZ_Deviation,false,false,"(High) Breakout has occured!","(Low) Breakout has occured!", 1, shift);
         zag=iCustom(NULL, PERIOD_M15, "ZigZagZug","--- Primary Indicator Settings ---",ZZ_Depth,ZZ_Backstep,ZZ_Deviation,false,false,"(High) Breakout has occured!","(Low) Breakout has occured!", 2, shift);

         if(zig_zag>0)
           {
            break;
           }
         i++;
        }
 
Check in the source code whether ZigZagZug itself provides only M1 values - to make you buy it. Look here (top right the lens) for ZigZag there are plenty of them and in the CodeBase and the Articles you also have the source code.
 
  1. Provide a link to the indicator, or it's code. We have no idea whether your calls are correct, or if it returns what you think it does, or even which version you are using.
  2. On MT4: Unless the current chart is that specific symbol(s)/TF(s) referenced, you must handle 4066/4073 errors before accessing candle/indicator values.
              Download history in MQL4 EA - Forex Calendar - MQL4 programming forum - Page 3 #26.4 (2019)

 
William Roeder #:
  1. Provide a link to the indicator, or it's code. We have no idea whether your calls are correct, or if it returns what you think it does, or even which version you are using.
  2. On MT4: Unless the current chart is that specific symbol(s)/TF(s) referenced, you must handle 4066/4073 errors before accessing candle/indicator values.
              Download history in MQL4 EA - Forex Calendar - MQL4 programming forum - Page 3 #26.4 (2019)

Sorry I forget the link

Here is the link
https://4xone.com/free-download-zigzagzug-v1-4-metatrader-mt4-indicator/

2. I will check it …
 
manoliscs #:
Sorry I forget the link

Here is the link

2. I will check it …
itm  = iTime(Symbol(), PERIOD_CURRENT, i);
shift = iBarShift(NULL,PERIOD_M15,itm);

zig_zag=iCustom(NULL, PERIOD_M15, "ZigZagZug.v1.4","--- Primary Indicator Settings ---",ZZ_Depth,ZZ_Backstep,ZZ_Deviation,false,false,"(High) Breakout has occured!","(Low) Breakout has occured!", 0, shift);
zig=iCustom(NULL, PERIOD_M15, "ZigZagZug.v1.4","--- Primary Indicator Settings ---",ZZ_Depth,ZZ_Backstep,ZZ_Deviation,false,false,"(High) Breakout has occured!","(Low) Breakout has occured!", 1, shift);
zag=iCustom(NULL, PERIOD_M15, "ZigZagZug.v1.4","--- Primary Indicator Settings ---",ZZ_Depth,ZZ_Backstep,ZZ_Deviation,false,false,"(High) Breakout has occured!","(Low) Breakout has occured!", 2, shift);

 
Nagisa Unada #:


Unfortunately not! The Second line I have just rename the file to be more friendly to me. For the first change,I try it but didn't make any change.
 
manoliscs #:

Unfortunately not! The Second line I have just rename the file to be more friendly to me. For the first change,I try it but didn't make any change.

I'm not mistaken. I have confirmed that this works fine.

If it doesn't work correctly, then you're doing something wrong.

Reason: