• Overview
  • Reviews (2)
  • Comments (24)
  • What's new

Inside bars EA

This Expert Advisor (EA) opens orders when an outbreak from an inside bar formation occurs. It can for example be used with a strategy which you can read more about here:

https://www.mql5.com/en/market/product/23352

The behavior of the EA can be explained in the following steps (please also see separate screenshot for visualization):

  1. Look for a trade when xx amount of inside bars has been reached.
  2. Exit when trailing stop or take profit has been hit.


Features

  • The formations with sell/buy lines will be drawn on the chart as well as the first ATR take profit level.
  • Spread and slippage filter.
  • Possibility for take profit and stop loss based on the ATR indicator or use a risk/reward ratio (based on stop loss).
  • Possibility to select between adding a fixed lot or let the system set the lot size according to risk percentage.
  • Possibility to trade in a reverse way (buy when sell, sell when buy).

The EA supports ECN accounts.

It is recommended to trade a portfolio of minimum 6 pairs (3 pairs and their cross pairs) to reduce risk as much as possible. Please also make sure that you test the EA on a demo account and let at least 15 trades be done.


Parameters

Parameters marked with an asterisk (*) in the beginning are explained here: https://www.mql5.com/en/blogs/post/713791
  • Time frame to operate on - this is intended to work as a protection so that no unwanted trades will be taken in case the timeframe on the chart is manually changed.
  • ECN account - 'true' or 'false'.
  • Send alert instead of opening trade - when set to 'true', an alert will be sent instead of opening a trade.
  • Reverse system (sell when buy, buy when sell) - 'true' or 'false'.
  • Wait for candle close - if 'false', you will be able to catch the movement earlier. On the other hand, the signal could be less reliable.
  • Maximum candles signal is valid for - Default is 4. The market order will not be placed after this amount of bars.
  • * Offset in points from candle high/low
  • Trade inside candles - 'true' or 'false'.
  • Amount of inside candles - Should be set to 4 if using the strategy.
  • Minimum master candle size in points - Recommended 400 points for the strategy.
  • Maximum master candle size in points - Recommended 1000 points for the strategy.
  • Ignore wicks - If set to 'true', only the body of each candle will be counted.
  • * Trade pennants/triangles - 'true' or 'false'. Please read more here: https://www.mql5.com/en/market/product/23290#description.
  • Trade on last candle instead of master candle - 'true' or 'false'. When set to 'true', trade will be opened on outbreak of last candle high/low.
  • Trade only between given times (computer time) - Hour filter for opening trades.
  • Trade from/to time - Hour from/to.
  • Maximum allowed slippage in points - Please note that not all brokers/account types support slippage control.
  • * Maximum allowed spread in points (0 = not used)
  • * Risk in percentage (>0 = auto lot)
  • * Point value for risk percentage
  • Manual lots - used if Risk above is set to 0.
  • Type of stop-loss - listbox with 3 choices:
    • Fixed
    • At master candle high/low
    • ATR based
  • Fixed stop-loss - used if Fixed has been selected above.
  • Take profit method - listbox with 5 choices:
    • Fixed
    • Close whole position at first ATR level
    • Dynamic (half at ATR 1 and rest at ATR 2) - If you will use this option, it is important that your broker supports partial close of an order.
    • Trailing stop only
    • Risk/Reward (based on SL)
  • Fixed take profit - used if Fixed has been selected above.
  • Trailing stop - trail the stop loss constantly with the distance you have set. There is no trailing step level in this system. Instead the trailing stop will be adjusted each third second.
  • * Risk/Reward ratio (based on SL)
  • Break-even (0 = disabled) - breakeven level.
  • Break-even trigger - price has to reach this level before the stop loss will be moved to breakeven.
  • ATR SETTINGS - ATR period and multiplier for take profit and stop loss.
  • OBJECTS - set the color for the rectangle and the buy/sell lines. Please see the separate screenshot.
  • ALERTS (if alert instead of trade is enabled) - set to 'true' for each alert type you would like to activate.
  • Magic number
  • Order comment
  • Clear objects - set to 'true' if you would like the rectangles and lines to be deleted from the chart when the EA is reinitialized.
Matthew Todorovski
13509
Matthew Todorovski 2018.05.10 14:00 
 

User didn't leave any comment to the rating

Singgih Wasito Adhi
381
Singgih Wasito Adhi 2018.04.25 20:47 
 

Lucky to use your ea, good job. thanks for update

Version 1.1 - 2018.01.16
- bug fix regarding the Trade on last candle parameter