Custom symbols. Errors, bugs, questions, suggestions. - page 32

 

CustomTicksReplace and CustomTicksAdd do not retain the TICK_FLAG_BUY and TICK_FLAG_SELLflags. Consequently, Delta-type indicators will not work on a custom symbol. Why did the developers decide not to save these flags?

 

MT5 3041. The service creates and updates custom instrument quotes (both ticks and bars).

I have found thatSymbolInfoDouble and SymbolInfoTick called in the Expert Advisor running on this chart"hangs" at some point: in market overview quotes change, chart is updated, iClose and CopyTicksRange get actual data, but SymbolInfoXXX gives outdated information.

In the process of parsing it came to the simplest code, which was intended to detect these "hangs", but much earlier demonstrated the problem from the other side:SymbolInfoXXX is simply lagging relentlessly compared to iClose! You can see it with the naked eye:


Run such an EA on your castum chart, please:

int OnInit(void)
{
        EventSetMillisecondTimer(10);
        return(INIT_SUCCEEDED);
}

void OnDeinit(const int reason)
{
        EventKillTimer();
        Comment("");
}

void OnTimer(void)
{
        MqlTick tick;
        SymbolInfoTick( _Symbol, tick );

        Comment( "SymbolInfoInteger( _Symbol, SYMBOL_TIME ) = ", TimeToString( SymbolInfoInteger( _Symbol, SYMBOL_TIME ), TIME_SECONDS ),
                                        "\nSymbolInfoDouble( _Symbol, SYMBOL_BID ) = ", SymbolInfoDouble( _Symbol, SYMBOL_BID ),
                                        "\ntick.time = ", TimeToString( tick.time, TIME_SECONDS ),
                                        "\ntick.bid = ", tick.bid,
                                        "\niClose[0] = ", iClose( _Symbol, PERIOD_CURRENT, 0 ) );
}

(OnTimer can be changed to OnTick, it does not change the essence)

Do you have similar lags?

 
Andrey Khatimlianskii #:

Do you have similar brakes?

Can't check as I don't have the custom characters updated.

 
Alain Verleyen #:

It's already been discussed.

Set SYMBOL_VOLUME_MAX first

 
Andrey Khatimlianskii for a custom instrument (both ticks and bars).

I have found that SymbolInfoDouble and SymbolInfoTick, called in the Expert Advisor running on this chart, at some point " hangs ": in market overview quotes change, chart is updated, iClose and CopyTicksRange get actual data, but SymbolInfoXXX gives outdated information.

In the process of parsing it came to the simplest code, which was intended to detect these "hangs", but much earlier demonstrated the problem from the other side: SymbolInfoXXX is simply lagging relentlessly compared to iClose! You can see it with the naked eye:


Run such an EA on your castum chart, please:

(OnTimer can be changed to OnTick, the effect is the same)

Do you have similar lags?

Please let me know what service you use to update ticks? I hope I can help in some way and can help you.

 
Slava #:

Slava, should SymbolInfoDouble and SymbolInfoTick slow/hang?

Is it playing?

Writing code that measures braking, visual effect not enough?

 
Andrey Khatimlianskii #:

SymbolInfoXXX is just unbelievably slow compared to iClose! You can see it with the naked eye.

I must have said something stupid since no one is answering.

Sometimes it works fine and chart information is updated almost synchronously. And sometimes SymbolInfoXXX hangs for dozens of seconds, it's visible without any measurements.

There is something wrong in the data reception mechanism of the castrum tool. Moreover, the problem is only with SymbolInfoXXX functions, iClose and CopyTicksRange work fine.

 
Andrey Khatimlianskii #:

And sometimes SymbolInfoXXX hangs for tens of seconds, you can see this without any measuring.

There's something wrong in the mechanism of getting castum tool data... Moreover, the problem is only with SymbolInfoXXX functions, iClose and CopyTicksRange work fine.

SymbolInfoXXX must be pulling something from server, because it has variable speed of execution. Of course, this behavior of this function is very confusing in general. It means, that some methods are directly trying to get some backward. I have iTime that works and does not work at Custom. I can not yet understand on what principle

 
Andrey Khatimlianskii #:

And the problem is only in SymbolInfoXXX functions, iClose and CopyTicksRange work fine.

I tried your test, everything is exactly the same - lags a couple of seconds. not on custom, but on silver futures

Instrument Silv-12.21. ММВБ, broker БКС. But I guess it doesn't matter.

 
RusPro #:

SymbolInfoXXX must be pulling something from the server, as the execution speed is variable. In general, of course, this behavior of the function is confusing. It turns out that some methods are used directly, while others are used backward. I have iTime that works and does not work at Custom. I cannot yet understand what principle it works on.

I am not talking about custom tools, I am talking about castum. By definition, all the information on them is available in the terminal and nothing should go to the server.

Reason: