Opening Range Breakout EA Version 2 Settings – Analytics & Forecasts – 3 January 2023
The Opening Range Breakout EA Version 2 This document serves as a manual for the EA https://www.mql5.com/en/market/product/90502/ and will be updated as and when required. IMPORTANT NOTE:Please DO NOT use the default settings in the EA, those settings are not designed to be used for real trading. EAs listed on the MQL5 marketplace have to undergo stict testing criteria
The Opening Range Breakout EA Version 2
This document serves as a manual for the EA https://www.mql5.com/en/market/product/90502/ and will be updated as and when required.
IMPORTANT NOTE:
Please DO NOT use the default settings in the EA, those settings are not designed to be used for real trading. EAs listed on the MQL5 marketplace have to undergo stict testing criteria on multiple instruments and timeframes and while this is good for testing the logic and code of an EA this hinders being able to list EAs that are designed to work on specific instruments and timeframes like this one. So the default settings are designed to get the EA to pass these tests on hourly and daily timeframes which it’s not designed to run on but has to pass validation for. 🙂
The EA is designed to be run on the M5 timeframe as it monitors opening range activity on the major stock indices. It is to be used on stock indices as they have a fixed open where volatility is guaranteed and this EAs edge exploits that, it has not been tested on any other instrument and is not designed to work on anything else but feel free to test away if you wish.
WHAT’S IN THIS BLOG POST:
1. NOT the strategy, that’s listed in another post, a strategy guide to how the EA trades can be found here: https://www.mql5.com/en/blogs/post/751229
2. A detailed list of all the inputs and what they do as well as how they affect trading.
HOW TO USE THE RANGE BREAKOUT EA:
The EA should be placed on the M5 timeframe on any stock index such as the DAX, NASDAQ, DOW, S&P500 etc….. TEST, TEST, TEST in the strategy tester before you do anything on any other timeframe if you wish to try but no other timeframe other than M5 has been tested so do so at your own risk!
Finding the open for Frankfurt and New York:
The EA was developed to trade the open of the Frankfurt and New York stock exchanges so you need to tell it when these times are. As brokers candle close times wil vary you will need to work this out and it can be tricky but there is a very simple way to do this using volume.
If you are using the EA to trade the Frankfurt open that is at 9am (8am GMT), the New York open is 9:30am (14:30pm GMT). Your brokers candles however will likely not be those times. For example with the broker Roboforex who uses UTC+2 candles (which the majority of brokers now do) will have the open in Frankfurt at 10:00 and New York at 16:30.
So lets use volume to confirm we’ve got the right open time.
First open the instument you want to trade like the DAX, DOW, NASDAQ etc….
Then right click on the chart and make sure you have volume checked in the common properties tab as shown below.
Now you will see the volume from your broker shown on the bottom of the chart. You can clearly see at 10:00am on the DAX index on my brokers chart that the volume doubles and is often even larger.
Likewise on the US indices like the NASDAQ in the example below you will see a substantial increase in volume at 16:30 on the chart which is 2:30pm UK (9:30am NY).
This is the open.
INPUTS FOR THE EA:
Here I’ll detail every input and what impact it has on trading activity. I would strongly recommend you put the EA in the visual backtest, play with these settings and see for yourself what happens. You can fine tune the EA to trade with a high strike rate and small wins, low strike rate and huge home run wins and everything in between. How YOU PERSONALLY want the EA to trade to help with either your personal account or passing a prop firm evaluation will differ from the next trader so set it to trade how YOU want it by seeing how it works. Some people are happy with 30-50% drawdown on a proven long term edge, others can’t stand losing more than 3-5 trades in a row without giving up, who you are is important, even with an automated strategy, don’t ever blindly add an EA to a live account without FULLY understanding the logic and how it trades.
INPUTS:
— ACCOUNTS + LIMITS —
This section has 2 functions. It allows you to monitor balances and set targets for the EA to reach on a daily basis as well as controlling daily losses. This section was introduced specifically for those looking to pass prop firm evaluations so they can set realistic daily goals while ensuring the EA will not blow their evaluation if a losing run is experienced by closing out all positions.
Account starting balance – (NUMBER INPUT) – Set the starting balance of the account here. This is used in calculations shown on the info panel if you have it turned on.
Profit target to reach – (NUMBER INPUT) – Set the target for the account to reach. This is used to calculate how far you have to go and is displayed on the info panel. The EA does NOT use this figure for anything but calculations to be displayed.
Daily profit target to stop trading – (NUMBER INPUT) – Set the daily profit target you would like the EA to achieve each day. This setting is important and server 2 purposes.
- If you set the input below (Close all trades and stop when target hit) to TRUE the EA will close all open positions and cancel pending orders when this figure is achieved and stop trading for the day. This is particularly useful for funded accounts where you want small steady growth or evaluations on prop accounts where you have a minimum number of trading days and you can divide your target by the number of days and enter that figure here.
- If you set the input below (Close all trades and stop when target hit) to FALSE the EA will just tighten up your stops (more on this input further down) and will make sure that your profit is locked in a little tighter so as not to lose it all on a sudden spike against you. NOTE: This also switches to trail on tick mode if you have on candle close selected.
- Regardless of whether you set the input below to TRUE or FALSE the EA will stop trading and take no further trades today when this target is hit. If you want the EA to trade constantly for you then you need to set this figure very high.
Close all trades and stop when target hit – (TRUE/FALSE) – If set to TRUE the EA will monitor the closed profit and open floating profit and then close all positions when your overall profit target is reached. It will place no more pending orders today but will not cancel off existing pending orders that may be in place.
Cancel pendings and stop if target hit – (TRUE/FALSE) – If set to true the EA will check every time a trade is closed and see if the profit target for the day is reached (did that last trade I closed achieve my overall target for today). If so it will cancel pending orders and stop for the day.
Close everything and stop at this loss – (NEGATIVE NUMBER INPUT) – Here you enter a negative number (amount) that you want the EA to stop trading at if reached. e.g. if you enter -2500 the EA will close out all trades that are open and cancel pending orders when your combined open and closed trades reach this figure. This is for those wanting to set a daily loss limit, specifically if you have a prop firm evaluation or simply want to stop bad losing runs which may occur on particularly choppy days.
— RISK & TARGETS —
IMPORTANT NOTE: Only use one of the options below. If you set more than one to TRUE the EA will take multiple trades.
Use a fixed lot size and percent of OR stop – (TRUE/FALSE) – If set to true the EA will place a pending order at the highs and lows of the opening ranges using a fixed lot size you enter in the next input. The stop loss will be placed at a percentage of the opening range it is trading.
Fixed lot size to use – (NUMBER INPUT) – This is the fixed lot size you would like the EA to use when taking trades using the input above.
Use money risk and percentage or OR stop – (TRUE/FALSE) – If set to true the EA will place a pending order at the highs and lows of the opening ranges and calculate the lot size for you based on how far away the stop loss is using the risk amount you specify in the input below. The stop loss will be placed at a percentage of the opening range it is trading.
Amount of money to risk per trade – (NUMBER INPUT) – Select the amount of money to risk on each position taken. This is based on your stop loss and the EA will automatically calculate the correct lot sizing based on how far away the stop loss is placed.
Percent of opening range to use – (NUMBER INPUT) – Enter the percentage away from the pending order you want your stop placed based on the opening range. e.g. if you set the percent of opening range to 100 it will place a stop at the total size of the opening range (the opposite end of the range), if you set it to 50 it will place the stop half way of the opening range. So if the opening range is 40 pips and you selected 50% as your input here the stop would be placed at 20 pips from the pending order.
Use a fixed pip stop and money amount risk – (TRUE/FALSE) – If set to true the EA will use a fixed stop loss you specify in the input below and the lot size will be calculated based on the amount of money you want to risk and distance to your stop loss.
Fixed pip stop to use – (NUMBER INPUT) – This is where you enter the amount for the above input when using a fixed pip stop loss.
Position 1,2 & 3 TP multiplier (percentage of stop loss) – These inputs will calculate where to place your take profits for each position entered based on the stop loss.
For example: If you use 100 as the input the EA will place your TP 100% of the distance of your stop loss. So if your stop loss is 30 pips your take profit will be 30 pips.
Is you input 150 then you are asking the EA to place your take profit at 150% of your stop loss. So in the example of a 30 pip stop loss the take profit would be 45 pips.
If you would prefer to not use a take profit and just trail the stops then just use 1000 as your input for all three and the take profit will be so far away it will never get hit and your trailing stop loss method will get you out of the trades.
Auto exit at percentage of balance – (TRUE/FALSE) – Have the EA automatically close all positions when a percentage target is reached which is a percentage of your account balance. For example if you have a $10,000 account and select a 1% profit target when the total of all positions open reaches $100 the EA will close the trades and bank the profit for you. This setting is great for passing prop firm evaluations and for those that want to make small consistent gains.
Profit percent target – (NUMBER INPUT) – This is where you enter the target from the input above as a percentage of your account balance.
— TRADING RANGES & TIMES —
Minimum opening range – (NUMBER INPUT) – This is the minimum size of the opening range for a trade to take place. Use this to filter out tiny opens where there may be little or no trading volume.
Maximum opening range – (NUMBER INPUT) – This is the maximum size of the opening range. Here you can filter out very large ranges that may indicate a rangebound session could be ahead.
Range 1,2 & 3 start time – (STRING (text) INPUT) – The time you want the EA to start monitoring the ranges. This will typically be the Frankfurt open or the New York open if you ware using the EA for trading the stock market indices as it’s designed for. You can set a different start time for each range but usually these would all be the same time.
Range 1, 2 & 3 end times – (STRING (text) INPUT) – These are the 3 breakout times which is where the EA will place it’s pending orders ready for the market to breakout. So if you selected 10:00 as an open time (Frankfurt on my broker) and you wanted to take the breakout high or low of the 5. 10 and 15 minute bars you would enter 10:05, 10:10 and 10:15 respectively in the inputs. A good strategy is to use multiple entries so you are adding to breakouts that start to work and multiplying profits.
Stop trading time – (STRING (text) INPUT) – This is when the EA will cancel pending orders and stop taking trades that have not triggered. This is designed to make sure if a breakout has happened in one direction we are not leaving old orders lying around that may trigger late in the day. If it’s not broken out and working within the first couple of hours then it’s best to remove the orders.
Close all trades at stop trading time – (TRUE/FALSE) – When set to true this will close out all trades and cancel pending orders at the time specified above. It is advisable to have this set to true to close all positions either by the end of the session or by end of day.
Take range breakout 1,2 & 3 – (TRUE/FALSE) – Select how many breakout levels you want to trade. Trade up to 3 breakout times/levels or just a single one, remember the more you add to a winning breakout the more you can make but conversly if it breakouts out of all 3 and then reverses losses will be higher. Test what works best for you.
IMPORTANT NOTE ON LOGIC USED FOR EACH BREAKOUT LEVEL:
This logic is important to understand as it can effect backtesting results if you decide to NOT use all 3 breakout levels or dont use them in order 1, then 2, then 3.
The logic works as follows:
At the time of the 1st opening range the EA simply places pending orders at the high and low of the range. It then stores these levels.
At the time of the 2nd opening range the EA checks to see if the 2nd range high or low is the same as the first.It then stores the levels of the 2nd range high and low. IF it is then it DOES NOT place an order there.
At the time of the 3rd opening range the EA checks to see if it’s the same as 1 or 2 and if so will not place an order.
So if you are using all 3 opening ranges we are simply making sure we dont place more than one trade at range highs and lows as they happen.
If you only want to use 1 or 2 opening range and not al three you MUST use them in order.
e.g.
If you only want to use 1 rage breakout then you MUST use opening range 1 and turn 2 and 3 to false.
If you want to use 2 ranges you MUST use opening ranges 1 and 2 and turn 3 to false.
If you dont use them in that order and say have opening range 1 false and 2 true it will still check to see if opening range 2 is the same as 1 and if so not place an orders. You have however told the EA not to trade opening range 1 so it will not have placed your order there.
Using the opening ranged in order will never cause you to miss a trade with the EA.
Continuous mode for ORBs 1,2 & 3 – (TRUE/FALSE) – When set to true the EA will re-place pending orders at the selected levels if price closes back inside the range. e.g. if you took a trade at the first opening range and that trade stopped out the EA will re-place that pending order again to have a second attempt at the level. This is extrememly useful when you have a choppy open and you experience a false breakout which later works well once the market has consolidated.
— TRAILING STOPS —
Use a trailing stop loss – (TRUE/FALSE) – Set whether to use a trailing stop loss or not. This is highly recommended to be set to true so you can lock in profit and reduce risk as trades work out in your favour.
Distance to trail stops by – (NUMBER INPUT) – This is the distace the EA will trail your stop by. It will trail in 1 pip increments when activated.
Start trailing stop when in profit by this amount – (NUMBER INPUT) – Will only start to trail your stop loss when the position is in profit by a certain amount of pips which you can set here. 0 (default) will start trailing immediately when in profit.
Tighten trailer to this when profit target is reached – (NUMBER INPUT) – The EA will automatically tighten your trailing stop to this amount when you are at your daily profit target set in the input further up (Profit target to reach). The idea behind this feature is you should start to lock in more profit as you have a larger amount of open floating profits. This safeguards against price moving sharply against you and wiping out the majority of your profits just before you are about to close out a position at the desired amount. It is generally recommended to reduce stops by half when nearing a key profit target. This trailer will always work “on-tick” rather than candle close to ensure you are keeping the profit on pushes locked in as tight as possible.
Use a breakeven stop loss – (TRUE/FALSE) – If set to true the EA will move your stop loss to breakeven to protect your capital when a trade moves into profit. This wil also be offset from your open price by the distance you set in the input in MISC SETTING below called Offset distance for pending orders and breakeven. The offset helps to cover trading costs like spread and commissions.
Distance to trigger breakeven – (NUMBER INPUT) – This is the distance the breakeven stop will trigger. Note this is defaulted to work on candle close unless you state to work on tick in the inputs detailed below.
— ADD TO SINGLES —
Add to single trades when in profit – (TRUE/FALSE) – Taking multiple breakouts automatically adds to breakouts that work for you but if there is just a signle breakout taken the EA can add an additional position to your winners after a certain number of pips to maximise your returns on winners. If set to true here the EA will do that but only if there is just one live trade running and it will only add once.
IMPORTANT NOTE: This function will only fire an order AFTER opening range 3s time so if you intend to only use on or two opening ranges you should set opening range 3 end to match the same as the highest time of the previous opening ranges you are using. This is to stop the EA firing an add on order after opening range 1 and then placing another pending order at opening range 2 meaning you would have three trades on instead of just two.
Distance before an add-on order is placed – (NUMBER INPUT) – This is the distance from the initial entry price needs to be before it adds another position.
— ORDER COMMENTS —
This is the comment that is used when the orders are placed by the EA. You can make this unique to identify the trades in your open positions if required, if you do not use this you can leave blank.
— MISC SETTINGS —
Activate on bar close (on tick otherwise) – (TRUE/FALSE) – This setting affects the following functions of the EA:
- Auto exit at percent balance
- Trailing stop loss
- Breakeven stop loss
- Add to single trades when in profit
You can choose to have these features trigger only when a bar/candle closes (this is default as true) or on every tick. Backtesting has shown that using bar close is more effective as it filters out the sometimes choppy action in a candle which can stop you out on a trailing stop and then continue to run. Conversly using tick will get you out faster if a reversal happens and price moves against you.
Offset distance for pending orders and breakeven – (NUMBER INPUT) – This is the distance the EA will place your pending orders above or below the opening ranges. This will help to mitigate instances where price re-tests the opening range and reverses. Advisable to use 1 or 2 pips here as a setting. This setting also will offset breakeven stops to lock in a little profit to cover trading costs.
Show info panel – (TRUE/FALSE) – This will turn on or off the display on the chart which shows various account and profit/loss information.
Cancel all pending orders at stop trading time if still open – (TRUE/FALSE) – This input will ensure any remaining pending orders that were not triggered during the day or closed by other inputs (stop trading and close all at target) are closed before the next day or session. This is recommended to be left as true so you do not have multiple pending orders build up over time at different levels throughout your instruments.
Magic Number – This should be unique for every instance of the EA so it knows which trades to manage. It will only manage trades it has opened with this number. If you want to run multiple versions of the strategy on the same instrument use multiple magic numbers on each instance.
آموزش مجازی مدیریت عالی حرفه ای کسب و کار Post DBA + مدرک معتبر قابل ترجمه رسمی با مهر دادگستری و وزارت امور خارجه | آموزش مجازی مدیریت عالی و حرفه ای کسب و کار DBA + مدرک معتبر قابل ترجمه رسمی با مهر دادگستری و وزارت امور خارجه | آموزش مجازی مدیریت کسب و کار MBA + مدرک معتبر قابل ترجمه رسمی با مهر دادگستری و وزارت امور خارجه |
مدیریت حرفه ای کافی شاپ | حقوقدان خبره | سرآشپز حرفه ای |
آموزش مجازی تعمیرات موبایل | آموزش مجازی ICDL مهارت های رایانه کار درجه یک و دو | آموزش مجازی کارشناس معاملات املاک_ مشاور املاک |
- نظرات ارسال شده توسط شما، پس از تایید توسط مدیران سایت منتشر خواهد شد.
- نظراتی که حاوی تهمت یا افترا باشد منتشر نخواهد شد.
- نظراتی که به غیر از زبان فارسی یا غیر مرتبط با خبر باشد منتشر نخواهد شد.
ارسال نظر شما
مجموع نظرات : 0 در انتظار بررسی : 0 انتشار یافته : ۰