[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 194

 

Good evening , tell me how to write a function to determine the The highs and lows of the last three candlesticks. thanks

 
novator:

Good evening , tell me how to write a function to determine the values highs and lows of the last three candles. thanks


double UpLev=iHigh(NULL,0,iHighest(NULL,0,MODE_HIGH,3,0));
double DnLev=iLow(NULL,0,iLowest(NULL,0,MODE_LOW,3,0));
 

Diubakin:

Diubakin:


Thanks, I'll give it a try.
 
novator:

Diubakin:



Я I must have misunderstood the highs and lows of the last three candles
 
2013.03.01 22:30:06 TestGenerator: unmatched data error (low value 1.33390 at 2013.02.18 13:00 and price 1.33380 mismatched)
2013.03.01 22:30:06 TestGenerator: unmatched data error (high value 1.32190 at 2013.02.22 06:00 is not reached from the lowest timeframe, high price 1.32180 mismatches)

Can you tell me what these errors mean?

 
novator:
2013.03.01 22:30:06 TestGenerator: unmatched data error (low value 1.33390 at 2013.02.18 13:00 and price 1.33380 mismatched)
2013.03.01 22:30:06 TestGenerator: unmatched data error (high value 1.32190 at 2013.02.22 06:00 is not reached from the lowest timeframe, high price 1.32180 mismatches)

Can you tell me what these errors mean?

Please ignore it! They are not your errors, they are errors in uploaded history! F2!
 
FileOpen(File, FILE_BIN|FILE_WRITE);

Good evening! The function

parameter File should contain a conditional word and an abbreviation in it, separated by a dot. What abbreviation should I use if I don't know where I want to put the

array double Mass[,2]; ?

 
Dimka-novitsek:

Good evening! The function

parameter File should contain a conditional word and an abbreviation in it, separated by a dot. What abbreviation should I use if I don't know where I want to put the

array double Mass[,2]; ?


  int handle;
  handle=FileOpen("my_data.csv",FILE_CSV|FILE_READ,';');
  if(handle<1)
    {
     Print("Файл my_data.dat не обнаружен, последняя ошибка ", GetLastError());
     return(false);
    }
The parameter is a filename, followed by a dot and a file extension. For example "Test.dat".
 

Good evening, please tell me what I have written incorrectly. I have no logic in my code, I just need to sell last three bars with range compressed to 20 points



#define MAGIC 123456
extern double rastvor=20;
int start()
{

for (int i=1;i>OrdersTotal();i++)
{
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==false)break;
if(OrderSymbol()==Symbol() && OrderMagicNumber()==MAGIC)
{

double UpLev=iHigh(NULL,0,iHighest(NULL,0,MODE_HIGH,3,0));
double DnLev=iLow(NULL,0,iLowest(NULL,0,MODE_LOW,3,0));
double summ = UpLev-DnLev;
if (UpLev-DnLev<=rastvor)
{
OrderSend(Symbol(),OP_BUY,0.2,Ask,3,0,0,",MAGIC,0,Red);
return(0);
}
}
}
}

 
novator:

Good evening, you can point me to the wrong code, there is no logic in the code so far, I just need it to sell when the range of the last three bars shrinks to 20 pips

The easiest way to understand your writing is to realize every line of code (by signing). And it's very likely that an epiphany will come!..
P.S. And it is also desirable to learn how to insert code into your post by pressing the "SRC" button.