Features of the mql5 language, subtleties and tricks - page 126

 
fxsaber:
Some (*.bat, etc.) files are not seen by FileIsExists, but FileFindNext finds them.

Maybe this is a bug and not a feature? Have you asked in the appropriate branch? I didn't see a question like that.

 
fxsaber:
Some (*.bat etc.) files are not seen by FileIsExists, but FileFindNext finds them.

Also, you can't write information to *.bat file, I think it's a security issue, and let it look for all files - it's useful.

 
Artyom Trishkin:

Could this be a bug rather than a feature? Have you asked in the relevant thread? I didn't see a question like that.

About the executable files, I thought it was known. It's not a bug. And the peculiarity is that they can still be seen through FileFindNext.

 
fxsaber:

About the executable files, I thought it was known. It's not a bug. And the peculiarity is that you can still see them via FileFindNext.

Welcome

 

This is the difference that can be obtained in the tester between the result which the trader must obtain in OHLC mode and the result that the tester scrambles the EA instead of the realistic maximum spread of the minimum per minute bar

And two simple amateurish scripts to solve this problem. The first converts the current chart symbol to a custom symbol with OHLC M1 with maximum spreads on each bar instead of the available ones, the second converts all the symbols selected in the 'market overview'. It works relatively fast, without cumbersome libraries and extra features (although I can't guarantee 100% correct)) Maybe someone else will find it useful.

 
Ilya Malev:

converts the current chart symbol to a custom symbol with OHLC M1 with maximum, instead of available, spreads on each bar

Suppose that inside a bar the spread has gone up by spiking the Bid price downwards. So why would such a spread be written into a bar?

 
fxsaber:

Let's say that inside the bar, the spread has risen at the expense of the Bid price spiking downwards. Why would we need such a spread in a bar?

It only happens during a rollover and it can really happen when your order is close to the stop and you should be ready for it. If such spikes in the quotes are present outside the rollover, we should rather think about changing the source of quotes. This is a tool for liquid forex, only real ticks would probably be suitable for non-liquid forex.

 
fxsaber:

Let's say that inside the bar, the spread has risen at the expense of the Bid price spiking downwards. Why would such a spread be written to a bar?

And in general, if you think that in such quotes with spikes it is better to filter them, reducing the maximal one-minute spread, in order to get a full return when trading on the real account, I do not agree with you completely

 
Ilya Malev:

And in general, if you think that in such quotes with spikes it is better to filter them, lowering the maximum minute spread, in order to get the fuck up when trading it on the real, then I fundamentally disagree with you.

You sound like a beginner...

Under the spike there can be anything. For example, the spread is twice the average. By setting the maximal spread, you have killed the profitability of many TS.

The problem is formulated simply: to set the spread in bars so that the test "on bars" would be closest to "on real ticks". It means we should give a chance to open on a bar not worse, but not better than the real prices.

Therefore, the model of the Tester "on bars" should make Bid_Tester <= HighBid_Real, Ask_Tester >= LowAsk_Real. And you, with your maximum spread, do not allow opening at prices that were in reality.


ZS The whole zoo ate at this topic. Would have thrown those bars out a long time ago, since you have access to custom ticks.

 
fxsaber:

Reasoning like a novice...

Anything can be under spikes. For example, a spread twice the average spread. By setting the maximum spread, you have killed the profitability of many TS.

The problem is formulated simply: to set the spread in bars so that the test "on bars" would be closest to "on real ticks". It means we should give a chance to open on a bar not worse, but not better than the real prices.

Therefore, the model of the Tester "on bars" should make Bid_Tester <= HighBid_Real, Ask_Tester >= LowAsk_Real. However, your maximum spread will not let you open at the prices that were in reality.

It is you, as a beginner, who is reasoning that everything will be worse in the real world than in the tester, which is as close to the history as possible. This is almost an inevitability that is learned with experience. That's exactly how my approach works: its result is slightly worse than the result on real ticks, but not to the extent that it can be regarded as an independent system-breaking factor. Experienced traders will appreciate this approach, I am sure.

Reason: