Discussion of article "Universal Expert Advisor: the Event Model and Trading Strategy Prototype (Part 2)" - page 3

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
Andrei, there is no need to complicate things - the correct answer is: "adjust the stop to the minimum allowable distance and open the trade (and if the news and stop levelled 50 four-digit points - too?)". Too small STOP should work virtually (without modification). And the trade should be opened on the received signal. In case of building networks, additional rules are prescribed at the stage of STOP formation.
If you use a virtual stop, postponed from the opening price, you can get a series of openings and instant closings on the same tick on an extended spread.
I agree that having ready-made options for handling certain situations will be convenient, but the engine should not solve anything automatically.
If you use a virtual stop, postponed from the opening price, on an extended spread, you can run into a series of opens and instant closes on the same tick.
I don't know about 5. I never had any problems in 4.
I agree that having ready-made options for handling certain situations will be convenient, but the engine should not solve anything automatically.
I can't but agree that there are no rules "what a trading engine should do" - we make them up ourselves. I proceed from a simple postulate: my engine should do any (all) administrative work (above I listed what I understand by administrative work, there is no mention of trailing and work with the total profit, as a separate strategy, and the whole EA), and I, when adding a new strategy to the EA, I add ONLY the trading rules for it and configure the trading engine.
I don't pretend that my approach is correct, I like it better this way. ;)
What's "this" about? This is an information message that goes together with system messages, which you have cleaned up for some reason.
I assume that I need only meaningful information messages in the log. On this basis, I am not interested in knowing that the STOPs have not changed. About the trading environment too...
Vasily, I am not criticising, I am expressing my point of view. I understand when a lot of time has been spent on creating a system, even the thought of possibly changing it makes you uncomfortable. Such conversations (exchange of opinions) make sense at the stage of reflection. :)
... and I add a new strategy to the EA, I only add trading rules for it and adjust the trading engine.
I do not pretend that my approach is correct, I like it better this way. ;)
That's what the engine does. You describe the strategy in terms of entry and exit rules, and add it to the EA.
I assume that I only want meaningful informative messages in the log. On this basis, I am not interested in knowing that STOPs have not changed. About the trading environment too...
Vasily, I am not criticising, I am expressing my point of view. I understand when a lot of time has been spent on creating a system, even the thought of possibly changing it makes you uncomfortable. Such conversations (exchange of opinions) make sense at the stage of reflection. :)
Perhaps you are right about that message. But it was very necessary for me at the beginning of the engine development. In fact, it is still quite useful now. It shows that the engine is aware of trading actions and thus the trading position is guaranteed to be delivered to the strategy. This information becomes important during debugging when, for example, a position is available, but for some reason the strategy does not process it. This community helps to find the reason: an error in the strategy logic, or a trading error, or an engine error.
That's what the engine does. You describe the strategy in terms of entry and exit rules and add it to the Expert Advisor.
I don't understand, when and where do you describe the correct formation of STOPs (including STOPLEVEL), processing (when opening and closing positions) requotes?
As I understand, you set up the engine at the beginning of a new bar. If there is no mechanism of multiple repetition of a trade request when processing requotes, then a new position will not be opened in time (that's not a big deal), but if an open position is not closed (by signal) in time, there may be unpleasant consequences for the deposit.
I do not understand, when and where to describe the correct formation of STOPs (including STOPLEVEL), to process (when opening and closing positions) requotes?
As I understand, you set up the engine at the beginning of a new bar. If there is no mechanism of multiple repetition of the trade request when processing requotes, then a new position will not be opened in time (that's not a big deal), but if an open position is not closed (by signal) in time, there may be unpleasant consequences for the deposit.
I should note that requotes are not relevant for many trading modes. For example, on the stock exchange there is no concept of requotes at all. Therefore, it is out of the question to create some universal layer that is always able to understand user's trading actions and correct them on the fly.
Well, it is not a hindrance, it is possible to analyse an error even if it never happens on some types of accounts or trading platforms.
The only question is the unambiguity of the necessary reaction - if it is clear what to do, you can do it inside the engine.
Requotes should be processed in the Expert Advisor's trading logic. If you call the Trade.Buy method in InitBuy and it returns false instead of the expected true, it is necessary to understand what happened and repeat or correct your action without leaving InitBuy. Note that requotes are not relevant for many trading modes. For example, there is no such thing as a requote on the stock exchange. Therefore, it is out of the question to create a certain universal layer that is always able to understand the user's trading actions and correct them on the fly.
It turns out that each time for a new strategy, it is necessary to separately prescribe the processing of requotes (depending on whether they are present or not), as well as to check the correct formation of STOPs, again depending on the requirements of the strategy or trader's preferences. It turns out that except for
That's what the engine does. You describe the strategy in terms of entry and exit rules and add them to the Expert Advisor.
You have to add something else to the description of entry/exit rules every time?! I would like to specify "what else do I need to add every time"?
Well, it is not a hindrance, you can analyse an error even if it never happens on some types of accounts or trading platforms.
The only question is the unambiguity of the necessary reaction - if it is clear what to do, you can do it inside the engine.
I wonder what other possible actions can be taken in response to a requote other than retrying the trade request?