forex software

Create and Test Forex Strategies

forex software

eas-guide:trading-rules

This is an old revision of the document!


Trading Rules

Expert Advisors

EA Studio Expert Advisors consist of three parts:

  1. Expert Properties – the trading amount, Stop Loss, and Take Profit;
  2. Entry Rules – indicators that determine the conditions for opening a position;
  3. Exit Rules – indicators that determine the conditions for closing the position.

Every part of the Expert Advisor is responsible for a specific task. In order to make the EAs fast and reliable, we provide a predefined strategy structure. This is probably the major difference between the experts created with EA Studio and the experts written manually in MQL. Here all experts follow a specific design which guarantees that the backtest and the following MetaTrader historical test and trade will be equal. You may think at first that this is a limitation, but that concept has several advantages:

  • it provides an unlimited number of combinations;
  • the backtest is extremely fast and automatic generation of experts is possible;
  • the backtest is extremely reliable;
  • live trading signals correspond to the backtest signals (provided that there is no slippage).

EA Studio follows strict trading rules:

  1. All positions open at the beginning of a bar. We use the term Bar Open to identify that. Bar Open is the first tick of a new bar.
  2. The experts are symmetrical – the long trading rules are exactly opposite to the short entry rules. This principle guarantees that the experts will work on both bullish and bearish markets.
  3. As a side effect of the above principle, you set only long trading rules in the indicator slots.
  4. EA Studio opens position when all the conditions in the Entry Rule section are satisfied.
  5. If there is no Entry Rules, or all available Entry Rules are satisfied in both directions, the program does not open a position.
  6. The application closes positions at Bar Open. Exceptions are the Stop Loss and the Take Profit.
  7. If there is no Exit Rules, the program closes every open position at the beginning of the next bar.
  8. If there are Exit Rules, the program closes positions when there is at least one Exit Rule Satisfied. The Exit Rules are also symmetrical for long and for short positions.

You can find more info and examples in the other sections of this help.