Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1422

 
Roman Shiredchenko #:


If this is a code fragment for the tester, can you tell me how to use csv file where to read about it in the strategy tester? I write quotes in a file, how to put them into the tester?
To work with csv
 
Valeriy Yastremskiy #:
The tester folder has its own files folder.

SPS - THIS I KNOW. I'll read more - I'll post it..... If anything - I'll clarify.....

 
Aliaksandr Hryshyn #:
To work with csv
h ttps:// www.mql5.com/ru/code/download/30455/csv_fast.mqh

thanks - I'll have a look...

 
Roman Shiredchenko #:

oops - I'll take a look...

There are include files in there, see the full thing:
 
Aliaksandr Hryshyn #:
There are include files there, see the full thing:

Sp - again it's not very simple. Tiki stuck in Files the directory under the name of the instrument in the required csv file format and tested it in my understanding now.... ;-)
 
Good afternoon! What if the terminal is connected to MQL5 VPS? When closing the terminal, will Trailing Stop still work or will it remain at the last level, just like in the case without VPS?
 
#include <JAson.mqh>
CJAVal jv;

jv["type"] = "BTCUSD";
jv["title"] = "test";

int result;
char res_data[],post[];
ArrayResize(post,StringToCharArray(jv.Serialize(),post,0,WHOLE_ARRAY)-1);
string headers="Content-Type: application/json\r\nAccept: text/plain";
result=WebRequest("POST",url,headers,3000,post,res_data,res_headers);

Trying to send json via WebRequest, the server returns:"\u0022BTCUSD\u0022 is not a valid bundle type for denormalisation.".

I.e. it doesn't like the encoding of inverted commas \u0022 .
I tried specifying all encoding variants in headers and
StringToCharArray, nothing helps.

From python everything flies out without problems:
response = requests.post(url, data=json.dumps(data), headers=headers)
i.e. everything is ok with the server.

How to solve the problem?


 

When adding to the repository this is the error. Who has encountered it? Where to clean?

 
Vladimir Deryagin #:

When adding to the repository this is the error. Who has encountered it? Where to clean?

It usually worked for me:

  • close MetaEditor,
  • log out in the terminal from MQL.Community,
  • log in again in the terminal in MQL.Community,
  • open MetaEditor
  • and then Connect Storage.
Unfortunately, it didn't always help. Sometimes everything worked again after some time.
 

Please advise an example of using this function in EA.

bool  FrameAdd( 
   const string  name,        // публичное имя/метка 
   long          id,          // публичный id 
   double        value,       // значение 
   const string  filename     // имя файла с данными 
   );
Reason: