Structure rules. Learning how to structure programmes, exploring possibilities, errors, solutions, etc. - page 8

 
GaryKa:

And then we will have to introduce feedback between the "performer" and the "analyser", and, moreover, somehow build the parameters of this non-ideal performance into the analyser's mathematical model

What does the feedback affect in this case? Suppose you wanted to buy the product at 1.00 roubles, but its non-ideal performance was performed at 1.02. This cannot be changed - the analyzer can't change it.

It cannot be changed - the analyzer has to work with the new value. If you mean that you had an SL of 0.98, and now you need to move it to the difference. i.e. 1.00. I think it's easier to change the logic - buy first, and then put SL to a fixed distance from the strike price.

 
A100:

What does the feedback affect in this case? Let's say you wanted to buy at 1.00 roubles and it was executed at 1.02 roubles.

In the case of a redirect. Or in the case of a limit order, when you need to equalise your portfolio after the limit is triggered.

 
TheXpert:

In the case of a redirect. Or in the case of a portfolio equalisation after a limit trigger.

It's hard to say in the case of portfolio equalisation. I think the re-query should be solved in the execution block - repeated requests within predefined limits - for example 10 requests with a pause until the price goes further than 50 points from the desired one.

The analyzer can tell the Executor in advance what to do in case of failure - repeat or "give up".

 

Don't think I'm being clever, but take another look at this architecture of writing a combat TC. There is no feedback.

There are virtual positions and there is a real trading environment which is fitted to the virtuality.

In that case, it doesn't even matter if netting is in the platform or another accounting system.

 
TheXpert:
This is just an example of what I was talking about - the trading part depends on the strategy.
It doesn't have to be. If you have developed a smart position representation and organized correct work with positions, the type of execution will not affect the Expert Advisor logic itself. In my engine, for example, the type of execution is set by a simple enum. If you want limit orders, go ahead; if you want stop orders, go ahead. Let us take a stop order with indication of the maximum slippage on it. In fact, this is a limit order whose price is worse than the current one by the slippage value. This means that we can do with limit orders in all cases. The problem of volume overshooting can be easily solved. If the Expert Advisor decides that the required volume is not reached, it opens a second position in the same direction. At the base class level, hedging is supported transparently and we do not have any problems with it. Moreover, the decision to open or not to open a second position in case of insufficient volume can be delegated to the base class level. Then we can simply describe the mode, in which the base class will be forced to include new positions into the list of positions to be processed. The strategy module will pick them up and process them according to its own rules.
 
hrenfx:

Don't think I'm being clever, but take another look at this architecture of writing a combat TC. There is no feedback there.

There is, at a lower level, it can't not be there.

C-4:

It shouldn't depend.

Okay, it shouldn't be, it shouldn't be. And you still have to learn how to draw pictures. And pictures are abstractions.
 
hrenfx:

Don't think I'm being clever, but take another look at this architecture of writing a combat TC. There is no feedback.

That's the normal architecture, at least to my taste quite well.


There are virtual positions and there is a real trading environment which is fitted to the virtuality.

That's exactly what they're arguing here about the complexity-unreliability of the synchronizer (mine, in this case).


In that case, it doesn't even matter if netting is in the platform or another accounting system.

I have a similar driver for four written when five wasn't even released. Netting positions are fed into it, and the driver translates them into four orders "reducing" all the lots as the play progresses.
 
TheXpert:

There is, at a lower level, it cannot not be.

OK, it doesn't have to be, it doesn't have to be. And you still have to learn how to draw pictures. And pictures are abstractions.
We didn't go to Muhinsky academies!
 
TheXpert:

There is, at a lower level, it cannot not be.

OK, it doesn't have to be, it doesn't have to be. And you still have to learn how to draw pictures. And pictures are abstractions.
An important exception: the logic of HFT algorithms is actually described by the way they are executed.
 
I was just thinking that if MQL5 supported multiple inheritance and a class could declare abstract methods, it would pave the way for using interfaces, which would be great for large projects.
Reason: