Excess Manual

From JTAWiki
Jump to: navigation, search


Excess is a hedged grid trading EA different to any other grid trader you will have seen.

In essence, it is simple enough. It starts trading by placing a straddle pair of trades around the current price, a BUYSTOP order above, a SELLSTOP order below. If price moves up, it triggers the BUYSTOP and the grid is extended with a new BUYSTOP above the one just triggered and a new SELLSTOP below the current one. In this way, as price moves, trades are triggered and the grid is expanded. The grid is closed when a pre-defined profit target has been reached or when a maximum number of trades have all been triggered. Operating in this way, if the market has any preferred direction then eventually the grid will close in profit. The process then simply repeats.

What is different is that Excess supports the creation and management of a grid of grids, enabling a targeted building of position size in the prevailing market direction. This in turn enables the profit target to be hit faster, making the EA more profitable. Excess also has advanced features like trailing the opposing grid to lock in profit and reduce risk, a wide range of signals and filters to optionally enter the market at optimal periods and time filters to optionally restrict the start of new grids to periods such as the London or US sessions.


Price Action Scenarios
Imagine that we place a pending BUY order a short distance above the current price and a SELL order a short distance below. What can happen? Well price can only go up, down or sideways. If it goes up, then the BUY order will be triggered and, if price continues in that direction we would move into profit. Likewise, if price goes down, then the SELL order can be triggered and continuation of that move will result in a profit. If price simply goes sideways, then neither order is triggered; the status quo being maintained until price finally moves. In summary, bracketing price in this way can lead to a profitable outcome no matter which direction price choses to move.
BUY side move
SELL side move
If price continues in its initial direction, then the grid can be extended and trades triggered to build the profit.

There is a complication to the above scenarios. What happens if price oscillates between the two orders, triggering both without actually hitting a profit target? The answer is that we have a locked in loss proportional to the order lot size and the distance between the orders. What, you may ask can we do to gain a positive outcome from this situation. An answer is to place a further pair of pending orders, a BUY above the triggered BUY order and a SELL below the trigger SELL order. If price then settles on a given direction, then we can produce sufficient profit to clear the loss and gain a small return.

In essence, this is the basis of the Excess EA. The real world is a little more complicated than the above description might suggest. For example, at times of extreme volatility there may be several several order levels added before we reach the stage that we can at least breakeven.


Starting Grids

In essence, starting a grid couldn’t be easier. Once we have met the criteria for starting a grid, it is simply a matter of placing a straddle trade pair and wait for one of the trades to trigger. There are two possible things you can control about this process:

  • The spacing between the trades
  • The degree to which the pair is shifted up or down with respect to the current price. The default is for the straddle pair to be placed equal distances above and below, but this can be varied using the straddleShiftPC property.

Spacing in Excess is defined using a ‘spacer’. Two types of spacer are currently supported:

  • A fixed spacer, in which you simply specify the distance in pips.
  • An Average True Range (ATR) based spacer. This factors into the spacing calculation the current level of volatility; the higher the volatility the greater the distance.

The spacing is applied relative to the current Ask and Bid prices. If the spacing is 10 pips, then a BUYSTOP order is placed 10 pips above the current Ask price and a SELLSTOP order at 10 pips below the current Bid, for a total distance between the trades of 20 pips plus the spread.

The most important thing to be aware of is that if you place the straddle trades too close together, then there is a high probability that both will be triggered by volatility, locking in a loss that subsequently has to be covered by profits generated by subsequent grid trades. This in turn increases risk and increases the average time it takes for a grid to reach the profit target and be closed. This opportunity cost can be very significant.

You can see the effects of this in the equity graph produced by the tester:

Equity small grid spacing

Equity large grid spacing

Managing Grids

Once a grid is started, it grows by the addition of further pending orders. These can be either: A BUYSTOP order added above the highest priced BUY order and a SELLSTOP order added below the lowest priced SELL order. The distance between the trades being defined by the spacer settings. This is the default behaviour. A BUYSTOP being added above and a SELLSTOP order below the most recently triggered trade. This is the behaviour if the property straddleFollowsPrice is true.

Whilst a trade is pending, it can be manipulated in the same way as a stoploss or takeprofit in a conventional trade. The only difference being that if both a buy order and its corresponding sell order are triggered, they remain open as opposed to be closed by the system.

If the property useTrailAndFeed is set to true, then the outer-most pending trades can be manipulated to increase the rate that the profit target is reached and to reduce risk. There are 3 associated properties:

  • feedFactor
  • trailFactor
  • noMoveLimit

Do you remember the Pac-man video games from the 1980’s? For those that don’t, it was a little perpetually moving and eating critter that roamed around a maze eating monsters. I like to think of price as being similar. As it moves, it ‘eats’ pending trades. If price has started moving in a single direction, then Excess should try to ‘feed’ it trades so as to rack up profit quickly and hit the profit target. The faster it can do that, the shorter the overall grid trade takes and the sooner we can get onto the next grid trade and generate more profits. This is where the feedFactor comes in. If we detect that price is moving upwards then we can move pending buy trades above it closer to feed the market faster. The factor is applied to the grid spacing. If the grid spacing is 10 pips and the feedFactor is 0.5, then the highest priced pending BUY trade is moved to 5 pips above the current price. If feedFactor is zero, then it is ignored.

The default approach to building grids is effective, but can result in the building of a significant risk if the grid size starts to grow. One way to address this is to trail the pending orders in much the same as a stoploss. The setting trailFactor defines how many grid spacing widths we are prepared to let the grid grow to before trailing the pending orders to restrict the pending grid width limit. If trailFactor has a value of 8 and grid spacing is 10 pips then the total distance between the highest pending buy to the lowest pending sell will be limited to 80 pips. Again, if this property is zero, then it is ignored.

Finally, the noMoveLimit defines a region around the centre of the pending orders window in which the feed and trail behaviours are ignored. If the noMoveLimit is set to 0.8, then if price is within the top 10% of the pending buy order is ‘fed’ to the market and the lowest sell orders are trailed upwards. In the case that price is within the bottom 10%, then the pending sell order is fed to the market and the pending buy orders are trailed.


From DailyFX, margin is defined as:

Margin is a good faith deposit that a trader puts up for collateral to hold open a position. More often than not margin gets confused as a fee to a trader. It is actually not a transaction cost, but a portion of your account equity set aside and allocated as a margin deposit. When trading with margin it is important to remember that the amount of margin needed to hold open a position will ultimately be determined by trade size. As trade size increases your margin requirement will increase as well.

It is important to understand the difference between margin and risk. Risk is the potential loss if all the current trades are triggered, whereas margin is the amount of financial assets you need in order for the broker to allow you to open and maintain the trades.

MT4 only considers margin when a trade become active. Hence, pending orders are simply considered as placeholders, turning into active trades when price reaches the corresponding price level. The consequence of this is that you could create pending orders for which you do not have sufficient margin, only discovering the shortfall when the system attempts to open the trade. At that point, the shortfall being recognised by MT4 which then deletes the pending trade.

Another possibility is that you can successfully open sufficient trades that reduce your margin to critical levels. Margin is assessed against your current equity. If the market moves against you, then it is quite possible for your equity to be insufficient to cover the margin requirements. This can lead to a "Margin Call" with the broker requesting either requests from the broker to add further funds or the account being closed.

To avoid this possibility, Excess calculates the margin requirements for both active and pending orders. This combined margin is referred to as ‘Margin Exposure’. The current margin exposure and active margin are displayed in the EA dashboard.

Excess enables you to limit margin exposure to avoid the issues described above. This is controlled though the following settings:

maxUsedMarginPC: This is the maximum margin as a percentage of equity as assessed at the point of adding a new pending straddle trade. If adding the trade would result in a higher margin, then the trade is rejected. This is recorded in the MT4 log and displayed as a notification.

marginLimitPC: If the maxUsedMarginPC margin has been reached and all trades have been triggered, then the resulting loss is fixed. This is equivalent to reaching the reaching the maximum number of trades. The only option then is to close the grid and continue. In order to identify this situation, it is necessary to have a margin limit, above which the grid is closed. If the used margin is above (maxUsedMarginPC-marginLimitPC) and all trades have been triggered, then the grid is closed.

Taking Profit

The basic operation of Excess is that it builds a grid and monitors the current profit, closing the grid when some pre-defined profit target has been reached. It sounds simple, however there are two key questions that have to be addressed:

  • How do we determine an appropriate profit target? Too high and we may fail to reach the target, too low and we are throwing away potential profit.
  • What do we do if the grid starts to grow significantly and we haven’t reached the target?

Excess supports a number of approaches to setting the target, selected through the property targetType. They are:

  • Fixed target. The simplest approach; you specify a fixed profit target that is applied to all grids.
  • Proportional target: The target is specified as a percentage of the current balance.
  • Dynamic target: An initial target is calculated based on the current level of risk. This is then progressively decreased with increasing grid size.
  • Retracement target: A target profit is set as a multiple of the current risk. If this profit level is reached then the grid is closed. In addition, the profit is continuously monitored. If the profit retraces more than the set level then the profit is taken.
  • Modified Risk target: Target is based on current total risk reducing in line with changing ratio of buy or sell active trades to the overall number of active trades. The idea is to reduce the rate at which the target declines if the bias in the grid is high.
  • Half Life target: Again, the profit target is set as a multiple of the current risk. However the target profit is reduced by half at regular intervals until the current profit meets or exceeds the target.

To deal with the issue of the grid growing significantly without the target being hit, there are two approaches. We can specify a maximum grid size beyond which the profit target is ignored and we attempt to close the grid at or beyond breakeven at the earliest opportunity. This is defined using the property breakevenTradeLimit. This is applied if you are using fixed or proportional targets. With the dynamic target, you can specify a target decline rate. This enables you to shrink the target progressively with increasing grid size. The higher the value of the targetDeclineRate, the faster the target shrinks. Hence you could speculatively define a high dynamic target and a high decline rate to cover the all possibles and increase the likelihood that the grid will be closed in profit.

Fixed breakeven profit target
Progressive reduction profit target

Spike Catcher

A key risk for any grid EA is extreme volatility without direction. In order to reduce the risk of such events, Excess has a 'Spike Catcher' process that watches for a bar that is significantly larger than the norm and closes the grid if it see one. This then closes the grid before the market has a chance to spike back in the other direction which would increase the risk of a large drawdown.

You can see the effects of Spike Catcher in the following equity lines produced by the tester:

Backtest without spike catcher

Backtest with spike catcher

The only difference between these two is that the second one is using Spike Catcher.



You can download the installation file from our store by using the link in the email sent to you confirming your payment. You should bookmark this link, to ensure that you always have access to download the installation file.


Please follow the instructions on the EA Installation page of our Wiki.

Your CID

Use of the EA relies on a valid CID registered on our server. Get more details on registering and changing your CID here.


As long as you remain a subscriber, or if you have purchased Excess, you are entitled to receive all upgrades of the EA for free. When an upgrade is released, you will be advised via email to the email address used when you made your payment. If you would like to change your email address, then please send details of the new address to sales@JTAToday.com.

The EA will automatically download any new version to a folder on your hard drive through the Auto Update function, and will display a button on the chart to inform you. Read more about where the file is stored, and how to install it from the Auto Update page of the Wiki.


If you have problems when installing the files, adding the EA to a chart, or running it, please go through each of the items on the Experts troubleshooting page of the Wiki.

Error Messages

After you have successfully installed the EA there are many checks made on the Input Parameters and your Account Settings to ensure that there are no problems. If there are problems which are serious enough to stop the EA from trading then you will see an Error Message recorded in the system log, and you can get more details of the error and possible solutions on the Error Messages page of the Wiki.