Page 25 of 35 FirstFirst ... 15 23 24 25 26 27 ... LastLast
Results 241 to 250 of 345
Like Tree104Likes

AllPivots

This is a discussion on AllPivots within the Trading tools forums, part of the Trading Forum category; dear Igor, a perfect indicator indeed (ALLPIVOTs V5.6). but when i am using it in an expert advisor, as iCustom(), ...

      
   
  1. #241
    Junior Member
    Join Date
    Nov 2018
    Posts
    5
    dear Igor,
    a perfect indicator indeed (ALLPIVOTs V5.6).
    but when i am using it in an expert advisor, as iCustom(), i get the "array out of range indicator"
    what could be wrong ?
    thank you

  2. #242
    igorad
    Guest
    Quote Originally Posted by alamehmazen123@gmail.com View Post
    dear Igor,
    a perfect indicator indeed (ALLPIVOTs V5.6).
    but when i am using it in an expert advisor, as iCustom(), i get the "array out of range indicator"
    what could be wrong ?
    thank you

    Hi,

    It looks like no enough bars to calculate pivots. This issue can happen if you set too large TimeFrame, Length or AvgPeriods periods.

    Regards,
    Igor

  3. #243
    Junior Member
    Join Date
    Nov 2018
    Posts
    5
    dear,
    i tried everything to solve it, but still gives me the same problem

    it points out to the line in the section below:

    //+------------------------------------------------------------------+
    int StrToDoubleArray(string str, double &a[], string delim=",", int _init=0)
    //+------------------------------------------------------------------+
    // Breaks down a single string into double array 'a' (elements delimited by 'delim')
    // e.g. string is "1,2,3,4,5"; if delim is "," then the result will be
    // a[0]=1.0 a[1]=2.0 a[2]=3.0 a[3]=4.0 a[4]=5.0
    // Unused array elements are initialized by value in 'init' (default is 0)
    {
    int z1=-1, z2=0;

    if(str == "") return(0);
    if(StringRight(str,1) != delim) str = str + delim;

    int strcnt = StringFindCount(str,delim);

    ArrayResize(a,strcnt);

    for(int i=0;i<strcnt;i++) a[i] = _init;


    for(int i=0;i<strcnt;i++)
    {
    z2 = StringFind(str,delim,z1+1);
    if(z2 > z1 + 1) a[i] = StrToNumber(StringSubstr(str,z1 + 1,z2 - z1 - 1));
    if(z2 >= StringLen(str) - 1) break;
    z1 = z2;
    }

    return(strcnt);
    }

  4. #244
    igorad
    Guest
    Quote Originally Posted by alamehmazen123@gmail.com View Post
    dear,
    i tried everything to solve it, but still gives me the same problem

    it points out to the line in the section below:

    //+------------------------------------------------------------------+
    int StrToDoubleArray(string str, double &a[], string delim=",", int _init=0)
    //+------------------------------------------------------------------+
    // Breaks down a single string into double array 'a' (elements delimited by 'delim')
    // e.g. string is "1,2,3,4,5"; if delim is "," then the result will be
    // a[0]=1.0 a[1]=2.0 a[2]=3.0 a[3]=4.0 a[4]=5.0
    // Unused array elements are initialized by value in 'init' (default is 0)
    {
    int z1=-1, z2=0;

    if(str == "") return(0);
    if(StringRight(str,1) != delim) str = str + delim;

    int strcnt = StringFindCount(str,delim);

    ArrayResize(a,strcnt);

    for(int i=0;i<strcnt;i++) a[i] = _init;


    for(int i=0;i<strcnt;i++)
    {
    z2 = StringFind(str,delim,z1+1);
    if(z2 > z1 + 1) a[i] = StrToNumber(StringSubstr(str,z1 + 1,z2 - z1 - 1));
    if(z2 >= StringLen(str) - 1) break;
    z1 = z2;
    }

    return(strcnt);
    }
    Hi,

    This function is used only in the OnInit() function.
    Could you show the AllPivots settings in your EA?

    Regards,
    Igor

  5. #245
    Junior Member
    Join Date
    Nov 2018
    Posts
    5
    double Pivot= iCustom(NULL, 0, "AllPivots_v5.6 600+", "", "D1", "AllPivots", 1, "floor_piv", "0;1;2;3", "Previous Median", 0, false, "hilo_r", 1,0,0,5,0,0);
    double R_1 = iCustom(NULL, 0, "AllPivots_v5.6 600+", "", "D1", "AllPivots", 1, "floor_piv", "0;1;2;3", "Previous Median", 0, false, "hilo_r", 1,0,0,5,1,0);
    double R_2 = iCustom(NULL, 0, "AllPivots_v5.6 600+", "", "D1", "AllPivots", 1, "floor_piv", "0;1;2;3", "Previous Median", 0, false, "hilo_r", 1,0,0,5,2,0);
    double S_1 = iCustom(NULL, 0, "AllPivots_v5.6 600+", "", "D1", "AllPivots", 1, "floor_piv", "0;1;2;3", "Previous Median", 0, false, "hilo_r", 1,0,0,4,7,0);
    double S_2 = iCustom(NULL, 0, "AllPivots_v5.6 600+", "", "D1", "AllPivots", 1, "floor_piv", "0;1;2;3", "Previous Median", 0, false, "hilo_r", 1,0,0,4,8,0);

  6. #246
    Junior Member
    Join Date
    Nov 2018
    Posts
    5
    AllPivots-array.pngClick image for larger version. 

Name:	array.png 
Views:	252 
Size:	96.1 KB 
ID:	33590

  7. #247
    igorad
    Guest
    Quote Originally Posted by alamehmazen123@gmail.com View Post
    double Pivot= iCustom(NULL, 0, "AllPivots_v5.6 600+", "", "D1", "AllPivots", 1, "floor_piv", "0;1;2;3", "Previous Median", 0, false, "hilo_r", 1,0,0,5,0,0);
    double R_1 = iCustom(NULL, 0, "AllPivots_v5.6 600+", "", "D1", "AllPivots", 1, "floor_piv", "0;1;2;3", "Previous Median", 0, false, "hilo_r", 1,0,0,5,1,0);
    double R_2 = iCustom(NULL, 0, "AllPivots_v5.6 600+", "", "D1", "AllPivots", 1, "floor_piv", "0;1;2;3", "Previous Median", 0, false, "hilo_r", 1,0,0,5,2,0);
    double S_1 = iCustom(NULL, 0, "AllPivots_v5.6 600+", "", "D1", "AllPivots", 1, "floor_piv", "0;1;2;3", "Previous Median", 0, false, "hilo_r", 1,0,0,4,7,0);
    double S_2 = iCustom(NULL, 0, "AllPivots_v5.6 600+", "", "D1", "AllPivots", 1, "floor_piv", "0;1;2;3", "Previous Median", 0, false, "hilo_r", 1,0,0,4,8,0);
    Hi,

    I see that you use the wrong input parameters for iCustom() function because you should use ENUMs described in the indicator instead of the string inputs. Plus all parameters should be the same type and in the same order as in the indicator.

    Regards,
    Igor

  8. #248
    Junior Member
    Join Date
    Nov 2018
    Posts
    5
    dear,
    thanks for the instructions, so i am now using the below settings:

    Code:
    double Pivot=  iCustom(NULL, 0, "AllPivots_v5.6 600+", "", "D1", "Fibo", "1", "floor_piv", "0;1;2;3", "median", "0","hilo_r", "1", "0","0","5","", "true", "false", "true", "clrWhite", "1", "clrMaroon", "clrDarkGreen", "STYLE_SOLID", "2", "false", "clrSilver", "true", "STYLE_DOT", "0", "false", "Arial", "8", "clrWhite", "true", "right", "true", "clrGray", "FALSE", "clrBlack","true", "false", 0,0);
    Code:
    double R_1 =   iCustom(NULL, 0, "AllPivots_v5.6 600+", "", "D1", "Fibo", "1", "floor_piv", "0;1;2;3", "median", "0","hilo_r", "1", "0","0","5","", "true", "false", "true", "clrWhite", "1", "clrMaroon", "clrDarkGreen", "STYLE_SOLID", "2", "false", "clrSilver", "true", "STYLE_DOT", "0", "false", "Arial", "8", "clrWhite", "true", "right", "true", "clrGray", "FALSE", "clrBlack","true", "false", 1,0);

    and it's working pretty fine now, BUT, i still have 2 problems:
    1-when i use a large history data, say from January 2017 till today, it gives me the following message:
    "AllPivots_v5.6 600+ EURUSD,H1: not enough memory for EX4 file"

    2-when i make several backtesting consecutively, it crashes, then it gives me the same error (array out of range).
    so i usually solve the issue by closing the MT4 terminal and re-launch it...it solve the problem.
    my question is is it the issue from my terminal it-slef? or from the indicator (loaded with information)?
    Last edited by alamehmazen123@gmail.com; 12-03-2018 at 10:52 AM.

  9. #249
    Junior Member
    Join Date
    Aug 2017
    Location
    Netherlands
    Posts
    6
    Hi Igor,

    2 pictures. #1 Correct yearly pivots ( Daily chart ). #2 Incorrect yearly pivots ( Weekly chart ) (MT4)
    It's very strange because the Monthly chart seems to plot the yearly pivots correctly.

    best regards and happy holidays, XanderAllPivots-xausudcorrect.jpgAllPivots-xauusdincorrect.jpg

  10. #250
    igorad
    Guest
    Quote Originally Posted by dndyFX View Post
    Hi Igor,

    2 pictures. #1 Correct yearly pivots ( Daily chart ). #2 Incorrect yearly pivots ( Weekly chart ) (MT4)
    It's very strange because the Monthly chart seems to plot the yearly pivots correctly.

    best regards and happy holidays, XanderClick image for larger version. 

Name:	xausudcorrect.JPG 
Views:	279 
Size:	45.0 KB 
ID:	33805Click image for larger version. 

Name:	xauusdincorrect.JPG 
Views:	278 
Size:	33.5 KB 
ID:	33806

    Hi dndyFX,

    As I mentioned already the AllPivots indicator builds pivots using the current chart data. And Because of that for the Yearly pivots on the W1 chart we should look "inside" of bars to find the correct prices for January,1 and December,31 of each year almost always . So in this case I suggest do not use the AllPivots on larger than D1 timeframes.


    Regards,
    Igor

Page 25 of 35 FirstFirst ... 15 23 24 25 26 27 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •