Structure rules. Learning how to structure programmes, exploring possibilities, errors, solutions, etc. - page 14
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
In this case we will have to store the history of signals, which is very expensive. Let's again look at crossing of 2 averages. Suppose we restarted the EA. There is no new cross for entry and the EA will somehow need to restore its trading history and understand that there was a crossover and that it should now be in the Buy state and that this signal has been processed and we should not open a new position, but we will need to find the old position, but it will not be easy to find, because the current position may not necessarily belong to only one EA ... All in all, it is a nightmare. This is the thorny path suggested by hrenfx: to write a history tester in every robot, which would collect historical signals, calculate whether they worked or not, and then store volumes of strategies, etc. As a result, the complexity of development increases by an order of magnitude, while there is still no reliable solution.
Signal history is an indicator, indicators are designed for this purpose, to make calculations, generate signals and upload them to the Expert Advisor.
And do not say that indicators are re-drawing, write indicators that are not re-drawing and you will be happy.
No one can lead us astray, we don't give a shit where we are going :)
How could it not matter!? Any strategy, at its logic level, always knows its current state!
The strategy doesn't need to know its history. The strategy should look forward, not backward. What happened is already in the past and there is no going back.
Take a simple crossover strategy: it has only two states, it is either buying or selling. Without memorizing its position, it will open a long position every time it sees that the fast average is above the slow one. So what's the synchronizer to do? You tell him: "No, you already have a long position, I will not give you another one".
:)
Well I already wrote, you are solving a non-existent problem. The problem seems real only with "order" thinking. With netting thinking it doesn't exist.
I'm not talking about your or my thinking, I'm talking about the thinking of the program (strategy).
In an order-based system the strategy is a producer of discrete buy/sell/close signals. In a net-based system the strategy outputs a number (double) - the recommended market position.
Let's use the example of two wagons to show how a rollover netting TC will produce its product, say, when trading a constant lot (pseudocode):
That's it.
The strategy will hold +1 on the output as long as the short swing is higher than the long, and -1 when it is lower.
Decisions about what orders to place/close for keeping those positions at the appropriate moments are taken by the market driver. The strategy doesn't need to bother with it, its role is more aristocratic and it doesn't care about all that mercantile stuff. The driver takes the recommended position of the symbol, subtracts the actual position from it and displays the difference. If the difference is equal to zero, it does nothing.
My solution is universal, the strategy decides by itself how many orders and in which direction it can keep open.
If you want one position to buy and two to sell, no problem.
Is it possible to laugh here? This is exactly the problem - it's called a "lock".
I have all potential locks unlocked BEFORE the aggregate position of several input strategies is submitted to the market driver:
The base class has all the information it needs to make decisions. At the terminal level, there is no net position, while the strategy itself works in the comfortable multi-position mode.
Expert Advisor created by my proposed template will automatically have the properties of a multi-expert. I won't have to add or modify anything. Positions of different EAs on one symbol won't collapse into netting, it's as easy to program a grid or a locker in this pattern as in any other strategy. In other words, the full unification of program implementation is achieved, regardless of the Expert Advisor logic!
...
The strategy will hold +1 on exit as long as the short is higher than the long, and -1 when it is lower.
The market driver decides what orders to place/close to maintain those positions at the appropriate moments. The strategy does not need to bother with it, its role is more aristocratic, it does not care about all this mercantile fuss.
Does the strategy even need to worry about some kind of orders? The market driver decides these small details for me.
...
That's all very well of course, but what about strategies whose current "recommendation" depends on a previously opened position. Suppose a strategy is actively pyramiding and it has such a condition (pseudocode):
Another example of how the recommendation system would handle such a simple condition (pseudo-code):
In reality, there may be a lot of such conditions.That's the basic fuzzy thing. I'm very familiar with it, I've scoured every nook and cranny in here. And it's wrong.
Strategy has no need to know its history. Strategy should look forward, not backwards. What has happened has already happened in the past and there is no going back.
Why are you shouting :) that's not what he said.
Any strategy, at the level of its logic, always knows its current state!
This is all very well of course, but what about strategies whose current "recommendation" depends on a previously opened position. Suppose the strategy is actively pyramiding and it has this condition (pseudo-code):
These strategies definitely need to be healed, at the level of trading philosophy. Namely, this particular hole in the head should be healed: "current recommendation depends on a previously opened position".
The current recommended position should never depend on any action previously taken in the market.
Why are you shouting :) that's not what he said.
it says current state, not history.I'm not communicating with what he said, I'm communicating with what he meant. He was referring to the previous current state.
:)
:)
In fact, for my scheme, there are no principal obstacles to create strategies that take into account past trades.
In more academic terms: A system without memory can easily simulate a system with memory. To do this, the memory is simply moved outside the system - it becomes another input indicator. This is quite enough. The strategy itself remains a "system without memory" and this is good and right.
The current recommended position should never depend on actions performed earlier in the market.
What about robots "issuing their own recommendations" whose signals are one-sentence? The robot saw a big up candle - a buy signal. The next bar is a normal one and there is no signal. If the robot does not remember its status, its recommendation on this bar is already null, while the robot that remembers it is not null but has a long position. But those are two identical robots.
I'm not communicating with what he said, but with what he meant. He was referring to the previous current state.
The point is that the top-starter is probably not a strategy, but a price forecaster.
MM module is a layer between Forecaster and Driver, and results can be anything, from capitalization and risk limit (relative drawdown in X ... hours/trades/pips movement) to radical reversal of forecaster recommended position.
What about robots "issuing their own recommendations" whose signals are one-sentence? The robot saw a big up candle - a buy signal. The next bar is a normal one and there is no signal. If the robot does not remember its status, its recommendation on this bar is already null, while the robot that remembers it is not null but has a long position. And those are two identical robots.
These robots should definitely be treated. The treatment may be very simple. All you need is motivation. That's the main thing.
And to be motivated, they need to see and appreciate the tremendous superiority of netting thinking over order thinking. As long as they're sick, I won't let them anywhere near the healthy population - let them sit in quarantine...
:)