Discussion of article "How to Secure Your Expert Advisor While Trading on the Moscow Exchange" - page 7

 
Andrey Miguzov #:

You're right on the point. But the example is simple - you have to buy for 1000. There is a limit - the market went in your direction and you were sold at 1000. And the price became in 50 ms - 900 :) Buying for 900 is better than buying for 1000, right?

The limit price is in the spread and from TC's point of view - 1000 is a great price. But 900 is even better...

...

Let me put it this way, if you work with a limit, you should stand against the movement of the train, knowing that it will stop. I.e. if you are executed at 1 000, and the paravoz is flying at 900, you must be sure that it will soon turn in your direction. If you do not know this, then maybe you should not trade limits at all, you have a purely trend strategy, for which the moment "here and now" is important.

 
tapo #:
IMHO, not the best solution. If finam (it varies from broker to broker), then, in my opinion, it provides everything necessary for on-the-fly calculation (parsing of history transactions). But this way you have to check the file additionally, and it is not clear why it is necessary. GlobalVariableSetOnCondition() to prevent several Expert Advisors from entering at the same time.

The file is needed to start the system. Imagine that you have 2 robots - one opened a buy for 1 lot, the second opened a sell for 1 lot on the same symbol. At the start of the terminal, there are no positions on the account, but there are actually 2 of them (this is a very simple example for illustration - in reality, everything is much more complicated).Parsing history is very time-consuming, especially if you dig deep.

You could probably implement it via global variables.

tapo #:
Your example has a place, of course, but in this case we represent two different things. I'm talking about wide spread, extremely low liquidity. Where many seconds or even minutes have to pass for the situation you described to happen. In your situation, I think the markets are the best solution.
Vasiliy Sokolov #:

Let me put it this way, if you work as a limiter, you should stand against the movement of the train, knowing that it will stop. I.e. if you are executed on 1 000, and the paravoz is flying on 900, you must be sure that it will soon turn in your direction. If you don't know this, then maybe you should not trade limits at all, you have a purely trend strategy, for which the moment "here and now" is important.

Well, I gave you an example for understanding, it is conditional.

Another example - wide spread, low liquidity - I am standing in a stack at 1000 with volume 5. A counter limit came in with the volume of 100. It blew me away and went into the glass at the price of 900. And I look at it and think - why did I spend a week on realisation of trade through limiters :)

I am not in favour of market orders. You need to use both - it all depends on the situation/strategy.

My message is that cancellation of commission for limit orders on MOEX does not mean that everyone should switch to limit orders - you need to check everything and calculate.

 
Andrey Miguzov #:

One more example - wide spread, low liquidity - I am standing in a stack at 1000 with volume 5. A counter limit came in with a volume of 100. It blew me away and went into the bet at 900. And I look at it and think - why did I spend a week on realisation of trading through limiters :)

I am not in favour of market orders. You need to use both - it all depends on the situation/strategy.

My message is that cancellation of commission for limit orders on MOEX does not mean that everyone should switch to limit orders - you need to check everything and calculate.

Probably, it can happen, but you realise that a person is trading against you, who also thinks that he is doing the right thing, and within the framework of his strategy, he cares about the price he has set. I don't see how this relates to the calculation of your strategy, which has its own benchmarks.

And, in addition to this:

1. These situations are unlikely to be very frequent;

2. No one forbids you to refill the market at even better prices that have just been formed;

As you rightly said, it all depends on the situation. Ideally, you should combine the two.

 
Vasiliy Sokolov #:

If you really have such a large number of robots, and not a hypothetical example, I recommend switching to a consensus/voting system. With such a large number of systems, it will be orders of magnitude easier to work with.

Most of them are test systems. There are no more than 2-3 dozens that are actually trading.

But there are different strategies, trend-following and counter-trend, on different timeframes, with different trail conditions, from different initial levels.

For example, a trend robot holds a pose on H4, while a counter-trend robot can work both ways on M15.

This is a diversification to even out the chart - everyone is in the plus at the end of the year, but in some periods someone may sag.

I have no idea how to bring this to a consensus. And even more so, how to see the contribution of each individual strategy.

 
Andrey Miguzov #:

The file is needed to start the system. Imagine that you have 2 robots - one opened a buy for 1 lot, the second opened a sell for 1 lot on the same symbol. At the start of the terminal, there are no positions on the account, but in fact there are 2 of them (this is a very simple example for illustration - in reality, everything is much more complicated).Parsing history is very time-consuming, especially if you dig deep.

You can probably implement it via global variables.

Well, I just gave an example for understanding, it is conditional.

Another example - wide spread, low liquidity - I am standing in a stack at 1000 with the volume of 5. A counter limit came in with a volume of 100. It blew me away and went into the glass at the price of 900. And I look at it and think - why did I spend a week on realisation of trading through limiters :)

I am not in favour of market orders. You need to use both - it all depends on the situation/strategy.

My message is that cancellation of commission for limit orders on MOEX does not mean that everyone should switch to limit orders - you need to check everything and calculate.

If a strategy implies the logic of entering "according to the market", you should not redesign the strategy, i.e. put a limit order in the glass and wait.

You just need to imitate market orders with limits - for example, set Buy limit 1 step below Ask. And re-set it periodically (not very often) when Ask changes.

(although here you need to calculate the "Inefficient Transaction Fee" of the exchange. But when working not with minimum lots and not very large number of order changes it is still more favourable to use limits. But I haven't checked it yet :-)))))

 
mktr8591 #:

(although here you need to calculate the exchange's "fee for inefficient transactions". But when working not with minimum lots and not a very large number of order changes, it is still more favourable to use limits. But I haven't checked it yet :-)))))

The fee has been cancelled.

mktr8591 #:

You just have to mimic market orders with limits - for example, set Buy limit 1 step below Ask. And re-set it periodically (not very often) when Ask changes.

The price runs away often... It depends a lot on the moment of course and on the strategy....

 
mktr8591 #:

If the strategy implies the logic of entering "according to the market", you do not need to redesign the strategy, i.e. to become a limiter in the glass and wait.

You just need to imitate market orders with limits - for example, set Buy limit 1 step below Ask. And re-set it periodically (not very often) when Ask changes.

(although here you need to calculate the"Inefficient Transaction Fee" of the exchange. But when working not with minimum lots and not very large number of order changes it is still more favourable to use limits. But I haven't checked it yet :-)))))

It was cancelled on futures.

 
JRandomTrader #:

I have no idea how to bring this to a consensus. Especially how to see the contribution of each individual strategy.

You can, if you imagine that each system is an indicator that gives three values: -1, 0, +1. Multiply the sign of the system by the part of funds allocated to it and you get the number of lots to keep on the market. The sum of system lots is equal to the net position on the symbol. If it is not so, we rebalance the net position to equal both indicators. In parallel, we keep a table with translated volumes of positions for each strategy (indicative). We understand which positions go where and at what size. If the net position is equal to the sum of indicative volumes for each strategy, it means that everything is so, everyone trades according to his signal.

 
Vasiliy Sokolov #:

It is possible, if we imagine that each system is an indicator that gives three values: -1, 0, +1. Multiply the sign of the system by the part of funds allotted to it and we get the number of lots to keep on the market. The sum of system lots is equal to the net position on the symbol. If it is not so, we rebalance the net position to equal both indicators. In parallel, we keep a table with translated volumes of positions for each strategy (indicative). We understand which positions go where and at what size. If the net position is equal to the sum of indicative volumes for each strategy, it means that everything is so, everyone trades according to his signal.

You also need feedback - the "indicator" should be told how much his position is open. If the pose is not opened by its signal, it probably does not need to be opened later. I.e. the signal is not a level, but a pulse.

 

Virtual trading + net position synchronisation with the account.

But it will turn out to be about the same as storing the data of each system in a file or database.