Price Data Components
0
Views
0
Downloads
0
Favorites
FileSet Test
//+------------------------------------------------------------------+
//| FileSet Test.mq5 |
//| Copyright 2021, MetaQuotes Ltd. |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2021, MetaQuotes Ltd."
#property link "https://www.mql5.com"
#property version "1.00"
#include <Files\FileSet.mqh>
enum ENUM_TEST
{
TEST1=0,
TEST2=17,
TEST3=89,
};
CFileSet FileSet;
//+------------------------------------------------------------------+
//| Script program start function |
//+------------------------------------------------------------------+
void OnStart()
{
//---
FileSet.Open("Test.set",FILE_READ|FILE_SHARE_READ);
char test_char;
if(FileSet.TryGetValue("InpTestChar",test_char))
Print(test_char);
short test_short;
if(FileSet.TryGetValue("InpTestShort",test_short))
Print(test_short);
int test_int;
if(FileSet.TryGetValue("InpTestInteger",test_int))
Print(test_int);
long test_long;
if(FileSet.TryGetValue("InpTestLong",test_long))
Print(test_long);
float test_float;
if(FileSet.TryGetValue("InpTestFloat",test_float))
Print(test_float);
double test_double;
if(FileSet.TryGetValue("InpTestDouble",test_double))
Print(test_double);
string test_string;
if(FileSet.TryGetValue("InpTestString",test_string))
Print(test_string);
bool test_bool;
if(FileSet.TryGetValue("InpTestBool",test_bool))
Print(test_bool);
datetime test_datetime;
if(FileSet.TryGetValue("InpTestDatetime",test_datetime))
Print(TimeToString(test_datetime,TIME_DATE|TIME_SECONDS));
color test_color;
if(FileSet.TryGetValue("InpTestColor",test_color))
Print(ColorToString(test_color,true));
ENUM_TEST test_enum;
if(FileSet.TryGetValue("InpTestEnum",test_enum))
Print(EnumToString(test_enum));
FileSet.Close();
}
//+------------------------------------------------------------------+
Comments
Markdown Formatting Guide
# H1
## H2
### H3
**bold text**
*italicized text*
[title](https://www.example.com)

`code`
```
code block
```
> blockquote
- Item 1
- Item 2
1. First item
2. Second item
---