View Single Post
  #91 (permalink)  
Old 06-28-2009, 11:33 PM
okfar okfar is offline
Member
 
Join Date: Apr 2008
Posts: 50
okfar is on a distinguished road
Quote:
Originally Posted by Xaun View Post
I have a simple Custom Indicator with no externs called #TestIndicator that fills 8 buffers with the number 1.0 but when I bring back the buffers in my EA the buffer results are always 0 . Can you help me with this.



EA Code
Code:
double test4_up[];
double test4_down[];
double test3_up[];
double test3_down[];
double test2_up[];
double test2_down[];
double test1_up[];
double test1_down[];

int UniqueNum = 009;
..
..
...
......
..

   int i=0;
   int limit=Bars-counted_bars;

 ArrayResize(test4_up, limit);
 ArrayResize(test4_down, limit); 


    for(i=0;i<limit;i++)
    {
      test4_up[i] = iCustom(NULL, 0, "#TestIndicator",0,i);
      test4_down[i] = iCustom(NULL, 0, "#TestIndicator",1,i);
      
    }
    for(i=0;i<30;i++)
    {
      Print("Test 4 UP ", test4_up[i]," Bar ",i );
      Print("Test 4 DOWN ", test4_down[i]," Bar ",i );
      //Print("This is a test");
    }
    
//----
   return(0);
  }
//+---------
]
Maybay you need define size of array in you EA.
Reply With Quote