Errors, bugs, questions - page 2961

 
Aleksei Skrypnev:

What about the load on the vpc on RAM in the 1st place/processor? There are all sorts of glitches due to problems with this.

There's plenty of everything. Powerful machine.

I'd also like to try and see if Windows catches the lock and shifter on the vpc.

It does.

 
A question has arisen: should the exchange rate margin be recalculated or not? I see in the MT reports that it is not recalculated. For example, the account is in dollars, I buy gazmec or something else quoted in roubles (margin in roubles). At that moment, the account locks the margin in dollars at the exchange rate at the time of purchase. But after a while, on the next day, for example, because of changes in usdrub, in theory, we should get a different amount of margin in dollars.
 

Please share your thoughts on the task (MT4):

The indicator has to write the int-number somewhere. And the Expert Advisor should read it.


I did it through global variables. But this implementation gives me slowness on GlobalVariableGet up to 100ms on the remote server! Very often - tens of ms. Though I don't use GlobalVariableFlush anywhere, I decided to insure myself against possible HDD lags and converted everything to GlobalVariableTemp. It didn't help.


Then I transferred all data transferring/receiving via Resources. It got much better. Rarely a few milliseconds slip through. All in all, the performance has improved considerably, gone the worst of the brakes on a flat spot.


However, a question arose, is there any other way to solve the problem? Thought about writing a number to some property of the chart. Having to wriggle around where I never intended.


Who's usingGlobalVariableGet on their VPS, can you tell me how long it takes to execute.

 
fxsaber:

Please share your thoughts on the task (MT4):

The indicator has to write the int-number somewhere. And the Expert Advisor should read it.

IsEventChartCustom not suitable?

Why not just put it in the buffer and not read it by the Expert Advisor? Or the indicator has to be launched separately?

 
Andrey Khatimlianskii:

EventChartCustom not suitable?

Why not just put it in the buffer and read it by the EA? Or the indicator has to be run separately?

This is HistoryTicks - catching all ticks for Expert Advisors. Therefore, EventChartCustom is not suitable, it has its own queue. It is the same with the buffer.

 
fxsaber:

Please share your thoughts on the task (MT4):

The indicator has to write the int-number somewhere. And the Expert Advisor should read it.


I did it through global variables. But this implementation gives me slowness on GlobalVariableGet up to 100ms on the remote server! Very often - tens of ms. Though I don't use GlobalVariableFlush anywhere, I decided to insure myself against possible HDD lags and converted everything to GlobalVariableTemp. It didn't help.

Then I transferred all data transferring/receiving via Resources. It got much better. Rarely a few milliseconds slip through. All in all, the performance has improved considerably, gone the worst of the brakes on a flat spot.

However, a question arose, is there any other way to solve the problem? Thought about writing a number to some property of the chart. Having to wriggle around where I never intended.

Who usesGlobalVariableGet on their VPS, please advise how long it takes to execute.

In the indicator you create an int variable, initialize it and save the number.
In the indicator define custom function that returns this variable.
Define the function with the export keyword.
Import this function in the Expert Advisor from name_indicator.ex4
Call the function when needed.
I have not measured the speed.

 
Good time !

Borrowed code from article about graphical objects, MT5 if anything.

1. The first problem: the buttons I have made somehow work on a demo/real account, but on a visualizer they do not. I haven't found any conditions such as MQLInfoInteger(MQL_TESTER) for the Strategy Tester.

2. I have tried to add brak points and debug the code but the debug has ignored the brak points.

3. Why does debug always open testing in the visualizer automatically?

I tried debugging in another MT5, same problem.
I have implemented these tests using OHLC.

What is your advice?
 
Roman:

Not hot, but already warm

 
A100:

Not hot, but already warm

To keep it hot, then use File Mapping with event timing.

 
fxsaber:

Please share your thoughts on the task (MT4):

The indicator has to write the int-number somewhere. And the Expert Advisor should read it.


I did it through global variables. But this implementation gives me slowness on GlobalVariableGet up to 100ms on the remote server! Very often - tens of ms. Though I don't use GlobalVariableFlush anywhere, I decided to insure myself against possible HDD lags and converted everything to GlobalVariableTemp. It didn't help.


Then I transferred all data transferring/receiving via Resources. It got much better. Rarely a few milliseconds slip through. All in all, the performance has improved considerably, gone the worst of the brakes on a flat spot.


However, a question arose, is there any other way to solve the problem? Thought about writing a number to some property of the chart. Having to wriggle around where I never intended.


Who's usingGlobalVariableGet on their VPS, please check its execution time.

If using user32.dll is not critical, here's another option. I don't remember anything about measurements, but I wrote there below that it seems to work fast. You've asked there why I need speed :))
solution is universal (I can use it between terminals too), not event-driven. You will have to work with timer. However, minimum time between events inOnChartEvent also can't be less than 1/64 seconds.

Reason: