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

 
Andrey Khatimlianskii:

In this case, I always check if this TP should have already worked (price has crossed it), and cover according to the market.

If you have to go out on the market, you can lose a lot of money on slippage.

Or, if I need to exit with a limit, I pull it behind the price until it fails.

Provided code for the Tester.

 
fxsaber:

Covering the market - on slippage can be a good deal of slippage.

Well, then pull, what's left to do? In the real, there is no guarantee either of filling the limit put on the last known bid/ask (it's not even the"current price").


fxsaber:

The code provided is for the Tester.

What is the point of creating ideal conditions (fill on the same tick) in the tester, if the EA should work in the real account?

 
Andrey Khatimlianskii:

Well then, pulling, what's left to do? In the real world too, there is no guarantee of a limit cast put on the last known bid/ask (it's not even the " current price").

Cited the closing code.

What is the point of creating perfect conditions (fill on the same tick) in the tester, if the EA should work in the real account?

There should not be a situation where the market is more profitable than the Limit in the Tester.

We have found out that the Limit order is executed correctly on exchange symbols on netting. In all other cases it is not.

 
fxsaber:

Came up with the closing code.

Which one is it? Is it working online?


fxsaber:

Shouldn't be a situation where the marketplace is more profitable than the limiter in the Tester.

I agree only in part. I don't see the point in testing the tester's perfection if it can't be replicated in real life.

 
Andrey Khatimlianskii:

Hello, Andrei! Nice to see at least one familiar face. It's been a long time since I've been here, though ...

Could you please reply to my posthttps://www.mql5.com/ru/forum/170952/page155#comment_14290696 from last page about tick charts ?

Forced to switch from MT4 to MT5 but as it turns out it's not that easy. And the experts don't seem too keen to help a beginner now.

 
Andrey Khatimlianskii:

Which one is it? Does it work online?

There's a diagram. It works.

I only agree in part. I don't see the point in testing a tester's perfection if it can't be replicated in real life.

Where is the boundary of perfection that can/should be tolerated? What do occasional re-jects and requotes have to do with the tester?

"Pips mode is one of the arguments that the tester is also a research tool. Well, it must not be so, that you may set one execution on a custom symbol on the netting and get one result, while setting another one - another.

On the exchange execution, there is also a delirious execution on the flippers.

 
Yurixx:

what tools are available in MT5 to display tick charts ?

In KB posted two tick indicators.

 
fxsaber:

Posted two tick indicators in KB.

Thanks for the reply.

Unfortunately it's a bit of a misnomer. Making an indicator on ticks as well as displaying Bid and Ask in the indicator would be no problem for me.

I would like to have a tick chart. And not so much in realtime, but to work with history, as I did in MT4.

In MT5 the means of working with ticks are rather well developed. Not to mention that a very deep tick history is stored on the server and is available in MT5. Moreover, MT5 creates this entire history base on disk. Like, you can work with the history as much as you want. And indeed, in scripts and Expert Advisors it gives a great convenience.

However, some things must be seen with eyes. For this purpose it is necessary to have both ticks and indicators on a single chart.

The price chart in the upper window of the first indicator can be anything from 1 min and up. And since ticks are moving at higher speed, there will definitely be no correspondence between the price and tick charts. And this spoils everything. Not to mention the fact that it is strange to have the whole tick history on disk, but not to be able to load it into the terminal and work with it offline.

 
Yurixx:

I would like to have a tick chart. And not so much in realtime, but to work with history

 
Yurixx:

Hello, Andrei! Nice to see at least one familiar face. It's been a long time since I've been here, though ...

Could you please reply to my posthttps://www.mql5.com/ru/forum/170952/page155#comment_14290696 from last page about tick charts ?

Forced to switch from MT4 to MT5 but as it turns out it's not that easy. And the specialists don't seem to be very keen to help a beginner now.

Hi!

The analogue of MT4's off-line charts are castum instruments. You can fill in any history, including making 1 bar = 1 tick.

But, like in MT4, each bar has to be at least a minute different in time from the previous one, so there won't be a normal time scale.

ps: there is a ready-made indicator here -https://www.mql5.com/en/blogs/post/719145
Building, analyzing, and trading on real tick charts in MetaTrader 5
Building, analyzing, and trading on real tick charts in MetaTrader 5
  • 2019.03.29
  • www.mql5.com
Did you ever think that MetaTrader's standard tick graph is a bit defective? It displays only a limited number of ticks (up to 2000, I think), it's small and unscrollable, and it's in many other ways different to normal charts. Hence users can not analyse and use ticks in the same manner as they do with bars. Just to remind you, here is an...
Reason: