Assigning Bid and Ask to an array

Back to topics list To post a new topic, please log in or register
avatar
10
Boyan 2015.03.20 10:10
 

Hi guys,

 

I'm having trouble assigning Bid or Ask price into an array. When I try to assign it to my array nothing happens, when debugging it just simply stops without any Err. ??

float  _Ask[];
float  _Bid[];

      for(i=0; i>=0;i--)

      {  _Ask[i]=Ask;
         _Bid[i]=Bid;   
      }
 
avatar
Moderator
3418
GumRai 2015.03.20 10:15 #
 

You don't size the arrays

Your for loop is rather strange as it will only ever run 1 pass, when i==0 

avatar
10
Boyan 2015.03.20 10:30 #
 
GumRai:

You don't size the arrays

Your for loop is rather strange as it will only ever run 1 pass, when i==0 

  I'm just using this loop while trying to assign Bid and Ask into my array, so it is not part of any program. I'll try to size the array and see how it goes. 

  ty 

avatar
Moderator
3418
GumRai 2015.03.20 11:06 #
 
  int size=10;
  double  _Open[];
  ArrayResize(_Open,size);
  double  _Close[];
  ArrayResize(_Close,size);

      for(int i=0; i<size;i++)
      {  _Open[i]=Open[i];
         _Close[i]=Close[i];   
      }
just as an example
Back to topics list  

To add comments, please log in or register