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

 
Dima.A.:

Cut the file down, a couple of lines in it is enough for me...

Do I understand correctly, that for mql 4 it matters how the array is initialized. So it can't be done the way I did it?

FILE PRINTED

Files:
vytxcfq.txt  61 kb
 

i.e. you want the initialisation procedure to look like this: export prices from MT, then import these prices back to MT (let's say EA) and initialise the array?

Is it impossible to initialize arrays immediately according to the specified algorithm, without chasing data through a file? Or did I miss something ?

 
solnce600:

I split a single column with all the data into columns. In the column with opening prices I put a comma after each value - transpose it into a line - sort it - and paste it into the editor, i.e. into the included mqh file.


Totally trivial case. With a macro of course, then assign a hotkey to it and that's it.

DDE connect in service - settings - server - connect DDE server, then look for DDE-Sample.xls in the root directory of the terminal. Look for bummer (IDLoader) in the forex museum. This is a local data provider (winros.exe), can't remember, seems to be Finama. The format is metastock, google "file description F?.dat". I do not have Word is not installed, so I would look at throw a macro. There the sense of a macro the following, if suddenly it is necessary: parse a file as uniform line on some lines containing blocks on 4 bytes, in blocks in the order contain: date, time, open, high, low, close, volume and open interest, and further ascii codes of symbols of blocks transfer in decimal and formatting on sense of the data in block. VBA (Visual Basic for Applications) editor is included in both Word and Excel, user actions are written in VBA. Further it is the same - opened in Word, converted to Excel. Bummer delivers the data in real time.

Metastock is a terminal from a company close to Royters, but their data provider is a paid subscription, so people get out. If for self-education, I suggest the old seventh metastock, have a look on the KB Spider forum.

 
Dima.A.:

i.e. you want the initialisation procedure to look like this: export prices from MT, then import these prices back to MT (let's say EA) and initialise the array?

Is it impossible to initialize arrays immediately according to the specified algorithm, without chasing data through a file? Or did I miss something...


Datetime and close? In a program, of course, with a loop.

solnce600:

I.e. you can't do it the way I did it?

))) This is masochism))))

 
Dima.A.:

i.e. you want the initialisation procedure to look like this: export prices from MT, then import these prices back to MT (let's say EA) and initialise the array?

Is it impossible to initialize arrays immediately according to the specified algorithm, without chasing data through a file? Or did I miss something ?

I've selected these prices manually so far. I just want to check the pattern that I think I've found.

Further on we will have to make up a code which will put the prices + bar open timeI need into arrays and then add them into array N 1 (candlestick open price) and array N 2 (open time of the same candlestick).

I only need each price (the open price of the bar) to be equal to its own value of the bar open time. They are adjacent to each other in the file.

I.e., if the first element of the array has the value 1.03745 - the first element of the second array should have the value 06.01.2000 15:00.

of the two arrays.

 
alega:

Hello! Can you tell me in which folder global variables are stored and with what extension?


MT4\profiles\gvariables.dat


Can I copy the Global Variables folder to another terminal?

Why not? Just copy it.
 

solnce600, two options: by scripting

for (i=0; i<3000; i++){

d = GlobalVariableSet(TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES), Close[0]);

Then the array will be visible throughout the terminal, or just setBars=3000 and Close[i], i=0..Bars-1. But of course, I didn't get into your task.

 

Is there a program for transferring global variables from one term to another? Thank you.

I need to transfer from demo terminal to real terminal the value of global variable 0 or 1. Is it possible and how?
 
gyfto:

solnce600, two options: by scripting

for (i=0; i<3000; i++){

d = GlobalVariableSet(TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES), Close[0]);

Then the array will be visible throughout the terminal, or just setBars=3000 and Close[i], i=0..Bars-1. But of course, I haven't got into your task.

Thank you very much for the advice.About masochism...... maybe you think that I put all commas manually.....that would really be masochism.

The commas were done by excel.

 
solnce600:

I have chosen these prices manually so far. I just want to check the regularity, which I have found.

I will further need to invent a code which will put the prices + bar open timeI need into arrays and then - add the values of the array N 1 (open price of a candle) and the array N 2 (open time of the same candle) to the existing ones

I only need each price (the open price of the bar) to be equal to its own value of the bar open time. They are adjacent to each other in the file.

I.e. if the first element of the array has the value 1.03745 - the first element of the second array should have the value 06.01.2000 15:00. And this correspondence should be on all elements

of thetwo arrays.

Why do you need two arrays? Make one two-dimensional. You need to store price and time. So store them in one array. That's what will make it all match. You won't have to match two different arrays. Simple: The first dimension is time, the second dimension is price. You can sort by time.
Reason: