System Trading 게시글

Maximize Your Trading with This MA Channel EA for MetaTrader 4

첨부파일
12375.zip (5.93 KB, 다운로드 0회)

Have you ever wanted to harness the power of the Moving Average indicator for smarter trading? This Expert Advisor (EA) does just that! When the price strays from the Moving Average by a specific number of points, it triggers a trade aligned with the direction of the Moving Average line.

While this EA can yield profits, it's important to note that the gains might be modest, and it generally requires a substantial deposit to get started.

The concept for this EA originated with me, and the coding was expertly handled by Sergey Diubakin.

The solid red line in the image represents the Moving Average indicator, while the dotted red line indicates the channel boundary (Range). This boundary is derived from the Moving Average value, and trades are executed upon crossing this line.

When the price reaches the lower channel boundary, the EA initiates a Buy order; conversely, a Sell order is triggered at the upper boundary.

For the EA to place a Buy or Sell order at a candlestick that touches the channel boundary, the High or Low of the preceding candlestick (the "first" bar before the "zero" bar) must be positioned correctly: the High of the "first" bar has to be below the upper channel boundary for a Sell order, while the Low must be above the lower boundary for a Buy order.

This EA also comes with additional plug-in modules: Turn, Step Down, and Trade Time.

  • The Turn module — This feature places limit orders at the Stop Loss level of the main order in the opposite direction, which can be useful if the price continues to diverge from the Moving Average after hitting the channel boundary.
  • The Step Down module — This adds an order in the direction of the main trade. It was successfully utilized in another Expert Advisor.
  • The Trade Time module — This sets the trading time window for the EA (not applicable to orders placed by the Step Down module).

Expert Advisor Settings:

  1. Moving Average
    • Period – This is the parameter from the Moving Average indicator menu.
    • Shift – This is another parameter from the Moving Average indicator menu.
    • Method MA – This parameter comes from the Moving Average indicator settings.
    • Apply to – This specifies the parameter from the Moving Average indicator menu.
    • Range – This is the distance above and below the Moving Average indicator value at that time. Once the price touches this Range level, the EA can open the first main order.
  2. Initial Lot
    • LotConst_or_not – This option allows you to decide whether to trade with a fixed lot or adjust it based on your deposit changes:
      true – the first lot remains fixed at the specified Lots value.
      false – the first lot varies dynamically with deposit changes, depending on the RiskPercent and account balance.
      Lots = AccountBalance() * (RiskPercent / 100.0) / 10000.0
    • Lots – This sets the initial trading lot.
    • RiskPercent – This parameter determines the initial lot size based on the deposit.
  3. Take Profit – This is the desired profit level for an order (measured in points on the chart).
  4. Stop Loss – This is the threshold for a loss on an order (again, measured in points on the chart).
  5. Trailing Stop – This feature automatically moves the Stop Loss level:
    • true – the trailing stop is enabled;
    • false – the trailing stop is disabled.
  6. Module: Turn
    • true – this module is activated;
    • false – this module is deactivated.
    • Turn – This specifies the distance after which an opposite pending order is placed.
    • LotMultiplicator – This is the ratio for increasing the lot size.
    • Turn_TakeProfit – This sets the profit level for orders opened by this module (measured in points).
  7. Module: Step Down
    • true – this module is activated;
    • false – this module is deactivated.
    • Step Down – This defines the distance (gap) between opened orders against the trend.
  8. Module: Trade Time
    • true – this module is activated;
    • false – this module is deactivated.
    • Open Trade – This is the time when the EA can start opening the first main order, assuming there's a signal.
    • Close Trade – This is the time after which the EA will no longer open the first main order.
  9. Magic Number – This unique identifier helps the EA distinguish its own trades from others.
  10. Logo and Data Output – This module lets you enable or disable the earnings display (today, yesterday, etc.):
    • true – module is activated;
    • false – module is deactivated.
  11. Time Frame – This parameter allows you to set the chart's time frame for the EA:
    • Current – the time frame currently set in the terminal.
    • M1, M5, M15, M30, H1, H4, D1, W1, MN1 – these are the fixed time frames available.

연관 포스트

댓글 (0)