[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 152

 
eq003:
With MA it's all clear.
But I can't find how to get H1 bar values on another timeframe?
These are:
High - maximum price of each bar of the current chart;
Low - minimum price of each bar of the current chart;
That is High[1]...High[10] and Low[1]...Low[10], but from H1 timeframe, no matter what timeframe you are in.
You can use MA1 of course, but maybe there is another way.

https://docs.mql4.com/ru/series

Instead of High[1]..High[10] and Low[1]..Low[10], add iHigh(NULL,60,1)..iHigh(NULL,60,10) and iLow(NULL,60,1)..iLow(NULL,60,10).

 
borilunad:

https://docs.mql4.com/ru/series

Instead of High[1]..High[10] and Low[1]..Low[10], insert iHigh(NULL,60,1)..iHigh(NULL,60,10) and iLow(NULL,60,1)..iLow(NULL,60,10).

Write it in Spanish please, I like this language.
 
tara:
Write it in Spanish, please, I like this language.

Do you read Spanish?

Escríbamelo en español, por favor, me gusta esa lengua!

 
borilunad:

Do you read Spanish?

Escríbamelo en español, por favor, me gusta esa lengua!

Thank you, even my phrase became beautiful.
 
int OrdersTotal( )

Returns the total amount of open and pending orders.

Please explain what this phrase means. What does it mean and where does it go?

 
Begemot7:
int OrdersTotal( )

Returns the total amount of open and pending orders.

Please explain what this phrase means. What does it mean and where does it go?


The concept of function
 

Dear, please give me a hint.

I am working on a way to test and optimize a multicurrency EA. I need some calculation results to be output to a file in the tester during optimization of the EA so that they can be identified with the run number in the tester.

I have never used write or read from file in MT4 before. I looked in the help section for file operations, but I don't understand it. Please tell me how to write the result of optimization calculations to a file.

 
tara:

I think for five bucks someone will cook on Jobe.


If you can't find anyone - write, I'll do it for free, but under some condition, not less stupid than the application :)


Apart from you, tara, more willing to find, so ready to listen to the catch)
 
tara:
Thank you, even my phrase has become beautiful.
So learn and you will understand beautiful, true, Latin American songs (bolego).
 
Sancho77:

Dear, please advise.

I am working on a way to test and optimize a multicurrency EA. I need some calculation results to be output to a file in the tester during optimization of the EA so that they can be identified with the run number in the tester.

Never used writing or reading from file in MT4 before. I looked in the help section for file operations, but I don't understand it. Please advise how to write the result of calculations obtained in the Expert Advisor during optimization to a file.


You can try to do it quickly:

extern double x=100;
int step=0;
int handle;
bool Flag;
int init()
 {
  if(GlobalVariableCheck("STEP")) step=GlobalVariableGet("STEP");
  else { step=1;GlobalVariableSet("STEP",step);}
  handle=FileOpen("STEPTEST", FILE_CSV|FILE_READ|FILE_WRITE, ' ');
  if(step==1 && handle>=0){FileDelete(handle);handle=FileOpen("STEPTEST", FILE_CSV|FILE_READ|FILE_WRITE, ' ');} //На первом прогоне переписываем файл заново
  FileSeek(handle, 0, SEEK_END);
  Flag=true;
  return(0);
 }
int deinit()
 {
  FileClose(handle);
 }

int start()          
 {
  if(Flag)// Записываем в файл на каждом прогоне только один раз
   {
    FileWrite(handle, TimeYear(TimeLocal()),"-",TimeMonth(TimeLocal())," ",TimeDay(TimeLocal()),TimeHour(TimeLocal()),":",TimeMinute(TimeLocal()),":",TimeSeconds(TimeLocal()),
     "Проход=",step," Значение X=",x);
    Flag=false;step++;GlobalVariableSet("STEP",step);
   }
  return(0); 
 }

Optimisation window

You get the following file:

STEPTEST.CSV

In order to stop adding to the file, you should manually delete the global variable STEP.