Indices Time Frame BreakOut EA – Settings – Analytics & Forecasts – 10 December 2023

Indices Time Breakout EA Version 1

This document serves as a manual for the EA https://www.mql5.com/en/market/product/109726 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 strict 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 different timeframes on the major stock indices.

WHAT’S IN THIS BLOG POST:

1. Brief Description of the Strategy

2. A detailed list of all the inputs and what they do as well as how they affect trading.

HOW TO USE Indices Time BreakOut EA:

The EA should be placed on the M5,M15,M30 but also different Time Frames on any stock index such as the DAX, NASDAQ, DOW, S&P500 etc….. TEST, TEST, TEST in the strategy tester before you do anthing on any timeframe and underlying asset because the character of the market could changed rapidly.

Finding the open for Frankfurt and New York:

The EA was developed to trade indices on the Frankfurt and New York stock exchanges so you need to tell it when these times are. As brokers candle close times will vary you will need to work this out.

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 PepperStone   – / its Server time on MT4 and MT5 is set to GMT +3 while US daylight savings is in place, and GMT+2 when the US is not under daylight savings / will have the open in Frankfurt at 10:00 and New York at 16:30.

Strategy

The user defines the underlying asset and identifies a candle /bar/ on it, with high and low values serving as entry points for a position. The underlying assets are stock indices, and the signal candle is determined by the time frame of the asset’s chart to which the Expert Advisor (EA) is attached. For example, selecting a chart displaying the DAX index with a 15-minute time frame means the signal candle  is 15 minutes bar, and its end time is defined by the user as the entry point for the program.

If there is a breakout of the high of signal bar, the program enters a long position based on predefined trading parameters within the EA. Conversely, if the low of the signal candle is broken out, the program enters a short position. The program enables having both short and long positions open simultaneously. During trading day, the program enters both long and short positions at the first fulfillment of the specified conditions, and only one entry per position is allowed per day.

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. It is very beneficial for being profitable with this EA to FULLY understand the logic and how it trades.

Basic Principle for Setting

The program menu is logically divided into the following sections:

  • SETTINGS LOTS FOR TRADE
  • SELECT TIME FOR SIGNAL BAR
  • SELECT LIMIT TIME FOR OPENING TRADES
  • SELECT TIME FOR CLOSING OPEN POSITIONS
  • CHOOSING TRADING DIRECTION
  • SETTING STOP LOSS
  • SETTING FIRST PROFIT TAKING
  • SETTING SECOND PROFIT TAKING
  • STOP LOSS SETTING MOVEMENT
  • CONFLUENCES ON LARGE OF SIGNAL BAR

The sections have dropdown menus from which the user selects the required method. Subsequently, based on the chosen method, the relevant section parameters are set. Other values in the section, which are irrelevant for the selected method, are considered non-used and become relevant only if a method utilizing them is selected.

MENU

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 or more instruments, use unique magic numbers on each instance.

SETTING LOTS FOR TRADE

Choose Method for Setting Lots for Trade – User can use three methods of setting Lots for trade.

1/ Fix Number of Lots:   User types a fix number of lots he wants to trade.

2/ Maximum  Amount of Money to Risk per Trade:  User defines how much Money he wants to risk in one trade. The program will calculate how many lots will be traded.

3/ Percentage of Equity to Risk per Trade : User defines the percentage of Equity he wants to risk in one trade and the program will calculate the amount of lots.

SELECT TIME FOR SIGNAL BAR

Signal Time Hour: The HOUR of Signal bar to be trade

Signal Time Minutes: The MINUTE of Signal bar to be finished

Entry Additional Points: How many POINTS to be added to selected Signal BAR for opening the trade

SL Additional Points: How many POINTS to be added to selected Signal BAR for setting up the Stop Loss (In case the Stop Loss is defined as the size of the Signal BAR)

IMPORTANT

The Signal Time Hour and Minutes define the closing time of the signal bar. For example, if the EA is attached to a chart displaying the DAX asset with a 15-minute time frame, and the Signal Time Hour is set to 10, and Signal Time Minutes is set to 30, the signal bar is a 15-minute candle starting at 10:15 and closing at 10:30.

IMPORTANT NOTE ON 2 DIGIT BROKERS WITH INDICES:
Menu examples are based on a single digit broker (e.g.PepperStone) who quote a price as 16525.5 or 30254.5 etc…
Some brokers /ICMARKET/ quote 2 digits so those examples above would become 16525.50 and 30254.50.
With these 2 digit brokers any inputs relating to pips you need an extra 0 for. So if we set Entry additional point to 100 and having PepperStone, it means that entry for long position will be high of Signal Bar + 10 pips. If we have ICMARKET, Entry aditional Points have to be 1000.

SELECT LIMIT TIME FOR OPENING TRADES

Choose Limit Time for Opening Trades: It allows the user to choose between two methods for determining the entry end /limit/ time when the EA can enter a trade if the conditions of the breakout strategy are met.

1/ Limit Time  as Limit Hour, Limit Minutes      

                Limit Time Hour:           User sets the HOUR

                Limit Time Minutes:      User sets the MINUTE

2/ Limit Time as Minutes from Signal BAR: User defines the period of MINUTES during which the trade can be open when the conditions for the trade a fullfilled. The MINUTES count from closing up the selected BAR for trading.

SELECT TIME FOR CLOSING OPEN POSITIONS


Stop Time Hour:     User defines the HOUR of closing the trade

Stop Time Minutes:  User defines the Minute of closing the trade

True-Close Open Positions of Stop Time:    TRUE or FALSE

If TRUE – the trade will be closed at defined time.

If FALSE – the trade will continue

IMPORTANT: TRUE positions enables to close the open trades no matter the trading position is in profit or in loss. This option is used by traders to avoid trading during night, for example.

CHOOSING TRADING DIRECTION

Choosing trading Direction System: This setting enables the user to choose which sort of trade shall be open.

1/ Just First Trade:  opens first trade only – whether Long or Short, depends which conditions will be fulfilled sooner.

2 / Only Long/Buy Position:  opens LONG position only if the conditions are fulfilled

3/ Only Short/Sell Position: opens SHORT position only if the conditions are fulfilled

4/ Sell and Buy Positions: opens both LONG and SHORT position when the conditions for trade are meet.

IMPORTANT:  The program opens trade if the conditions are fulfilled, maximum 1 trade on one position in LONG and SHORT per day. In case the position is not closed during trading day then it continues into next trading day and EA does not open position in direction (LONG or SHORT)  of the open position from previous day.

SETTING STOP LOSS

Choosing Stop Loss Setting : User can choose Stop Loss setting from 2 methods.

1/ Percentage % of Signal Bar: This option enables to set the size of Stop Loss calculating out from the size of the traded Signal BAR as its percentage. 100 = full size of the BAR, 60 = 60% of size of the Signal Bar

2/ SL – Setting in Points: In this option user defines the Stop Loss in POINTS.

IMPORTANT: If use stop loss setting as % of Signal Bar, the size of Signal Bar = (size of Signal Bar+Entry Aditional Points+Sl Aditional Points)

SETTING FIRST PROFIT TAKING

Program enables partial Profit Taking of trade at two levels. This part defines method for 1st Profit Taking level. The volume for closing at profit taking level 1 is setting over menu input – Percentage of Initial Volume to be closed at PT1.

Choosing 1st Profit Taking Setting : User can choose setting Profit Taking Level 1 over three methods.

1/ PT1- Percentage % of Size of Signal Bar: This option enables to set the level of PT1 calculating out from the size of the traded Signal BAR. 50 = means 50% of size of Signal Bar. If size of Bar is 30 pips,  PT1 will be 15 pips.

2/ PT1 – Setting in Points:  setting in points

3/ no PT – closing by Trailling Stop Loss from Spot:  If this option is selected, the position doesn’t have a profit-taking level, but it closes entire position /all volume/   on a trailing stop-loss. An initial trailing stop-loss of  position is activated, meaning that with every 1-pip profit movement, the stop-loss position is adjusted /trailed/. Therefore, the position closes if a pullback occurs equal to the stop-loss level of the position.

Percentage % of Initial Volume to be closed at PT1:      – this option defines how many percent % of volume of position will be closed in PT1. The rest of the position will be closed in SETTING SECOND PROFIT TAKING. For example: If there is 100. It means that entire trade will be closed at PT1. If there is 60, it means that 60% of volume will be closed at PT1 and the rest /40%/ of trade will be closed at PT2 setting. This setting is relevant just for 1st and 2nd methods for setting PT1.

IMPORTANT: If the part of the position is closed in PT1 the Stop Loss will be ALWAYS immediately moved to Breakeven (Opening level) of position . If the Stop Loss has already being moved to better level than BE level according to setting SL in section STOP LOSS SETTING MOVEMENT, the better level of SL will remain.

SETTING SECOND PROFIT TAKING

Choosing 2nd Profit Taking Setting:  User can choose setting Profit Taking Level 2 over three methods.

1/ Fixed PT2 – distance in Points from PT1:   User defines how many Points from PT1 – first profit taking level in positive direction – need to be achieved to close the rest of trade -relevant setting if Fix Profit Taking Level is chosen

2/ Trailling Stop-Distance in points from PT1:  User defines how many Points from PT1 in positive DIRECTION need to be achieved to start trailing the Stop Loss from PT1 relevant setting if Trailing Stop Loss-based on Points is chosen

3/ if the method – Trailling Stop Loss-based on Bars is chosen: Stop Loss will be trailed according to bars defined in relevant inputs and will close the trade when the lowest  (LONG position) or highest (SHORT position) value of the selected NUMBER of BARs is achieved.

Number of Bars for Trailing:   User defines how many BARs shall be counted.

Time Frame for Bars:  User defines the Time Frame of the BARs (e.g. 1 min. Bar, 5 min. Bar.,…)

STOP LOSS SETTING MOVEMENT

Choosing Stop Loss Setting Moving Method : User can set an independent move of initial Stop Loss position.  Chosen move of Stop Loss will always be terminated /finnished/ when position achieves the level of PT1. There are 5 possibilities for setting this move of SL of position.

1/ No Stop Loss Moving: This option turns off Stop Loss moving.  Stop Loss will be moved to Breakeven if the level of PT1 will be achieved, only.

2/ Trailing from Spot/BE/ Immediate: Trailing starts immediately. Stop Loss will be moved with every move of the trade in right direction.

3/ Trailing from Distance as % of SB (Signal Bar): Stop Loss trailing will start when the position achieves the level of BE plus distance in trade direction defined as a percentage % of the size of Signal Bar. Relevant input for this method is Distance as Percentage of Size of SB.

4/ Trailing from Distance in Points from BE (Breakeven): Stop Loss trailing will start when the position achieves the level of BE plus distance in trade direction defined in Points. Relevant input for this method is Distance in Points from BE.

5/ Move SL at BE-from Distance as % of SB (Signal Bar): Stop Loss position will move one time only (=no trailing) if the position achieves the level of BE plus distance in trade direction defined as a percentage % of the size of Signal Bar. Relevant input for this method is Distance as Percentage of Size of SB

6/ Move SL at BE- from Distance in Points from BE (Breakeven): Stop Loss position will move one time only (=no trailing) if the position achieves the level of BE plus distance in trade direction defined in Points. Relevant input for this method is Distance in Points from BE.

CONFLUENCES OF LARGE OF SIGNAL BAR

User can adjust the size of the Signal Bar according to his/her preferences.

Adjusting Maximal Size of SB

FALSE: this function is switched off

TRUE:  this function is switched on

         Minimum Size of SB in Points: defines the value of Signal Bar size to be exceeded and recalculated to the size defined in Changing Maximum to Adjusting Points

Changing Maximum to Adjusting Points: User adjusts the size of Signal Ba

Example:  User defines the maximal size of Signal Bar to 50 pips (broker calculates 1 decimal place, the value will be 500). Changing Maximum to Adjusting Points user defines to 40 pips (broker value 400). It means if the size of Signal Bar is =>50 pips the size of the Signal Bar will be adjusted to 40 pips, only. From this value (40 pips) the menu settings concerning  stop loss, profit taking will be calculated if methods selected by user is based on size of signal bar and not points.

Adjusting Minimal Size of SB

FALSE: this function is switched off

TRUE:  the function is switched on

Minimal Size of SB in Points:    defines the value of Signal Bar size not to be exceeded and recalculated to the size defined in Changing Minimum to Adjusting Points

Changing Minimum to Adjusting Points: User adjusts the size of Signal Bar 

Example:  User defines the minimal size of Signal Bar to 20 pips (broker calculates 1 decimal place, the value will be 200). Changing Minimum to Adjusting Points user defines to 30 pips (broker value 300). It means if the size of Signal Bar <=20 pips the size of the Signal Bar will be adjusted to 30 pips. From this value (30 pips) the menu settings concerning  stop loss, profit taking will be calculated if method selected by user is based on size of signal bar and not points

 





















Source link

Comments are closed.