Inside bars EA

13 December 2017, 12:09
Jan Flodin
4
5 208

The main purpose of this blog is to describe and explain the input parameters of my Inside bars EA (MT4 version / MT5 version). The default settings are suitable for GBPUSD H1.

Please check out other inside bars products for MT4:
Candle patterns scannerPennants and Triangles scanner

For MT5:
Candle patterns scannerPennants and Triangles scanner

Whenever there is an available update of the EA I recommend you to wait with updating until all open positions by the EA have been closed. You can update it without removing the previous version from the chart. Before updating I also recomend to turn off AutoTrading and after the update please control that the input parameters have not changed on each chart where the EA is loaded. Then you can turn on AutoTrading/Algo Trading again.

I strongly recommend you to do your own backtesting and fine tuning in the strategy tester before starting to trade on a live account. If you are using settings which involves intracandle actions (trailing stop for instance) then always use the 'Every tick based on real ticks' option in MT5 and 'Every tick' (emulated ticks) in MT4 if you are using settings where intracandle activities are involved, such as trailing stop.

Input parameters

Parameters marked with an asterisk (*) in the beginning are only available in the MT5 version and parameters marked with two asterisks (**) in the beginning are only available in the MT4 version.
  • GENERAL SETTINGS
    • ** 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.
    • 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 without having to wait for a bar to have it's close price below/above the master bars low/high. On the other hand, the signal could be less reliable.
    • Maximum candles signal is valid for - Default is 4. The signal will be invalidated and the market order will not be placed after this amount of bars (counted from the last inside bar).
    • Offset in points from candle high/low (<0=ADR%) - Distance for opening a market order counted from the master candle high/low (if Wait for candle close has been set to 'false'). The offset is automatically added based on your offset setting. So if you for instance have set the offset to 20 points the open price of the order will be 20 points away from the candle high/low price.
    • ADR period (days) - Average daily range over the past xx days. Default is 60.
  • INSIDE CANDLES SETTINGS
    • Trade inside candles - 'true' or 'false'.
    • Amount of inside candles - If set to 3 then the formation including the master (mother) bar will consist of 4 bars.
    • Minimum master candle size in points (<0=ADR%) - If you are not using ADR (negative values) then normally you will have to add one or two decimals to this value for other symbols than currencies.
    • Maximum master candle size in points (<0=ADR%)
    • Candle filters - List box with the following selections:
      • Disabled
      • Ignore wicks on inside candles - only the body of each candle will be counted.
  • PENNANT/TRIANGLE SETTINGS
    • Trade pennants/triangles - 'true' or 'false'. Please read more here. Setting this to 'true' will activate trading of a fixed inside bar formation consisting of 4 candles. The first Master candle followed by 3 candles which are getting smaller and smaller (always inside the previous candle). On a lower time frame a pennant or triangle will be visible. Very few trades will be taken. There is no built in logic in which direction the trade should be taken. It will just trade on an outbreak of the master candle or of the last candle in the formation.
    • 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.
  • TRADING FILTERS
    • Trade only between given times (server 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) - Can be set to avoid taking trades with high spread directly after midnight market opening or at news releases. Useful for those with variable spreads.
  • ORDER MANAGEMENT (levels are in points)
    • Risk in percentage (>0 = auto lot) - If set to 0 the Manual lots value will be used. If set to > 0 then the EA will use money management if combined with a broker stop loss. The account free margin (in the deposit currency) is used for the risk calculation. The risk calculation might not work properly with indices. Please then set this value to 0 and adjust the Manual lot according to your own risk management rules.
    • Manual lots - used if Risk above is set to 0.
    • Type of stop loss - listbox with the following selections:
      • Fixed
      • At master candle high/low
      • ATR based
    • Fixed stop loss (<0=ADR%) - used if Fixed has been selected above.
    • Take profit method - listbox with the following selections:
      • 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) - If you for instance would like RR 1:3 you need to set the value to 3 in this parameter.
      • Master candle height
      • Half Master candle height
    • Fixed take profit (<0=ADR%) - used if Fixed has been selected above.
    • Trailing stop (<0=ADR%) - Will trail the stop loss constantly with the distance you have set as soon as the trade is in profit.
    • Trailing step - If the trailing step is set to 0 then the trailing stop will be adjusted each second. Else the trailing stop will be adjusted every time the price has moved the amount of points you have set here. Example: you have set the trailing step to 5 and trailing stop to 50 (which means T/P is 50 points away from the current price), the traling stop will be adjusted every time the price has moved 5 points in your favour.
    • Risk/Reward ratio (based on SL) - You need to set the “Take profit method” parameter to Risk/Reward in order for this value to have any effect. You need also to set “Type of stop-loss” to Fixed and a fixed stop loss value. A stop loss value of 200 points and a R/R ratio of 1.5 would mean that the take profit level would be automatically set to 300 points when an order is opened.
    • Break-even (0 = disabled) - Break-even level. If for instance break-even is set to 10 (points) and trigger below set to 100 (points) then the SL will be set 10 points above/below the entry price when the trade has reached 100 points profit.
    • Break-even trigger - price has to reach this level before the stop loss will be moved to break-even.
  • ATR SETTINGS
    • ATR period
    • Take profit 1 ATR multiplier
    • Take profit 2 ATR multiplier
    • Stop loss ATR multiplier
  • MOVING AVERAGE (MA) SETTINGS
    • Use trend moving average - With this option enabled trades will only be placed when the signal is above/below the MA.
    • MA period
    • MA method
    • MA time frame
    • MA price type
    • CHART OBJECTS - Please also see the separate screenshot.
      • Rectangle color for formation
      • Buy line color
      • Sell line color
      • Line width
      • Info panel auto colors - 'true' or 'false'. If set to true the the colors will adjust automatically according to the chart background color.
      • Info panel background color
      • Info panel border color
      • Info panel caption color
      • Info panel text color
    • ALERTS (if Send alert instead of opening trade has been enabled)
      • Set to 'true' for each alert type you would like to activate. All alert types are supported.
    • EA SETTINGS
      • Magic number
      • Order comment prefix
      • Show comments on chart - 'true' or 'false'. Will show status information in a panel in the upper left corner of the chart. The panel can be moved with the mouse.
      • Clear objects - set to 'true' if you would like the rectangles and lines to be deleted from the chart when the EA is reinitialized.


    Share it with friends: