Module 2 EA Input and Double in a Day Forex Strategy Generation

Your Double in a Day Forex Strategy

EA Input and Double in a Day Forex Strategy Generation

Input you enter to create a Double in a Day EA Forex strategy.

Before doing EA Input and Double in a Day Forex Strategy Generation let’s have a closer look at the variable or input that you have to enter for the EA to generate your trading strategy. Input required by the Expert Advisor is shown below.

Account size

Although this is a Double in a Day EA, you don’t have to trade your whole account on every trade. This is especially true if you are trade many versions of the EA on one account. If you had a $10,000 demo account for instance, you may only want to use $1,000 fro your first few trades. This EA input allows you to specify the amount of your account you wish to use.

 

If you want to double your account enter 100 into the input. If you want to go for only 20% then enter 20. This variable is sensitive to the margin of safety which we will discuss later on.

 

Direction

The trader determines the direction. You can use the guidance given in the course (see later on in the course) or your preferred trading technique.

BUY direction

 

SELL Direction

 

Using The SMA to determine direction, use option 2. Enter settings for the Simple Moving Average (SMA) you would like to use. The EA will enter sell trades when the price is below the SMA at the time of the entry decision. When the price is above it will enter buys. Also select the timeframe you wish to use for the SMA calculation. If nothing is selected the current chart timeframe will be used.

SMA

Price

If this is left as zero (0) then the EA will enter a market order.

If you would like to use a pending order, then enter the price you want the EA to start your strategy.

Anticipated trend

Enter the length of the trend you are hoping for your trade. When we come to the strategy part you will see that the shorter the trend you are hoping for, the more chance of success and the longer the trend, the bigger the chance of the breakeven stops being hit. Enter the trend you are anticipating in pips (not points).

Stop loss for your initial transaction

Enter the stop loss for your initial transaction. Please note that if this is too small there is a big chance of being stopped out prematurely. In general, stops under 15 pips are not recommended.

Top-up levels

The next input requires you to decide on how many top-up levels there should be AND where they should be. If you enter percentages in both levels, then 2 levels will apply at the percentages entered

If you enter a value in the first level only, then the EA will only top-up one time at the value entered

When it comes to designing a strategy the top-up levels are very important. We will look at that in more detail in the strategy section.

Minimum stop distance in pips

When we review the Strategy generator you will see that it automatically calculates break-even stop levels which gives the price room to move. If the room to move (Safety margin) is too small you will get stopped out a lot. So to make sure that stops are not too small you can specify then minimum stop size you wish to use. You specify the stop and the spread is then added.Diadstops

Enable new trades after the strategy closeout

This Ea can be set for continuous trading or you can trade it trade by trade. To let it open a new strategy once the previous strategy has be stopped out or has reached its target set this to true.

If you want to use the EA for individual trades then set this setting to false.

 

Pip ranges to allow trades

Sometimes in fast markets the price moves past the intended entry level. This setting tells the EA by how much the price can move from the entry point and still be entered.

Magic Number

It is very important to use unique magic numbers if you want to trace your trades in detail and always change your magic number if you already are trading the EA using the same currency cross. After you have entered the input you would like to use, you can press OK. The EA will then present you with the Strategy Generator that will detail the strategy to be used. The strategy generator will be discussed later in the course. At first we will discuss the general principles of safely using this EA

Line color and style settings

Your transaction strategy will be displayed on the charts. By using these setting you can specify the color and style of your lines.

Chart information

This setting allows you to turn the display of information on or off on the chart. This setting helps to declutter the trading charts.

Manual override

Ignore this setting. EAFactory will notify you if you need to use this setting if you have problems with your lot sizing calculations.

Saving your settings

After a while you will come up with favorite settings for say 30 pips runs, 60 pips runs and 100 pip runs. To avoid resetting the EA with these setting every time you use it, you should save the settings. You do this by clicking on the Save button.

Then you name and save the settings.

You then simply load the settings you want to use by clicking on load and selecting the setting you want.

 

 

The critical settings and success considerations

The success of the Double in a Day EA depends on how well the above input is balanced to achieve your goals.

Target trend envisaged.

As previously mentioned the shorter the trend required to make the initial and top-up lots, the less the risk of failure. This is particularly true when market volatility is low. You need a particularly strong move with few replacements to be successful at Double in a Day trades using big trends. This type of trend may only occur 3 to 5 times a month. It might therefore be an idea to firstly start off going for smaller target trends and only increase target trends as you become more competent at using this EA.

The number of top-up levels.

You increase your risk of being stopped out by the break-even stops the more you top-up your lots. This is one of the reasons this EA only allows one or two top-up levels.

Initial and break-even stops.

The initial stop should allow the transaction enough room to move without being stopped out. So the ideal transaction will have:

  1. An initial stop that will allow the transaction enough room to move.
  2. Break-even stops that will allow the transaction enough room to move.
  3. An anticipated price move that will not have too many retracements

As we will see later, the Double in a Day strategy requires a market trend of more than 80 pips, 2 top-ups and break-even safety margins that are quite tight. It takes considerable skill to be able to find market moves that will allow achieve a 100% gain in 1 trade. The suggested strategy is to go for more conservative account gains initially until you have developed the skill of using the appropriate strategy at the appropriate time.

The Forex Strategy generator

The Forex strategy generator takes your input and generates a trading strategy. From this input

The following trading strategy is generated.

The trading strategy tells us the following:

  1. The Trading Plan Overview – The EA will initially open with a sell of .50 lots and with a target of 100 pips. The 1st top-up will add another .33 lots with a target of 60 pips and the 2nd top-up will add another .75 lots with a target of 40 pips. If the target is reached, the transactions will generate $1,000 which would double your account
  2. Then, the 1st Top-up will result in a break-even stop at +16.9 which will give the top-up transaction a safety margin of 23.1 pips before being stopped out.
  3. The 2nd Top-up will result in a break-even stop at +37.8 pips which will give the 2nd top-up transaction a safety margin of 22.2 pips before being stopped out.
  4. If stopped out before reaching the 1st top-up level, the loss will be $100 which is 10% of the account as per the input.
  5. Other information inputted is also displayed.

If you are happy with the strategy click on Yes. The charts show the strategy as seen below. You can change the colors and line types.

What to do if you don’t like the strategy

You would firstly click on No in “The Confirm trading details” screen. One of the main reasons for not liking the strategy would be because the margin of safety in the break-even stops is too small. See “The Confirm trading details screen” above. The margin of safety is shown by the red arrows. The margin of safety shown is 20, 23 and 22 which is reasonably acceptable. If you are however not happy with the margin of safety and would like to increase them, you can use a combination of the following:

  1. Increase the expected trend amount of 100 to a larger number
  2. Change the top-up levels from 40% and 60% to alternative settings.
  3. Increase the % risked
  4. Reduce the % gain targeted
  5. Change the initial stop loss
  6. Reduce the number of top-ups

In most cases if the margin of safety is reasonable and balanced the strategy should be acceptable.

Strategy Generator Blocking Massages

Most of this information is also available in the EA User manual. The Double In A Day EA generates a strategy plan and validating the steps of this plan may result in blocking issues to execution. These blocking issues are communicated at the top of the Strategy Generator window, if there was any: block

 

Below is a the list of potential issues and suggestions how to resolve the issues.

Message: Topup2 entry is enabled however Topup1 is disabled…

 

Suggestions:

• Disable Topup2, i.e. set TopupLevel_2_Pct to 0

• Enable Topup1, i.e. set TopupLevel_1_Pct to positive Number

 

Message: Topup2 entry is lower or at Topup1 level…

 

Suggestions:

• Disable Topup2, i.e. set TopupLevel_2_Pct to 0

• Ensure TopupLevel_2_Pct > TopupLevel_1_Pct

 

Message: Initial lot size x.xx is outside of valid range of y.yy – z.zz

 

Suggestions: The EA queries the minimum required and maximum allowed lot sizes from the broker. If the calculated lot size for a trade is lower or higher than the min/max then this message is displayed.

Adjust

• AccountSize value

• GainTargetedPct value

• TrendPips value.

 

Message: Initial lot size x.xx is outside of valid range of y.yy – z.zz

 

Suggestions:

Adjust

• InitialSLPips value

• InitialRiskAccPct value

 

Message: Topup1/2 lot size x.xx is outside of valid range of y.yy – z.zz

 

Suggestions: The EA queries the minimum required and maximum allowed lot sizes from the broker. If the calculated lot size for a trade is lower or higher than the min/max then this message

is displayed.

Adjust

• AccountSize value

• GainTargetedPct value

• TrendPips value

• TopupLevel_1/2_Pct values

 

Message: Initial level margin requirement xxx is higher than the currently available free margin …

 

Suggestions: The EA queries the required funds for 1 full lot from the broker. Based on this and the initial trade’s lot size the EA checks if the required margin was available on the account. If the current free margin is less than the calculated one then this message is displayed. • Adjust the AccountSize value • Adjust the GainTargetedPct value • Adjust the InitialSLPips value • Adjust the InitialRiskAccPct value

 

Message: Topup1/2 level margin requirement xxx is higher than the currently available free margin …

 

Suggestions: The EA queries the required funds for 1 full lot from the broker. Based on this and the lot sizes for the initial and topup trades the EA checks if the required cumulated margin was available on the account. If the current free margin is less than the cumulated one then this message is displayed.

• Change the AccountSize value

• Adjust the GainTargetedPct value

• re-adjust the TrendPips value

• Move the InitialSLPips value

• Adjust the InitialRiskAccPct value

• Change the TopupLevel_1/2_Pct values

 

Message: Initial/Topup1/2 SL size x.xx less the spread y.y is below the minimum stop distance of z

 

Suggestions: The EA checks that the initial SL and the calculated break-even stops after top-up trades are at least the MinStopDistancePips away from entries, considering the current spread as well. This message is displayed if there is a problem.

Adjust

AccountSize value

GainTargetedPct value

TrendPips value

InitialSLPips value

TopupLevel_1/2_Pct values

MinStopDistancePips value

Other Double in a Day pages:

This covers EA Input and Double in a Day Forex Strategy Generation

To access other Double in a Day pages use the menu options on the main menu

Leave a Reply