Questions from Beginners MQL5 MT5 MetaTrader 5 - page 951

 
Aleksey Vyazmikin:

I did, but the files are also listed there... how to distinguish between files and folders is unclear.

They don't.

 
fxsaber:

They don't.

HM      0       14:56:16.522    Dir (Si-12.18,M1)       [510] "0_test\result_4_Test_CB_Setup_98_010001100\"  "0_test\result_4_Test_CB_Setup_99_110001100\"  "0_test\result_4_Test_CB_Setup_9_100100000\"  
FK      0       14:56:16.522    Dir (Si-12.18,M1)       [513] "0_test\__Rezultat.bat"                        "0_test\__Rezultat_test.bat"                   "0_test\__Train_All_New.bat"                  

I think you should look for "\" at the end of the text and that would be the directory, but the files don't have that symbol...

 
Aleksey Vyazmikin:

I think you should look for "\" at the end of the text and that would be the directory, but the files don't have that symbol...

It's not playing.

 
fxsaber:

It's not playing.

Maybe I did something wrong.... here's the script.

Files:
Dir.mq5  5 kb
 
Aleksey Vyazmikin:

Maybe I did something wrong.... here's the script.

Ran it - only directories.

 
fxsaber:

I ran it - only the directories.

I checked on another computer and the situation was confirmed - both the directories and the files in the directory are included in the array.

 
Aleksey Vyazmikin:

Checked on another computer and the situation is confirmed that both the directories and files in the directory are included in the array.

Attach this folder with the files to the archive.

 
fxsaber:

Attach this file folder in the archive.

It turns out that it does not see all the files, it mainly sees the system files

2018.12.04 00:36:16.119 Dir (Si-12.18,M1)       "00\dir_01\"  "00\dll.dll"  "00\sys.sys"  "00\test.bat"

folder attached - will be 00

Files:
00.zip  8 kb
 
Aleksey Vyazmikin:

Turns out it doesn't see all files, it mainly sees system files

Thanks, fixed it.

 

Please advise how to open a position in mql5 by the following condition: price changes by the specified number of pips.

I couldn't find any examples, or haven't been able to figure them out. I'm not experienced enough.

That is, to open a position on a similar principle to a pending order (through a step) but only without an order.

For example:

1. We request the current price for the current symbol.

1.1. the current price = Point;

1.2. store it in a variable.

2. Query the current price of the current instrument.

2.1. If current price - Point >= 100 pips, open position.

2.2 Let's reset the value of the variable Point to zero.

The problem is that I cannot figure out how to obtain the current price and memorize it.

I have tried to implement it with structure (MqlTick), but have not succeeded.

If you can help with an example.

Or point me in a primer where there is an example)

Reason: