Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1442

 
Roman Shiredchenko:

Colleagues - understand the question is elementary - may have had updates in the terminal - forgot.

I wrote a script - I load it from under scripts - it all flies into execution at once.... and opens a market position.

How do I mark external variables, that will let me select them (change values) before execution, like in Expert Advisor?


For example, in Expert Advisor (as usual)



#property show_inputs
 
Roman Shiredchenko:

Colleagues - understand the question is elementary - may have had updates in the terminal - forgot.

I wrote a script - I load it from under scripts - it all flies into execution at once.... and opens a market position.

How do I mark external variables, that will let me select them (change values) before execution, like in Expert Advisor?


For example, in Expert Advisor (as usually)

Yes, yes... Exactly there were terminal updates...

 
Vladislav Andruschenko:
#property show_inputs
Oh! Sens! Got it.
 
Alexey Viktorov:

Yes, yes... Exactly there were terminal updates...

Mm-hmm. Also senk-s.
 
Alexey Viktorov:

Yes, yes... Exactly there were terminal updates...

:)

 
Vitaly Muzichenko:

:)

and to you "uh-huh. also senk-s." :-)

I'm not being facetious. It's up and running:


 
Good evening, is it possible to install MT4 terminal with the same login on different computers?
 
MaratGum:
Good evening, is it possible to install MT4 terminal with the same login on different computers?

You can. Computers, laptops, TVs, etc.

 

Good afternoon, all. Can you please tell me which function or other way to write a variable value to an excel file? That is, I want to collect the values of the variables at the moments I need in the form of a table in excel file. It is not possible to do it manually, because it is not possible to switch the timeframe during the test. So how can I automatically take the values I need to write to the excel file in order to open it(excel file) at the end of the test and analyse the results? P/S if there is such information in the form of a video tutorial then please share the video...

 
double my_array[];
int finish=-1;

void OnTick()
   {
   if(something)
      {
      ArrayResize(my_array,++finish+1);
      my_array[finish]=close[0];
      }
   }

void OnDeinit(const int reason)
   {   
   int handle=FileOpen("My program "+Symbol()+".csv",FILE_CSV|FILE_WRITE|FILE_SHARE_WRITE,";");
   if(handle==INVALID_HANDLE) return;
   int size=ArrayRange(my_array,0);
   for(int i=0; i<size; i++)
      {
      FileWrite(handle, DoubleToString(my_array[i],5));
      }
   FileClose(handle);
   }
Collect the required information into an array, when the test is completed a file will be created which can be opened in Excel