Libraries: Symbol - page 10

 
Stanislav Korotky:

I use the CloneProperties call, and it has lines like this (in the current publicly available version):

Here the sequence is slightly different, but the correct values are transferred to the contract and other properties, the only problem is with the tick size.

So far the correct sequence has not been announced by the developers. Only by experience, unfortunately.

 
fxsaber:

So far the correct sequence has not been announced by the developers. Only by experience, unfortunately.

Well, that's understandable. My point is that it's bad that the order provided by the library doesn't work. If I find out a fix, I'll let you know.

 
I've encountered this behaviour. But mine was completely unpredictable. I.e. you run it on a bunch of characters, most of them are fine, some are 0. It doesn't always play either. In the end I put checks and I will generate again, if anything. But I had not exactly in lib was the issue, some characters worked.
 
Stanislav Korotky:

Well, that's understandable. My point is that it's bad that the order provided by the library doesn't work. If I find out a fix, I'll let you know.

I use it rather limitedly - for the Tester. I'll make changes as soon as I have information.

 

Good afternoon.

I cannot run and apply your library to mql-service.

Please tell me where the error is, the service code is attached in zip-archive, the code seems to be correct everywhere, but it does not work - custom symbol is not filled with quotes.

Files:
 
Sergey Seriy:

Please tell me where the error is

Symb.Create(NULL, "USDRUB"); // Resurrected pristine.
// ...
// Symb.CloneProperties("USDRUB")); // Не нужно, т.к. создавали на основе этого символа.
//...
 rates[count].tick_volume = 4; // If OHLC prices are not equal in pairs, the tick volume cannot be less than four.
// ...
       ArrayResize(rates, count + 1); // Pacifiers need to be trimmed.
       Symb.CloneRates(rates);

Unfortunately, the LastError-mechanism works poorly when working with Custom functions. The library has nothing to do with it.

I have pointed out the main errors. I don't have time for detailed analysis of features in Services. It should work as a script with the edits above.

 

fxsaber:

Symb.Create(NULL, "USDRUB"); // Resurrected pristine.
// ...
// Symb.CloneProperties("USDRUB")); // Не нужно, т.к. создавали на основе этого символа.
//...
 rates[count].tick_volume = 4; // If OHLC prices are not equal in pairs, the tick volume cannot be less than four.
// ...
       ArrayResize(rates, count + 1); // Pacifiers need to be trimmed.
       Symb.CloneRates(rates);


Unfortunately, the LastError-mechanism works poorly when working with Custom functions. The library has nothing to do with it.

I pointed out the main errors. I don't have time for detailed analysis of features in Services. It should work as a script with the edits above.

It works! Thank you very much.
 

Forum on trading, automated trading systems and testing trading strategies

Custom symbols. Errors, bugs, questions, suggestions.

fxsaber, 2023.01.17 09:53 pm

In order not to run into this bug, I recommend not to use the third parameter CustomSymbolCreate.

Copy the properties yourself.

There is a method for this in the library.

bool CloneProperties( const string Symb = NULL ) const
 

Hi @fxsaber, could this be a problem with the library you developed? https://www.mql5.com/ru/forum/456519

I'm hoping to hear from you about the problem I'm encountering. I doubt it's due to the library, but still, if you can take a look at the problem, that would be a great help.

CopyTicks() не возвращает правильное значение для пользовательского символа. - У меня возникла проблема с использованием пользовательского символа, который раньше у меня не был.
CopyTicks() не возвращает правильное значение для пользовательского символа. - У меня возникла проблема с использованием пользовательского символа, который раньше у меня не был.
  • 2023.10.28
  • www.mql5.com
у меня возникла проблема с использованием пользовательского символа , которой раньше у меня не было. используя функцию копирования тиков Значение почти делится на 100. Также возникает та же проблема с функцией CopyTicksRange
 
jaffer wilson #:

Hi @fxsaber, could this be a problem with the library you developed? https://www.mql5.com/ru/forum/456519

I'm hoping to hear from you about the problem I'm encountering. I doubt it's due to the library, but still, if you can take a look at the problem, that would be a great help.

Reason. Don't ask for more, my competence is too costly for me.