Sponsors
Major Sponsor: Alpari
Golden Sponsor: United World Capital
Silver Sponsor: RoboForex
Organizer
Organizer: MetaQuotes Software Corp.
MQL5.community

Trading Rules of the Automated Trading Championship 2012

[ru]

Any competition consists of the rules mandatory for all its participants. A special group of accounts will be allocated on MetaQuotes-Demo trade server (access.metatrader5.com:443) for the Automated Trading Championship 2012. These accounts will operate under the definite trading conditions.

Each ATC 2012 participant should know that conditions well. Note that an Expert Advisor, which does not consider the differences between the competition accounts and common demo ones on MetaQuotes-Demo server, can violate the Rules and run into disqualification during the Championship. Such things already happened in the past competitions.

Besides, do not forget about point 7 of paragraph III of the Rules:

Expert Advisors may contain limitation on their usage outside the Championship, but must satisfy the following demands:

  • Be operable and testable throughout the time period of January 1st 2012 to December 31st 2012
  • Be operable with accounts numbered from 1 100 000 to 1 200 000


All Participants Get Test Accounts at Their Profiles

Each participant gets a special test trading account with virtual $10 000 after the registration to prepare for the Championship. You should connect to this account using specified login and password to test your Expert Advisor in the appropriate trading conditions of the coming competition.

Connecting to the test trading account

Launch your Expert Advisor on a test account to detect any possible errors in your trading robot algorithm in real time. You still have enough time to check your robot in the appropriate trading conditions till the end of the registration.

You can get a new test account at any time! If you need a new test account, for example, due to balance decrease when performing trade operations, we will provide you with one. Just leave a new test account request message in your Profile.

Test your Expert Advisor in the Strategy Tester connecting to the test account provided in your Profile to ensure your participation in the Automated Trading Championship 2012. Only in that case the Championship trading conditions will be considered and the necessary trading environment for a trading robot operation will be used during the tests.

 

12 Currency Pairs and 100 Pending Orders

You can create a trading robot that works with any of 12 available currency pairs listed in Contract Specifications. If for some reason an Expert Advisor will try to trade a symbol, which is not allowed by the Rules, it will get an error. Multiple errors will result in disqualification. The list of available symbols can be received from MQL5 language using the following functions:

Twelve currency pairs available for the Championship allow to create multicurrency trading strategies. These Expert Advisors were often observed at the previous Championship and analyzed in reports, for example, in Multicurrency Expert Advisors in the ATC 2011.

An important amendment to the Rules has been made in favor of multicurrency Expert Advisors this year. Up to 100 pending orders in a trading system can now be used, while only 12 ones were allowed at the previous Championship.

 

Minimum and Maximum Order Volumes

Point 4 of IV. Trading terms states as follows:

The minimum trading amount is 0.01 lots, and the maximum is 5 lots, with an increase by 0.01 lot on every order.

It means that the volume should be within the range from 0.01 to 5.0 lots in sent trade requests. If a volume is less than 0.01 lots or exceeds 5 lots, such a request will not be executed and return an error. Multiple incorrect trade requests sent to the trade server will result in blocking trade operations for an account and subsequent disqualification.

Besides, the volume should be a multiple of the minimum step of 0.01 lots. It means that you can specify the volume equal to 0.01, 0.02, 0.03, etc. up to 4.99 and 5.00 lots. If your trading system uses volumes calculation for trading operations, check and adjust the volume considering this requirement. See also the article Limitations and Verifications in Expert Advisors.

Minimum and maximum allowable volume values, as well as the minimum volume step can be obtained using SymbolInfoDouble() function:

//--- minimum allowable volume for trading operations
   double min_volume=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_MIN);

//--- maximum allowable volume for trading operations
   double max_volume=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_MAX);
//--- getting minimum volume step
   double volume_step=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_STEP);

 

Limitation to 15 Lots Per Symbol in One Direction

Another requirement in trading conditions concerns the total volume of an open position and pending orders per one symbol. Point 6 of the paragraph IV. Trading terms contains a detailed description:

The maximum allowed total volume of an open position and pending orders in one direction (either buy or sell) is 15 lots for each symbol. It means that if you have an open 15-lot Buy position, you can place a 15-lot pending Sell Limit order.

But in this case you cannot place a pending Buy Limit order (since the total volume in one direction will exceed the limit) or place a Sell Limit order above 15 lots.

Thus, you can set up to 100 pending orders per one symbol, if you like, but if the volume of the position exceeds maximum allowable 15 lots during their activation, this will be considered as a programming error. Such errors lead to disqualification.

If a position exceeding 5 lots has been opened on a currency pair, you can close it correctly in two ways:

  • close it consistently in a series of several deals in the opposite direction. Each deal must not exceed 5 lots;
  • specify Stop Loss or Take Profit level for the position, at which it will be closed automatically.

 

Stop Out Level Is 50%

When opening a position, the necessary funds in a margin currency are reserved on a trading account (see contract specifications for a symbol for more details). The ratio of margin to equity is called a margin level. Stop Out level is closely related to the margin level, as Stop Out is a forced closing of a worst position to restore the required margin level. If several positions are open, closing is continued until the margin level exceeds the Stop Out level.

This parameter equals to 50% at the Championship. It means that if the margin level falls below 50%, the most loss-making position will be closed. Please note that Stop Out event is regarded as a trading strategy error during automatic tests of submitted Expert Advisors. Such a trading robot will not be accepted for participation.

 

Dynamic Work with Symbols Settings

Contract specifications containing spread values and stop levels (Limit & Stop levels) are specified in the Championship Rules:

  • Stop levels — price band (in points) from the current price, within which you can't place levels of Stop Loss, Take Profit and pending orders. At the attempt to place an order inside this range, a server will return "Invalid Stops" and won't accept the order;

But it is also stated in the specification that:

According to the Championship Rules, each competing Expert Advisor must properly consider symbol settings without rigidly specified parameters. Spreads and minimum deviations from the market prices can dynamically change dependent on the market conditions. While volatility is high or the news are arriving, there can occur problems with trade execution or order modification.

Therefore, it would be unwise to rigidly implement this parameters into a program code of your Expert Advisor. In case of this requirement violation, a participant may be disqualified.

Before sending a trade request, spread and stop level values can be obtained using SymbolInfoInteger() function:

  • SymbolInfoInteger(symbol_name, SYMBOL_SPREAD);
  • SymbolInfoInteger(symbol_name, SYMBOL_TRADE_STOPS_LEVEL).

See also the example for SymbolInfoDouble() function.

 

Requotes Processing

Pay attention to the point 8 of IV. Trading Terms:

The trading conditions will be created as realistically as possible:

  • Trade request processing time from 2 to 7 seconds
  • Requotes will be present

Requote means that a price has changed during a trade request processing and you will be offered the current actual price in the server response. This requote price can be found in bid and ask fields of MqlTradeResult structure (trade request result):

Fields description

Field Description
retcode Return code of a trade server
deal Deal ticket, if a deal has been performed. It is available for a trade operation of TRADE_ACTION_DEAL type
order Order ticket, if an order has been placed. It is available for a trade operation of TRADE_ACTION_PENDING type
volume Deal volume, confirmed by broker. It depends on the order filling type
price Deal price, confirmed by broker. It depends on the deviation field of the trade request and/or on the trade operation
bid The current market Bid price (requote price)
ask The current market Ask price (requote price)
comment The broker comment to operation (by default it is filled by the operation description)

You can send a new trade request with the offered price, if the deals are performed on the market conditions, or you can consider the price when setting pending orders or Stop Loss/Take Profit levels for open positions.

 

Conclusion

Even if your Expert Advisor successfully compiles and shows good results in the Strategy Tester, there is a possibility that it will not pass automatic tests due to inability to match the trading conditions described above. Less than 3 months have already left before the end of the registration. Therefore, we urge you to send your trading robot for tests as soon as possible.

In the remaining time you will be able to easily find and fix all errors instead of frantically trying to fix a code under deadline pressure. That has already happened in the past years and we sincerely regret that many interesting trading robots have not reached the Championship due to careless mistakes.

Published by: MetaQuotes Created: 16 July 2012  Print version
How to Submit an Expert Advisor to the ChampionshipHow to Submit an Expert Advisor to the Championship

More than a month has passed since the start of the registration for the Automated Trading Championship 2012, and we already have about 1000 applicants. This figure significantly exceeds the last year one, as we got about 700 applicants for the first month in 2011. In this article we will deal with submitting Expert Advisor files to the Championship.

Automatic Tests or How to Get to the Championship Starting Line

Automatic Tests or How to Get to the Championship Starting Line

Each trading robot submitted to the Automated Trading Championship 2012 should undergo a series of the automatic tests. They allow to sort out MQL5 codes that just get compiled from the actually well thought-out trading robots. We will take a close look at the automatic tests, the most typical errors and the ways to avoid them.

 Previous Next 

In Appendix 1 is mentioned that the Stop Level for EURUSD is 40 points!! is this the maximum Stop Level? cause in my practice account from championship the Stop Level is less than 20 points, or maybe it changes during the championship? would you please let me know the range?!

 

2012.07.23 09:55 NimaAndMasoud

Nobody can answer about range of Stop Levels. That's why we have in the Rules:

Dynamic Work with Symbols Settings

Contract specifications containing spread values and stop levels (Limit & Stop levels) are specified in the Championship Rules:

  • Stop levels — price band (in points) from the current price, within which you can't place levels of Stop Loss, Take Profit and pending orders. At the attempt to place an order inside this range, a server will return "Invalid Stops" and won't accept the order;

But it is also stated in the specification that:

According to the Championship Rules, each competing Expert Advisor must properly consider symbol settings without rigidly specified parameters. Spreads and minimum deviations from the market prices can dynamically change dependent on the market conditions. While volatility is high or the news are arriving, there can occur problems with trade execution or order modification.

Therefore, it would be unwise to rigidly implement this parameters into a program code of your Expert Advisor. In case of this requirement violation, a participant may be disqualified.


2012.07.23 16:24 Rosh

It states in the Championship Rules that an EA "Be operable and testable throughout the time period of January 1st 2012 to December 31st 2012".  In last year's competition, I recall a few EA's got disqualified because they started trading before October 1st since they were loaded on the demo servers September 30th.  Is it acceptable to use code in the EA to check the trade server time (when not testing/optimizing) that insures no new positions are taken until the month is greater than September 2012?  The EA would technically still be operable but wouldn't put on trades from January 1 - September 30th if used on demo/real account.

2012.08.24 13:54 dlewisfl361

Regarding the "Stop Out Level is 50%", it says "Please note that Stop Out event is regarded as a trading strategy error during automatic tests of submitted Expert Advisors.".  My EA passed the automatic test but it violates this rule if I understand it correclty.

Strategy Tester Visual Mode

 This is the the first trade in Strategy Tester for my EA that passed the automated test.  It has used over 95% of the beginning margin of $10k, and current margin is actually GREATER THAN equity.  Shouldn't this fail the 50% test?

 

*** No need to reply, found the answer over on mql5.com ***
2012.08.28 17:46 dlewisfl361