Download MetaTrader 5

can you help me

To add comments, please log in or register
Mahfoud Allali
324
Mahfoud Allali  

i want to get high price in last 10 candlestick 

 


  

   

double lots=1;

int slippage=3;

int magic=4747;

double pricetop=0;

int m;

 

 

double pricetop; 

int i;

 

 

  for (i=0; i>9; i++)
  {
       if (High[i]>=pricetop)
          {
          m=i;
          pricetop=High[i];
          Alert(High[m]); 
          }
         


  }  
  
       if (High[m]<(pricetop+Point))
       {
       pricetop=0;
       }

openbuystop();

 

 

 

void openbuystop()

  {

   OrderSend(Symbol(),OP_BUYSTOP,lots,pricetop,slippage,0,0,NULL,magic,0,Green);

  }

  
i have error 3 because pricetop =0 !!
Sherif Hasan
7293
Sherif Hasan  
Mahfoud Allali:

i want to get high price in last 10 candlestick 

 


  

   

i have error 3 because pricetop =0 !!
iHigh(NULL,NULL,iHighest(NULL,NULL,MODE_HIGH, 10,1))
iLow(NULL,NULL,iLowest(NULL,NULL,MODE_LOW, 10,1))
Mahfoud Allali
324
Mahfoud Allali  
SHERIFF Hassan:
tnx man :D :D 
Siti Latifah
6958
Siti Latifah  
if only high, you can use
High[10];
To add comments, please log in or register