Discussion of article "The checks a trading robot must pass before publication in the Market" - page 26
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
This seems to be a flaw in the automatic validation system itself, so I believe the suggestion below applies to this error as well [no history data from... to...]:
This is an internal error of the automatic validation infrastructure. It's not related to your product. You can't do anything about it. Just wait a while while MetaQuotes fixes the problem. If you think you've waited long enough and the problem persists, contact technical support and wait some more ;-).
Can anyone tell me what this means? What else do I need to do to analyse the compiled file?
Automatic translation of the content of the attached image to facilitate analysis by users from all sections of the forum:
Site window (title: New Version)
Section 1 - Additional file
Select file: No file selected
Analyse compiled file
Allowed file extension: .ex4
Section 2 - Specify recommended spread value
Current spread
Buttons at the bottom
Save
Cancel
I just tested the automatic validation system and it worked normally:
I think it's a problem with your code... What version of the compiler did you use?
Forum on trading, automated trading systems and testing trading strategies
Discussion of article "The checks a trading robot must pass before publication in the Market"
Fernando Carreiro, 2025.08.24 00:37
It has already been stated here on this topic and in the Market rules, that you are not allowed to limit your EA in any way, not even to any particular symbol or time-frame. It must be able to operate with any and all symbols or time-frames, even if it is designed for specific trading environment in particular. Your EA must be coded to adjust to different contract specifications and broker conditions irrespectively.
Нехватка средств для проведения торговой операции
Before each sending of a trade order, you should check the sufficiency of funds in your account. Insufficient funds to secure a future open position or order is considered a gross error.
Keep in mind that even apending order may require collateral - margin.
We recommend testing your trading robot with a known small initial deposit, for example, 1 USD or 1 Euro.
If the test shows that there are not enough funds to execute a trade operation, it is necessary to generate an error message in the log instead of calling the OrderSend() function. Examples of the check:
This check is not sufficient when using pending orders!
There is no guarantee to pass the check:
test on EURUSD,H1 2023.04.28 17:00:38 Tester: not enough money to buy 0.60 EURUSD at 1.10395 sl: 0.00000 tp: 0.00000 [2023.04.28 17:00] 2023.04.28 17:00:38 Tester: PrevBalance: 10272.11, PrevPL: -4308.04, PrevEquity 5964.07, PrevMargin: 6271.62, NewMargin: 6293, FreeMargin: -328.50 2023.04.28 17:00:38 Tester: pending order is deleted [no enough money] strategy tester report 360 total trades
We will have to check the margin on every tick.... And what do we achieve by this? Additional load on the server?
We'll have to check the margin on every tick... And what do we gain by doing that? Additional load on the server?
Forum on trading, automated trading systems and testing trading strategies.
Automatic product testing in the Market (questions and suggestions)
fxsaber, 2025.12.30 13:26
I don't see the lack of margin for an order as a mistake. But Market does not agree with me.
It is enough to make such a check only in OnTrade.
It may be sufficient to do this in Tester only.
I agree, it is enough for publishing.
It is enough to do this check only in OnTrade.
I'm not sure here. It's probably too late to check the margin in OnTrade.
Called in Expert Advisors when the Trade event occurs, which is generated when a trade operation is completed on the trade server
I'm not sure about that. It's probably too late to check the margin in OnTrade.
The levels of placed orders/SL/TP are always known. Accordingly, you can calculate the situation on the account, when prices (Ask/Bid) will reach these levels - from the closest to the current state. If the situation shows that the margin will not be enough, delete the corresponding order. This approach allows you to work only in OnTrade.
It is enough to write such a universal public function that can be called for all published Market Advisors in OnTrade. And then, probably, all the problems with Market Expert Advisors will be solved.