|Evolution Manual v1.6|
|From JTAWiki, a project by J Talon LLC|
|Please note that Evolution v1.6 can only be used on MT4 build 600+, and can not be used on MT4 build 509 and previous.|
Evolution is an Expert Advisor which has been developed from Blessing 3, and uses many of the same concepts as Blessing.
Evolution uses the Entry Method(s) of your choice to place either a pending BUY/SELL LIMIT/STOP order or an instant market order depending on the value of FirstTrade. The volume of the first trade is based on the Lot Size Calculation. If the price goes against the initial trade, further trades will be placed based on a Grid System with increasing Lot Sizes, until the price retraces enough to hit the Take Profit point. In addition to closing the basket at TP, there are several Other Exit Strategies, including Stop Loss and Trailing Stops, MaximizeProfit, Close Oldest, Early Exit, and Emergency Close All.
Evolution can run on any chart and timeframe, and uses Trade Tracking with a unique Magic Number and Trade Comment to identify trades with your broker. The portion of the Account Balance used to trade Evolution, and the portion used by each chart can be set using Portion Control. Evolution can also dynamically change the portion allocated to a chart if it starts running into drawdown using Automatic Portion Control (APC). To help you keep track of all the charts running Evolution, and the open trades on those charts, another EA is provided, called JTA Dashboard.
Evolution has several other methods by which it can make profits. These include: GridScalp, SmartScalp, WaveScalp, ContraTrades, and Hedge. The profits/losses from most of these functions can be allocated in different ways using Profit Allocation.
But Evolution is not only about making profits, it is also about protecting your account balance when things do not go according to plan, by using Equity Protection. This is achieved by using portion control, maximum drawdown limits and power out stop losses.
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.
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 Evolution, 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.
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 on the Overlay, and you can get more details of the error and possible solutions on the Error Messages page of the Wiki.
Evolution will only be allowed to open orders if AllowTrades is set to
true. If AllowTrades is set to
false then no trades will be placed, but you will be able to view the details on the chart overlay - see Restricting Trading for details.
Pending and Market Orders
The initial trade of a grid will be place as a Pending trade or an instant Market trade depending on the setting of FirstTrade. If set to
p, Evolution will place pending trades, and a setting of
m will place market trades. For the purposes of this manual, all examples will assume that FirstTrade is set to
P (its default setting).
When using pending trades, all details of the trade will be kept internally, and are not sent to the broker. You will see lines on the chart display showing where the trades are placed, and when the price reaches either of the pending trades Evolution will send a market order to open the basket.
The direction of the trade being placed is based on the Trend.
If using pending orders and the trend changes, Evolution will delete any existing orders and place new orders based on the current conditions. The orders will also be deleted if the price passes the entry point but trade is not executed because of high spread or low margin.
Pending Order Placement
If UseFlexGrid is set to
false, then the original method for setting pending trades is used. This method is based on a fixed grid, determined by the size of the first grid. For example, if the first grid is 25 pips, then every pending trade will be set at x.xx00, x.xx25, x.xx50 or x.xx75. It does not matter where the price is between two trades, so whether the price is x.xx26 or x.xx49, the STOP and LIMIT trades will be set at x.xx25 and x.xx50.
The placement of the LIMIT/STOP trades can be adjusted by setting UseFlexGrid to
true. This allows the grid to be placed at a calculated distance around the current price. The size of the grid will still be 25 pips, but the FlexBias setting decides where the trades are placed.
FlexBias is the percent to 'offset' the grid from the current price. If the first grid size is 25, and FlexBias is set to
50, then the trades will be placed 12.5 pips away from the current price (halfway between). If FlexBias is set to
33, then the STOP trade will be 1/3 of the grid size away, and the LIMIT trade will be 2/3 of the grid size away. So reducing FlexBias moves the STOP trade closer to the current price, while increasing it moves the LIMIT trade closer.
Instead of using the initial grid size (default of 25) to determine the distance between the two pending trades, you can use a flexible distance based on the ATR of the chart. If the value of FlexATRPeriod is set to
0 this function is turned off, but any value greater than 0 will calculate the ATR for that number of periods (bars) on the chart. Note that the calculation will use the smaller of the first grid size and the ATR, so that a rapid change in PA will not generate pending trades extremely far apart when using the ATR.
The placement of pending trades can also be adjusted by using EntryOffset. A positive value will move the entry point further away from the current price, and a negative value will bring it closer.
Evolution uses a variety of indicators in its entry decision making process. You can use all indicators together or individually by changing the setting of UseAnyEntry. A setting of
true will allow any of the entry methods to trigger the opening of the first trade, and a setting of
false means that ALL entry methods must have their conditions met before a trade will be opened.
By default, MAEntry is turned on as the base indicator. If you elect to turn on the other indicators, Evolution can use them all to determine entry, or use the first available entry from all indicators.
Entry Method Setting
Each of the standard entry methods built into Evolution has a user setting which can have one of 3 states: If the entry method is set to 0, then that entry method is disabled, and will not be used. If the entry method is set to 1, then it will act as normal, placing a trade if the entry conditions are met. If the entry method is set to 2, then it will trade in reverse, i.e. if the entry triggers a BUY STOP/LIMIT order, then Evolution will place a SELL STOP/LIMIT order.
MAEntry is based on the same MA as is used to determine the Trend. If the price is above the MA channel, then Evolution will place BUY STOP/LIMIT trades, if below will place SELL STOP/LIMIT trades, and if within the channel will place a BUY and SELL STOP order.
CCIEntry looks at prices on the M5, M15, M30 and H1 timeframes of that pair and if the CCI is “trending” the same on all 4 timeframes, that trend is used. The direction of CCI for the 4 time frames can be viewed on the screen by setting dCCI to
true in the Display Control settings.
BBandsEntry uses the Bollinger Bands indicator (BB), which is a powerful indicator that “channelizes” the prices. Movement outside the bands is rare and when it happens, chances are a correction to the price to bring it back within the bands should happen. The typical BB channel, upper and lower bands of the channel, are calculated based on a standard deviation away from the mean average of the MA. Usually 2 times the standard deviation is average and is what most traders use. Although user selectable, it’s not recommended that BBDeviation is altered from
2. BBDistance sets a channel outside the upper and lower bands, which increases the distance that the price must move before Evolution will open a trade. NOTE: The BBandsEntry works in the opposite way to MAEntry - it will place a BUY trade when the price drops BELOW the BB channel, and a SELL trade when the price is ABOVE the channel.
StochEntry uses the value of the Stochastic indicator to determine whether the price is overbought or oversold. Usually Stoch above 80 is considered an overbought condition and less than 20 is an oversold condition. Setting BuySellStochZone to
20 creates these “zones”.
PCEntry bases the entry condition on whether the current price is higher or lower than one of a range of values calculated from the previous candle (set with PCMethod), or simply whether the previous candle was Bullish or Bearish.
Each of the Entry Methods has a corresponding indicator which has been specially designed to pick up the parameters used in Evolution and display the indicator with the correct settings on the chart display. Find out how to use them in the Indicators section.
Force Market Condition (FMC)
Even if all entry methods are set to
0, it is still possible for Evolution to open new basket trades, depending on the value of ForceMarketCond.
If FMC is set to
1 it will force an UP or DOWN trend, and Evolution will place a BUY or SELL trade.
If FMC is set to
3, and FirstTrade is set to open
Market trades, Evolution will place a BUY or SELL trade depending on whether the trend is UP or DOWN. If FirstTrade is set to
Pending, or the trend is RANGING, no trades will be placed.
If FMC is set to
2it will force a RANGING trend, and Evolution will place no basket trades if all entry methods are set to
0. You can use this setting if you only want Evolution to trade using SmartScalp or WaveScalp, or if you want Evolution to manage orders opened manually.
After a basket has closed, if the entry conditions allow, Evolution may open another basket immediately. The opening of the next basket can be delayed by setting BasketDelay to the number of seconds to wait after closing the previous basket. The remaining time left will be displayed on the Overlay.
If you are an experienced manual trader, it is also possible to start a new basket based on your own criteria by placing a manual trade.
Determining the Trend
Evolution's basic design is to use MA to determine the trend and bracket the current price with a STOP and LIMIT trade to profit in that direction. If the current price is above the MA, the trend is set to LONG, and if below will be SHORT.
If a value is entered in MADistance, a channel will be formed around the MA line which defines a RANGING market, and the trend will be set as LONG/SHORT if the price is ABOVE/BELOW this channel.
If the direction is LONG, BUYS are used to take profits. If the trend reverses, BUY LIMITS are hit and profits taken on the reversal. If the direction is SHORT, SELLS are used to take profits. If the trend reverses, SELL LIMITS are hit and profits taken on the reversal. If the trend is RANGING, Evolution will place a BUY LIMIT and SELL LIMIT trade.
The trend can also be determined by using a higher time frame if UpperTimeFrame is set to
true. This function uses the MA of the RSI of the higher time frame (set with UTF_RSI_TF) to detect the general trend, and overrides the trend determined by MA. A value entered in UTFDistance will set a channel around the MAoRSI which defines a RANGING market.
You can also force Evolution to trade in a certain direction by using ForceMarketCond. A setting of 3 turns this function off, and Evolution will use one of the above methods. A setting of 0 will force Evolution to only place LONG trades, 1 will only place SHORT trades, and 2 will force a RANGING trend, and will place either LONG or SHORT trades.
The trend direction will be shown on the overlay display, and there is also a text label showing which method was used in determining it.
Starting Lot Size Calculation
Evolution determines the size of the initial lot based on whether UseMM is set to
If set to
false, then the value entered in StartLot will be used for the first trade of every basket, no matter what the account size.
If you are using Money Management and your live/demo account is not held in USD, then it is important that the formula used in calculating the starting lot size is consistent with our back tests, so our proprietary Currency Converter will automatically convert your Portion Balance into USD before performing the MM calculation.
In order for Currency Conversion to work the Currency Symbol for your account currency/USD must be visible in the Market Watch window - you will see an error message if the EA can not find it. If the Currency Symbol has a Prefix or a Suffix then these should be entered in the appropriate parameter on the input screen (F7).
|The Currency Convertor can not work when back testing because MT4 is not capable of using currencies other than the one under test. When back testing you should always use a demo account in USD.|
The overlay display will show you the Portion Balance currency conversion, and also the approximate ratio for the portion balance for every 0.01 lot.
Grid Levels Lot Size Calculation
Evolution used a grid system for opening further trades, and each of these trades will open at a larger lot size, which brings the break even point of the basket closer to the current price. This means that a smaller retracement is required in order to close the basket at a profit. The increase in the lot size is determined by the Multiplier.
If Multiplier is set to 1, then the lot sizes will increase in a linear manner - 0.01, 0.02, 0.03, 0.04, 0.05 etc.
With Multiplier set to a value greater than 1, the lot size will be increased by the value of the Multiplier, with a minimum increase of 0.01 lots at each level. Using the default value of
1.4, the lot size progression will be 0.01, 0.02, 0.03, 0.04, 0.06, 0.08, 0.11, 0.15. If the first lot size is greater than 0.01 then all subsequent lot sizes will use the same multiple - so a starting lot of 0.02 would give a lot size progression of 0.02, 0.04, 0.06, 0.08, 0.12, 0.16, 0.22, 0.30. See this explanation for the reason why.
You can also delay the level at which the Multiplier start increasing the lot size by using OrdersAtOneX. Any value greater than 1 will use StartLot for that many levels before Multiplier is used, so a value of 3 in OrdersAtOneX will produce lot sizes of: 0.01, 0.01, 0.01, 0.02, 0.03, etc.
Because Evolution can open several levels in the grid at increasing lot sizes, to ensure that the number of open lots does not get excessive, we need to decide how many levels may be open at once. Many baskets of trades will close after only one or two levels, but to assume this for every basket is very dangerous, and is certain to end in disaster. Some baskets may go to 10 or more levels on occasions, but most baskets rarely go over 7 levels. Evolution therefore assumes that 7 levels is the most levels which will be open at once, and this is the default setting of the Level variable. If you want to be more cautious, increase Level to a higher value, which will then reduce the initial lot size.
Assuming a Level of
7 and a Multiplier of
1.4 we can calculate how many lots will be open with a starting lot of 0.01: 0.01 + 0.02 + 0.03 + 0.04 + 0.06 + 0.08 + 0.11 = 0.35 lots. For safety of the account we do not want the number of open lots at level 7 to exceed 1 lot, so Evolution multiplies the base lot (0.01) by 1 / 0.35 = 0.0285, which is rounded down to 0.02 lots. So the first lot of the basket will be 0.02 lots, and if the basket gets to level 7, the total of all open lots will be 0.70 lots, which is less than the maximum of 1 lot.
The above calculations assume that you are trading on an account with the normal Contract size, which is $100,000 per 1 lot. If you are using a Nano account, where the contract size is only $10,000 per 1 lot, then the lot sizes should be multiplied by 10 to acheive the same results. Evolution will do this automatically if you set NanoAccount to
true. If you have a Nano account and wish to make use of the smaller lot sizes then leave NanoAccount set to
If you're not sure whether your account is a Nano account, open the Strategy Tester in your MT4 application, choose any Forex symbol, click 'Symbol properties', and check the line which says 'Contract size'.
| If you set NanoAccount to |
The lot size calculation is slightly more complicated than described above, because it also takes into account the leverage of your account, and the margin required to open the trade.
Lot Size Safety Precautions
In order to trade more safely, and to allow for those times when the number of trades in a basket exceeds the assumed maximum of 7, it is recommended that you use double the required portion balance, or to put it another way, use half the initial lot size. This can be achieved by using the Aggression setting. If Aggression is set at
1, then the lot size will be calculated exactly as described above. In order to reduce the lot size by half, Aggression should be set to
If your broker has a limit to the number of lots which are allowed to be open at one time and this value is entered in MaxOpenLots, Evolution will ensure that the number of open lots at Level does not exceed the maximum allowed for this portion of the account.
One of the problems with using a grid to open trades with an increasing lot size is that the BreakEven (BE) point can move further away from the current price with each new level, meaning a bigger retrace is required before the basket can close. The BE point is calculated by using the open price and lot size of each trade in the basket, so once a trade is open, the BE point is fixed. AutoLot is a function which can manipulate the BE point of a basket by adjusting the lot size of the next level. The open price of the next level is fixed, and calculated by using the grid method in operation, so the only variable which can be changed to adjust the BE point is the lot size.
AutoLot works by calculating how many lots need to be opened to place the BE point at a set distance from the current price. The distance is set by the user with AutoLotPips (default
10). Note that the closer you want the BE point to the current price, the higher will be the lot size.
In order to restrict the number of lots opened by AutoLot, you can set a maximum lot size with AutoLotMaxMult, which limits the AutoLot to a multiplier of the Starting Lot size. For example if the starting lot is 0.02, and AutoLotMaxMult is
100, then the maximum lot size for AutoLot will be 2 lots (0.02 * 100). Note that the next lot size will be overridden if the normal basket lot size is greater than the AutoLot size.
Because a basket of trades usually manages to cope quite well at lower levels, you can delay the level at which AutoLot will start by entering the level in AutoLotStart.
|Use AutoLot with CAUTION - bringing the BE closer to the current price means a much smaller retrace is required before the basket can close, but if this retrace does not happen then the drawdown will be much higher because of the increased lot size, and will increase the chances of having an EP hit.|
When you start the EA with AutoLot set to
true you will see a warning message that it is active. This can cause problems when running on a PC or VPS which has an Auto-Reboot function because the EA will stop running at the warning message until it has been accepted. In order to allow the EA to run automatically with no intervention from the user you should set AutoLotIgnoreWarning to
When using SmartGrid or HAMA to delay the opening of the next level of a basket there may be occasions where the price movement is very high, so opening a trade with the usual lot size progression will still result in the BE point being far away from the current PA. If UseGridLot is set to
true then the EA will calculate where the current price is compared to the grid spacing, and will place a trade with the appropriate lot size for that level of the grid. In effect the SmartGrid and HAMA delays are causing those levels of the grid to be 'skipped' but the trade is placed as though those levels were present.
Account and Portion Percent
You can run Evolution on any account, and can run it along side any other EA. In order to let Evolution know how much of the Account Balance it is allowed to use, there is a variable called AccountPC. Set this value to the percentage of the Account Balance you wish to allocate to Evolution. For example, if you have an account with a balance of $10,000, and you want to run Evolution and another EA with a half share each, set AccountPC to
AccountPC sets the balance allowed by all instances of Evolution running on this account, so in the above example you may have Evolution running on 5 charts, and they will all share the $5,000 allocated to Evolution. In order to split Evolutions Account Portion between individual charts, you use PortionPC. To allow each chart an equal share of Evolutions Portion, you should set PortionPC to
20 on each one.
It is not necessary to set AccountPC in each instance of Evolution, although it is recommended. Evolution will take the value entered in the last chart added and apply that to all instances. You will know which chart is the master because (M) will be displayed after 'Evolution Portion' on the overlay display. For all future examples in this manual it will be assumed that Evolution is the only EA running, and AccountPC is set to
100 (its default value).
The Portion Balance is recalculated every tick while there are no trades in the basket. So any profits/losses made by other EAs, or any increase/decrease in the account balance will be reflected immediately in the portion balance. However, once a trade is opened in the basket, the portion balance will remain fixed at the current value until the basket closes. This is to ensure that any losses from other EAs or account withdrawals do not reduce the amount allocated to this chart, which would result in an immediate increase in the drawdown percentage, and could trigger an EP hit.
Automatic Portion Control (APC)
Evolution also has the ability to dynamically change the portion allocated to any chart which is running into high drawdown with a feature called Automatic Portion Control (APC). In the above example there were 5 charts each with a PortionPC of
20, which adds up to 100%. Because the charts are already using 100% of the available balance there is no room for APC to work. If PortionPC for each of the 5 charts is reduced to
15, the total allocation is now 75%, which leaves 25% available for APC to allocate to any chart which needs it.
If you do not want to allocate all of the available Evolution Portion to your charts, but you do not want APC to be active on any specific chart(s) then set PortionDDLimit to
Because an Equity Protection (EP) hit is based on the value of MaxDDPercent, which has a default of
50, we need APC to start allocating a higher portion before this DD is reached, and this is the value which should be entered in PortionDDLimit (default
40). As soon as the DD of a chart reaches PortionDDLimit, Evolution will check whether there is any portion available, and allocate another 5% to this chart if there is. This will continue every time the DD reaches PortionDDLimit until the whole 100% has been allocated. Once the DD starts dropping, APC will release 5% of this chart's portion when the resulting DD will be less than PortionDDLimit, until the initial PortionPC is reached.
It is recommended that you only leave 10% - 20% of the account balance for APC. In the above example, the maximum which can be allocated to any one chart is 40% (15% PortionPC + 25% APC). If there is an EP hit of 50%, the maximum loss is 20% of the account balance. If you use a smaller PortionPC (say 5%) with 75% allowed for APC, the maximum allocation is now 80%, with an EP hit causing a loss of 40% of the balance.
The overlay display will also give information about the state of APC. If all charts are running and none are using APC, the 'Chart Portion' percentage will be displayed in DeepSkyBlue. If another chart is using APC, the value will be shown in Green. If this chart is using APC, the value will be Orange, and if APC is at 100%, the value will be Red.
There is also a note in brackets next to 'Chart Portion' giving details of how many charts are being monitored, and what the overall APC percentage is.
If you have recently added or removed a chart, or changed a chart's parameters, please give these display items time to update, as they need at least one tick from each chart before they settle down.
Setting the Grid
Once the first trade has been placed, there are two possible outcomes. Either the price will go in the direction of the trade, when it will be closed at a profit, or the price will go against the trade. On these occasions, Evolutions strategy is to open another trade at a set distance from the first.
SetCountArray and GridSetArray
In order to save you from entering the distance for each level in the grid individually, Evolution allows you to set them for 'blocks' of levels. SetCountArray is used to determine the number of levels in each block, with GridSetArray setting the corresponding grid levels.
The maximum number of trades allowed in any basket is set with MaxTrades, and because Evolution will calculate the grid levels up to the value of MaxTrades, there is no need to enter the number of levels in the final block, so there should always be one more value in GridSetArray than there is in SetCountArray.
- The first trade will be placed according to the entry conditions.
- This first trade is known as level 1 of the basket, and also forms the first trade of the first block of SetCountArray. This means the grid distance for the next level is taken from the first block of GridSetArray, and so level 2 will open 25 pips away.
- In the same manner, levels 2, 3, and 4 which are also in the first block of trades will set a 25 pip distance for trade 3, 4, and 5 respectively.
- Levels 5 to 8 fall in the second block of SetCountArray, so the distance for the next trade will be taken from the second block of GridSetArray. So trades 6 to 9 will be placed 50 pips away.
- Level 9 up to MaxTrades will take the grid distance from the third block of GridSetArray, so trade 10 onwards will be place at a distance of 100 pips.
The default method for setting the grid produces a fixed grid, which is not always ideal, so Evolution gives you the option of basing the grid depending on how volatile the price is for that chart. This is called Auto Calculation (AutoCal), and is based on the Average True Range (ATR) indicator.
AutoCal still uses the blocks of levels set up in SetCountArray, but instead of using fixed grid values in GridSetArray it allows you to set a multiplier of the ATR value. It will calculate the ATR for the chart based on the ATR TimeFrame and ATR Period selected, and for the first block of trades will multiply that value by the first setting in GridSetArray, and this value will replace the normal 25 pips.
For blocks 2 to 5 the ATR value will be multiplied by the second to fifth values in GridSetArray (if used). To achieve the same result as the previous default settings you should set GridSetArray to 1, 2, 4, 8, 12 which will give an increasing grid size for each block of trades.
The Take Profit values are set in the same manner using the TP_SetArray to set a multiplier for the calculated ATR, with a setting of 2, 4, 8, 12, 18 for blocks 1 to 5 which will replicate the previous default values.
|If you set AutoCal to true, but omit to change the default settings for GridSetArray and TP_SetArray you will create some very large grid sizes and take profit points. The EA will display a warning message in the Terminal / Experts log if the values look excessive.|
Grid Adjustment Factor (GAF)
The grid size produced by GridSetArray or AutoCal can be further adjusted by using GAF. If changed from the default setting of 1, the grid size will be increased or decreased by the GAF factor. So if GAF is set to
0.5, using the default GridSetArray, the first grid size would be 12.5 pips (25 * 0.5).
In a fast moving market, it is possible that Evolution could open a lot of grid levels in a short period of time. The external variable EntryDelay is used to set the number of seconds delay before the next level can open. The time remaining before the next level can open will be shown on the overlay.
Stealth Pending Order
Using either of the above methods, Evolution will calculate the position of the next grid entry, and will display the LIMIT trade on the screen display. Details of this LIMIT trade are kept internally, and no details will be sent to your broker. If the price reaches the LIMIT, then an instant market trade will be sent in order to open the position.
SmartGrid and HAMA
In order to get better control of the entry points for additional levels instead of 'blindly' placing a grid, there are two more functions which can delay placing trades until market conditions improve. These functions are SmartGrid and HAMA.
SmartGrid will be used when UseSmartGrid is set to
true, and will use the MA of RSI on the 15m timeframe (default setting of RSI_TF) to determine the short term tend, and will defer opening a new trade until the MARSI crosses the RSI.
HAMA uses the Heiken-Ashi Moving Average, and will delay the next level while the HAMA candles are against the direction of the basket, and the candle length is greater than HAMAPips.
Neither of these methods uses a LIMIT trade as it is not known where this trade will be placed until the entry conditions are met, so both methods use an instant market BUY/SELL.
Both methods use the normal grid calculation to determine the minimum grid distance for the next level, and can be used individually or together.
If dSmartGrid and dEntry are both set to
true then the overlay display will show the current values of the SmartGrid and/or HAMA indicators to the right of the last bar on the chart - you will need the Chart Shift on in order to view them.
If UTFAlways is set to
true then any further trades in the basket will only be placed in the same direction as the trend (as calculated by UTF), i.e no trades will be placed if the trend has changed. Setting UTFAlways to
false will allow trades to open no matter what the UTF trend is.
After a basket has opened, the on screen display will inform you when the next level will open, together with the reason why the level has not yet opened.
If you are an experienced manual trader, and feel that you could do a better job of picking entry points for further levels using support/resistance or Fibonacci levels it is also possible to open a manual trade.
Adding Trades Manually
It is possible to place a manual trade to either add to an existing basket, or to create a new one. In order to use the BUY and SELL buttons on the display you must have dButtons set to
true. It is also possible to place trades using the Knight-Fire tool provided by ianj, but you must ensure that the correct magic number and lot size are entered.
If there is not a basket of trades open then the lot size of the new trade will be set to the normal Starting Lot size.
If there is already a basket open and the manual trade is placed in the same direction as the basket then the lot size used will follow the normal grid lot size calculation. If the trade is placed against the basket direction then the trade will be treated as a Hedge trade, and the lot size will be calculated using the Hedge lot size calculation. You will be allowed to open a Hedge trade even if UseHedge is set to
false, but not if AllowHedgeTrades is set to
If ConfirmButtons is set to
true then you will be asked to confirm the trade placement.
|The Buy and Sell buttons used for manual trading are not limited by any of the rules which limit the EA from trading. They will ignore any EntryDelay, MaxSpread, AllowTrades etc. settings.|
|If you use ConfirmButtons then the time taken to place the trade will take longer, and it is possible for the price to have changed so much that the trade is rejected by the broker. Please check the Terminal/Experts log for any error messages and be prepared to place the trade again if required.|
You can also use the Knight-Fire script to open a SmartScalp, WaveScalp or Contra trade. In order for Evolution to monitor and manage these trades, ensure that you enter the correct magic number. You will be allowed to open these trades even if the associated function is turned off, and Evolution will still manage the trades.
Closing Trades Manually
|It is not recommended that you close individual trades in a basket, other than the latest level opened in each basket. Doing so can have unexpected results, and can affect the lot size of subsequent trades making it harder to close the basket.|
If you need to close trades manually then we recommend that you close all the trades of a basket, which can be achieved quickly by using the Emergency Close All function.
Using the default settings, the Take Profit targets at each level are set in exactly the same way as the grid levels are set. Please ensure that you understand how to set the Grid before continuing.
Setting the Take Profit uses the same SetCountArray as the grid to set the number of levels in each block, and TP_SetArray to set the Take Profit points. So using the default setting for TP_SetArray of
50,100,200, the take profit for the first 4 trades of the basket will be set at 50 pips from the open price of that trade. The next block of 4 trades will have a TP set at 100 pips from the open price of the level, and the remainder of the trades up to MaxTrades will have a TP of 200 pips.
There may be times when the TP set by TP_SetArray is not enough to close the basket at a profit, i.e. when the distance from the trade open price to the Break Even point is greater than the TP pips. This can be caused by a delay in opening the next level by EntryDelay, SmartGrid or HAMA, or even simply by a poor choice of settings in GridSetArray or TP_SetArray. In these cases, Evolution will calculate the nominal profit expected from the first trade of the basket (Base Profit), and multiply that by the number of levels open to ensure that a reasonable profit is made.
Because of the changes in grid sizes at different levels, and the increase in TP sizes for different blocks, it is possible that the TP point moves further away from the price when a new level opens instead of getting closer to it. Setting the parameter ForceTPPips to anything greater than 0, it is possible to ensure that the TP point does not move further away because it sets it a fixed distance from the break even point for every level.
You can also ensure that the TP point is a minimum distance from break even by entering the minimum value in MinTPPips.
In order to move the TP closer to the BE point at higher levels of the basket there are 2 more functions which can be used.
If BreakEvenTrade is set greater than
0, when the basket gets to the level set it will close all trades when the price reaches the break even point, no matter what point the original TP was set at.
If BEPlusLevel is set greater than
0, when the basket gets to the level set the TP line will be adjusted to the BE point plus/minus the number of pips entered in BEPlusPips. If BEPlusPips is a positive value the TP line will ensure that the basket closes at a profit, but if it is negative the basket will close at a loss.
The calculation of TP is made in the following order of increasing priority:
It is also possible to close any trade in the basket by setting a manual TP with your broker. Because Evolution does not send TP values to the broker, any manual trade modifications will not be overridden. Assuming that Evolution does not close the trade automatically using one of the usual TP methods, your broker will close the trade at the TP you have set.
Other Exit Strategies
Stop Loss and Trailing Stops
Each basket can have a stop loss and/or a trailing stop.
To use the Stop Loss you must set SLPips to a positive value. If it is set to
0 then the stop loss function will not be used. The stop loss will be fixed at the set number of pips from the basket break even point.
To use the Trailing Stop you must set TSLPips to either a positive or a negative value. If it is set to
0 then the trailing stop function will not be used.
You can select the point at which the trailing stop will start through the TSLStartAt parameter, which accepts the following values:
- 0 (BE) to start trailing when the PA reaches the Break Even (BE) point. This setting may cause the basket to close at a loss because the trailing stop will start TSLPips below the BE point.
- 1 (BE+) to start trailing when the trailing stop is at BE. This method will start trailing when the PA is TSLPips above the BE point, and will normally ensure that the basket closes at a profit.
- 2 (TP) to start trailing when the PA reaches the Take Profit (TP) point. This method will normally produce a profit as long as TSLPips is smaller than the expected TP.
- 3 (TP+) to start trailing when the trailing stop is at the TP point. This method will start trailing when the PA is TSLPips above the TP point.
- Note that any mention of 'above' and 'below' relate to Buy trades, and the reverse should be read for Sell trades.
If a positive value is entered for TSLPips, then the trailing stop will fixed at the set number of pips from the start point, and will trail the price at that fixed distance. If a negative value is entered, then it will be treated as a positive value, and will work exactly the same as the normal trailing stop, other than the pip value of the trailing stop will reduce as the price moves further from the start point. This means that as the basket makes more profit the trailing stop reduces to lock in more of that profit. The value of the trailing stop will not reduce lower than the value set in TSLPipsMin (which should be entered as a positive value).
|If the Trailing Stop is active, then a basket of trades will not close when the profit target is reached - it will always wait for the trailing stop to be hit before closing.|
The Maximize Profit function is designed to increase the potential profit of the basket of trades if the price goes on a run.
It does this by setting the minimum profit you will accept from the basket as a percentage in ProfitSet. Once this profit has been reached the TP point will be moved by MoveTP pips, increasing the potential profit of the basket. Each time the price reaches ProfitSet percent of the potential profit, Evolution will move the TP point for the number of times specified in TotalMoves.
Once the price has reached ProfitSet, Evolution will set a stop loss for the basket at this point. If the value of TSLPips is not 0 then the normal Trailing Stop will start at this point, with the trailing stop being TSLPips below/above the ProfitSet point. If TSLPips is 0, then a stop loss will be placed at the ProfitSet point, which will ensure that the basket will close at the minimum profit that has been set.
When Maximize Profit is active, the display will show the normal solid gold line where the basket TP has been set. It will also show a dotted gold line which is the point where ProfitSet has been set. Once ProfitSet has been reached, the dotted gold line will move to where the new ProfitSet is, and the basket stop loss / trailing stop will be shown as a dash-dot gold line.
When a basket of trades is open, and the price keeps going against it, the oldest trades in the basket will increase the overall drawdown. The open price of these trades are on the 'wrong' side of the current take profit, and will always close at a loss. In order to reduce the drawdown if the price runs in the wrong direction, Evolution has an option to close these trades if UseCloseOldest is set to
true. The oldest trades will be closed once the level set in CloseTradesLevel has been reached. Note that only trades which would close at a loss will be closed using this function - if they can still contribute to the profit (their open price is on the 'right' side of the BE point) then they will remain open.
Because the losses incurred closing trades at higher levels can become excessive because of the higher lot size, you can limit the number of trades closed using CloseOldest by setting MaxCloseTrades.
You can select how many trades will be closed the first time that the Close Oldest function runs by setting a value in CloseTradesNum. The default value of
3 will allow the 3 oldest trades to close once CloseTradesLevel has been reached, then each new level after that will only close one oldest trade until MaxCloseTrades is reached.
Normally the oldest trade will only close if the open price is on the 'wrong' side of the overall Take Profit point- i.e. when the basket closes then that trade will close at a loss. You can force the CloseOldest function to close any potentially profitable trades by setting ForceCloseOldest to
If RecoupClosedLoss is set to true, Evolution will automatically recoup the losses incurred by adjusting the take profit of the remaining trades in the basket, but as more trades are closed the losses will increase, and the take profit point will move further away from the current price. Using CloseTPPips it is possible to fix the take profit point to a specified number of pips from the break even point once Close Oldest is active.
If UseEarlyExit is set to
true, this function allows you to reduce the TP point if the basket has been open for some time, or if there are several trades open. There are two strategies involved, and you can choose to use either of them individually, or both together.
The first strategy is a reduction in profit over time. You can specify how long to wait before this strategy starts by entering the number of hours in EEStartHours, and EEHoursPC will set the percentage of the profit you are willing to sacrifice for each hour the trade is open thereafter.
If EEFirstTrade is set to
true (default), EEStartHours will start from the open time of the first trade of the basket, but if set to
false it will reset the start time and reduction percent every time a new level is opened, and will wait another EEStartHours from the open time of the last trade of the basket before reducing the target profit.
The second strategy is a reduction in profit by the number of open trades. EEStartLevel will allow you to set the level at which this reduction starts, and EELevelPC sets the percentage reduction per level. To obtain a steady reduction between the Early Exit start level and the break even trades level, use this formula to calculate the value to enter in EELevelPC:
100 / (BreakEvenTrade + 1 - EEStartLevel).
If both strategies are used together, there is a possibility that the total reduction percent could go over 100%, i.e. the basket could close at a loss. This can be prevented by setting EEAllowLoss to
Emergency Close All (ECA)
This is a way of simply getting out of all trades on this chart. A user may have several EAs on their account, or several charts running Evolution, and it might be difficult to find every trade relating to this chart and close them out. Note that Evolution will close ALL open trades on this chart, including Hedge trades, Scalp trades etc.
The quickest way of initiating ECA is to click the ECA button on the chart, if you have dButtons set to
true. If you have ConfirmButtons set to
true you will be asked to confirm your action. If ConfirmButtons is set to
false then all trades will be close immediately. Once the trades have closed the button will revert to its normal colours, and internally the value of EmergencyCloseAll will be set to
false so that further trades will not close automatically.
You can also use the ECA button against the chart summary on the JTA Dashboard if it is active, which acts exactly the same as the button on the chart as described above.
You can also initiate ECA by using the EA's Input Parameters (F7), and setting EmergencyCloseAll to
true. Once you click OK, Evolution will close ALL open trades on this chart, and the display overlay will warn you that EmergencyCloseAll is set to
true. This is as a reminder to change the setting back to
false, because if Evolution opens more trades and you decide to change the parameters for another reason but do not change EmergencyCloseAll back to
false, Evolution will once again close all trades.
Evolution will close all trades immediately but will continue trading. Depending on what entry method you are using, you may get an immediate placing of a new trade if entry conditions allow. If you also want Evolution to stop trading after ECA, you should set ShutDown to
true at the same time as setting EmergencyCloseAll to
GridScalp provides a means of earning extra profits from the grid trades if UseGridScalp is set to
If the price then reverses and moves against the basket, Evolution will place another trade for that level when the entry conditions allow. If the price fluctuates in this manner for some time it is possible to scalp a lot of profit from the last trade of the grid.
You can set gScalpFromLevel to any level of the grid, but better results come from higher levels, where the lot sizes are higher.
If every level of the grid is left to close at gScalpPips profit, then although you will be making profits, the BE point of the basket will be moving further away as each level closes. In order to prevent this, you can force Evolution to only close the very last level of the grid by setting gScalpLastOnly to
true. This will leave all remaining levels open, and the basket will close earlier.
The profits gained by GridScalp can be allocated in several different ways, as described in Profit Allocation.
|GridScalp will be disabled if your broker complies with the FIFO rule.|
SmartScalp is a scalper which runs within Evolution when UseSmartScalp is set to
true, and can be used alongside Evolution's other trading routines, or completely independently.
SmartScalp has 3 indicators to define the entry conditions, which can be used together or separately, which are:
- Woodies CCI - enabled if sUseWoodiesCCI is set to
The entry conditions for Woodies CCI are:
- Trades will only open at the start of a new bar.
- Open a BUY trade when the Woodies slow line (aqua) crosses above 0.
If also using Sniper a trade will only open if the blue line is rising and the blue line is a minimum of sSniperDist above the yellow line.
If also using HAMA a trade will only open if the HAMA candle is bullish.
- Open a SELL trade when the Woodies slow line (aqua) crosses below 0.
If also using Sniper a trade will only open if the blue line is falling and the blue line is a minimum of sSniperDist below the yellow line.
If also using HAMA a trade will only open if the HAMA candle is bearish.
- Sniper - enabled if sUseSniper is set to
The entry conditions for Sniper are:
- Open a BUY trade when the blue line crosses the yellow line, and the blue line is rising, and the blue line is a minimum of sSniperDist above the yellow line.
If also using HAMA a trade will only open if the HAMA candle is bullish.
- Open a SELL trade when the blue line crosses the yellow line, and the blue line is falling, and the blue line is a minimum of sSniperDist below the yellow line.
If also using [HAMA] a trade will only open if the HAMA candle is bearish.
- Open a BUY trade when the blue line crosses the yellow line, and the blue line is rising, and the blue line is a minimum of sSniperDist above the yellow line.
- HAMA - enabled if sUseHAMA is set to true.
The entry conditions for HAMA are:
- Woodies CCI - enabled if sUseWoodiesCCI is set to
The lot size of the SmartScalp trade will be calculated in the following priority:
- If sUseMM is set to
true, the lot size will be based on the Portion Balance, adjusted by sLAF (SmartScalp Lot Adjustment Factor).
- If sBaskLotMult is greater than
0, the lot size will be the maximum of the total open lots in the basket multiplied by sBaskLotMult, or sLotSize.
- The lot size will be sLotSize.
- If sUseMM is set to
SmartScalp also has a multitude of exit strategies:
- If sTakeProfit is greater than
0, SmartScalp will close the trade when this number of pips profit is reached.
- If sProfitTarget is greater than
0, SmartScalp will close the trade when this amount of profit is reached.
- If sCloseWithBasket is set to
true, SmartScalp will close any open trade as soon as the basket closes.
- If sTrailStop is greater than
0, a stop loss will trail the price by the set number of pips, and will close the SmartScalp trade if stopped out.
If sStopTSAtBE is set to
true, the trailing stop will not move past the BE point, and will ensure that the trade can not make a loss. If set to
false, the trailing stop will continue past the BE point, and lock in a profit.
If sReduceTrailStop is set to
truethen once the trailing stop has reached BE it will start reducing as the profit of the trade increases, so the further the price moves, the more profit is locked in. The reduction is based on the value entered in sTSMult, which, if left at the default of
2, will reduce the trailing stop by 1 pip for every 2 pip movement in the price. The trailing stop will never reduce below the StopLevel of the chart.
- If sCandleStop is set to
true, it will place a stop loss at the highest high or lowest low of the previous sCandles. This stop loss will recalculate every time a new candle appears, and so will trail the price.
If sCandleStop is in use, then none of the following exit strategies will be active.
- If sStopLoss is greater than
0, SmartScalp will place a static stop loss the set number of pips away.
- If sUseWoodiesCCI is
trueand the fast line(aqua) passes through 0 by at least sZeroBuffer pips at the start of a new bar the trade will close.
- If sUseSniper is
trueand sCloseOnReverse is true then the trade will close if the Sniper blue line changes direction.
- If sUseHAMA is set to
trueand sHAMACloseOnReverse is
truethen the trade will close if the HAMA candles reverse direction.
- If sTakeProfit is greater than
If sOpenWithBasket is set to
true, then a SmartScalp trade will only be allowed to open if there is already an open basket of trades.
Once a trade has been closed it is possible that the entry conditions are still suitable for another trade to open, and this is made possible if sReOpenAfterClose is set to
true. It will not wait for ALL entry conditions to be met, but will place another trade if the general trend of the indicator(s) used is the same. If sCandleStop is in use then another trade will not be allowed to open if the current price is within sCandleBuffer pips of the candle stop loss. You can limit the number of trades allowed to open while a basket is open by setting the value in sMaxTrades.
It is also possible to restrict the time when SmartScalp trades by setting the SmartScalp Trading Times.
The profits gained by SmartScalp can be allocated several different ways, as described in Profit Allocation.
The indicators used by SmartScalp have a version specifically designed for Evolution which will automatically pick up the settings from Evolution and display them properly on the chart - see Indicators for more information on how to use them.
|If your broker complies with the FIFO rule, or will not allow Hedge trades, then SmartScalp will not be allowed to open new trades if either of these rules would be broken.|
WaveScalp is a scalper which runs within Evolution when UseWave is set to
true, and can be used alongside Evolution's other trading routines, or completely independently.
WaveScalp has 2 indicators to define the entry conditions, which are:
- ArrZZx2, called EV_Wave, which is a pivot point zig-zag indicator.
The lot size of the WaveScalp trade will be calculated in the following priority:
- If wUseMM is set to
true, the lot size will be based on the Portion Balance, adjusted by wLAF (WaveScalp Lot Adjustment Factor).
- If wBaskLotMult is greater than
0, the lot size will be the maximum of the total open lots in the basket multiplied by wBaskLotMult, or wLotSize.
- The lot size will be wLotSize.
- If wUseMM is set to
WaveScalp also has a multitude of exit strategies:
- If wTakeProfit is greater than
0, WaveScalp will close the trade when this number of pips profit is reached.
- If wProfitTarget is greater than
0, WaveScalp will close the trade when this amount of profit is reached.
- If wTrailStop is greater than
0, a stop loss will trail the price by the set number of pips, and will close the WaveScalp trade if stopped out.
If wStopTSAtBE is set to
true, the trailing stop will not move past the BE point, and will ensure that the trade can not make a loss. If set to false, the trailing stop will continue past the BE point, and lock in a profit.
If wReduceTrailStop is set to
truethen once the trailing stop has reached BE it will start reducing as the profit of the trade increases, so the further the price moves, the more profit is locked in. The reduction is based on the value entered in wTSMult, which, if left at the default of
2, will reduce the trailing stop by 1 pip for every 2 pip movement in the price. The trailing stop will never reduce below the StopLevel of the chart.
- If wCandleStop is set to
true, it will place a stop loss at the highest high or lowest low of the previous wCandles. This stop loss will recalculate every time a new candle appears, and so will trail the price.
- If wStopLoss is greater than
0, WaveScalp will place a static stop loss the set number of pips away.
- The WaveScalp trade will close if the RSIOMA crosses.
- If wTakeProfit is greater than
Once a trade has been closed it is possible that the entry conditions are still suitable for another trade to open, and this is made possible if wReOpenAfterClose is set to
It is also possible to restrict the time when WaveScalp trades by setting the WaveScalp Trading Times.
The profits gained by WaveScalp can be allocated several different ways, as described in Profit Allocation.
The indicators used by WaveScalp have a version specifically designed for Evolution which will automatically pick up the settings from Evolution and display them properly on the chart - see Indicators for more information on how to use them.
|If your broker complies with the FIFO rule, or will not allow Hedge trades, then WaveScalp will not be allowed to open new trades if either of these rules would be broken.|
This is a means by which profits can be made when the price is going against the basket and EV is opening new levels, and is in use when UseContraTrades is set to
You can set the level at which Contra Trades starts in the cStartLevel setting, which must be a minimum of
2. (You can't have a contra trade for the first level of the basket, because with the minimum lot size at level 1 the contra trade would be a perfect hedge, and the basket could never close).
Once cStartLevel has been reached, Evolution will open a contra trade every time a new level opens. Each contra trade is closed at the opening of the following level, so there is only one contra trade open at a time.
The profit / loss of the contra trade is taken into account when calculating the basket profit / loss and Break Even point, and will be closed with the basket.
The lot size of each contra trade is based on a fraction of the total open lots in the basket. This ensures that the BE point of the basket + contra does not get pushed too far from the original BE point of the basket on its own. You can adjust the contra trade lot size by changing the cLotMult setting from its default value of
1. The actual formula used is:
Contra Trade lot size = Total Open Lots / Number of basket trades * cLotMult
To avoid the basket BE point being moved far from the PA when GridScalp has closed the last level of a basket, you can force the Contra Trade to close at the same time (with a loss) by setting cCloseWithGS to
true. Because the lot size of the Contra Trade will normally be less than the level closed by GridScalp you should still see an overall profit, and it will also keep the BE point within reasonable reach.
|Contra Trades will be turned off if your broker does not allow hedge trades, or uses FIFO when managing orders.|
The hedge system is used when UseHedge is set to
true, and is a way of reducing DrawDown when Evolution gets on the wrong side of a trade, and the price keeps going against the basket. It is not meant to be a way of making additional profit, although this is possible, depending upon your settings.
Because of the complexity of calculating break even and take profit points when hedging with correlated pairs, this option has temporarily been removed from the EA, so please ignore the next paragraph.
The first choice you need to make is whether to hedge on the same pair, or a correlated pair. Hedging on the same pair has been banned by the NFA in the US, so those with a US broker will need to use a correlated pair. There are several web site that give details of how closely other pairs are correlated to the one you are using, and you need to choose one that is over 80% Positively or Negatively correlated (> +0.80 or < -0.80). Alternatively, you can just enter any symbol in HedgeSymbol, and Evolution will tell you if it is not correlated closely enough. The correlation coefficient calculation is based on the number of days entered in CorrPeriod.
The symbol entered in HedgeSymbol must be EXACTLY as used by your broker.
If you are using the same pair, leave HedgeSymbol blank.
The next choice is whether the hedge starts at a set DrawDown percentage, at a set Level of trades in the basket, or when the Trend changes. This is set by changing HedgeType to a
L or a
If you choose to start at a set DD%, set HedgeStart to the percentage at which to start, the default is
If you choose to start at a set Level, set HedgeStart to the level at which the hedge should start, eg
7, i.e. the hedge trades will open when there are 7 open trades in the basket.
If you chose to start at a Trend change, the direction of the trend will be calculated using UpperTimeFrame (UTF). The hedge will still be based on DD or Level, which will be determined by the setting of UTFAlways. If UTFAlways is set to
true, then no further trades can be opened by the basket after the trend changes, so the hedge will be based on DD. If UTFAlways is
false, the basket will still open new levels, so the hedge is based on level. Set the value of HedgeStart appropriately, according the the previous two paragraphs.
The size of the opening hedge trade is based on the number of open lots in the basket times hLotMult1. Any further hedge trades will have their lot size based on the number of open lots in the basket times hLotMult2.
Hedge trades will be closed under the following circumstances:
Any losses made by the hedge trades are automatically added to the basket, so Evolution will try to recoup them, as long as the setting RecoupClosedLoss is set to
Once the hedge trade has closed, if the basket is still open then there is a possibility that a new hedge trade will open. If the hedge is based on DD, then the target DD for the hedge will be increased by hReEntryPC. If the hedge is based on Level, then the next hedge trade will open only if the basket opens a trade at the next level.
If, for any reason, the basket closes, but the hedge trades are still open, then they will be closed - if there is no basket, there is nothing to hedge against!
Evolution makes its bread and butter from the trades in the basket, but there are several other means whereby trades can be closed at a profit. The profits (or losses) can be allocated in several different ways, depending on the value of xProfitAlloc, where x depends on the routine being used, and should be replaced by: g for Grid Scalp, s for Smart Scalp, w for Wave Scalp, c for Contra Trades.
Note that both Hedge trades and CloseOldest trades do not have a ProfitAlloc setting. Their losses/profits are tied in with the basket, so the allocation is not selectable.
Valid values for xProfitAlloc range from
8, and are used as follows:
- 0 - Any profits or losses are added to / deducted from the account balance. They do not contribute to basket profits under any circumstances, and the basket will not try to recover any losses, even if RecoupClosedLoss is set to
- 1 - Any profits or losses will be added to the basket. If the routine(s) in use are generating profits, this will allow the basket to close before the price reaches the original TP line. (The actual TP and BE line will be adjusted to take the profits/losses into account). If the routine(s) are making losses, then the basket will recoup the losses, and so will take longer to close. The total of all profits and losses contributing to the basket trades will be shown on the display as 'Closed P/L'.
- 2 - Any profits or losses will be added to / deducted from the account balance, and will not contribute to basket profits except under certain circumstances. Because these profits are primarily designed to be profits in addition to the normal basket profits, they are referred to as 'Gravy' (Gravy: profit or unexpected reward).
- While a basket is open, and the other routine(s) are generating profits/losses, the overlay will display the total profit/loss from these trades as 'Gravy P/L'. As soon as the basket closes at its normal TP point, the Gravy is reset to 0.
- There are three occasions when the profits earned from the gravy will be added to the basket profits/losses. This is when the basket has started to go into a higher drawdown, and so the profits from the Gravy trades are used to help it close. This can be triggered by:
- 3 - This is similar to option 1, in that all profits from closed trades are allocated to the basket to help it close earlier, and will be shown as 'Closed P/L'. However any losses incurred from closed trades will be deducted from the account balance, and will not be recouped by the basket, and will not be included in 'Closed P/L'.
- 4 - Is similar to option 2, in that all profits from closed trades are allocated to the account balance, and will show as 'Gravy P/L', but will be available to the basket if required. Any losses are deducted directly from the account balance, and will not be recouped by the basket, and will not be included in 'Gravy P/L'.
- The following 4 options will only come into effect if the basket drawdown has reached the percentage set in BasketCloseDD, or the basket level has reached BasketCloseLevel. If neither of these limits has been reached, the profits / losses will be added directly to the account balance, as in option 0.
- 5 - After BasketCloseDD or BasketCloseLevelhas been reached, profits / losses will be added to the basket, as in option 1.
- 6 - After either limit has been reached, profits / losses will be added to Gravy, as in option 2.
- 7 - After either limit has been reached, profits will be added to the basket, and losses deducted from the account balance as in option 3.
- 8 - After either limit has been reached, profits will be added to Gravy, and losses deducted from the account balance as in option 4.
Equity Stop Loss Protection
Equity Protection was developed to prevent a total blowout of your account. No matter what entry methods are used, or how you determine the trend, there is no way to 100% guarantee that the first trade of the basket will open in the right direction. We must therefore accept that Evolution will sometimes get it wrong, and will need to open a basket of trades in order to trade out of the situation.
However opening extra levels in a basket at increasing lot sizes will increase the drawdown on the account, and could result in losing the whole of the balance.
Evolution will protect you from losing all the account balance by using Portion Control to allocate only a fraction of the total account to this chart, and by using MaximumDDpc to limit the amount that can be lost. If the drawdown of the trades opened by this chart reaches MaximumDDpc, then all open trades will be closed.
If you were unfortunate enough to have an EP hit, then Evolution would just carry on trading without some means of stopping the chart from trading. This is provided by the Stop Trade Percent feature of Evolution. This is designed to stop Evolution trading on this chart if the portion balance drops by the percentage set in StopTradePercent.
The portion balance can reduce from having an EP hit, or from the stop losses present in several of the other profit centres of Evolution, eg the Hedge trades, SmartScalp, etc.
If you want to restart trading after it has been stopped, you will need to 'reset' Evolution. This can be done by going into the EA Inputs (F7) and clicking OK, or removing Evolution from the chart and reloading it. Both of these methods will force Evolution to restart, and reset the Stop Trade Percent.
The value of the Portion Balance used for the calculation of Equity Protection and Stop Trade Balance for each chart is calculated when the basket opens, and will not change until the basket closes again. This ensures that any EP hits from other charts on this account, or a withdrawal from your account, will not have a knock on effect on this chart, which is still making profits.
Power Out Stop Loss (POSL)
Evolution does not send Take Profits or Stop Losses to your broker. In the unfortunate event of you losing your internet connection, Evolution will not be able to monitor trades, so will not be able to close them at a profit, but worse, your open trades will not have any of the above methods of Equity Protection.
In order to maintain Equity Protection you can set UsePowerOutSL to
true. This will allow Evolution to send a stop loss to your broker, based on the value of POSLPips (default
999) from the break even point of the basket.
When the basket opens the first few levels, the lot sizes are small so a movement of 999 pips will result in a small loss, and will be nowhere near the 50% set in MaxDDPercent. However, as lot sizes increase at higher levels, a movement of 999 pips will cause a much higher loss, so the value of POSL is reduced to limit the maximum loss to MaxDDPercent + 1%. The additional 1% is included so that POSL can not interfere with the normal logic of Evolution.
Once POSL has been set by Evolution, it can not be removed manually because Evolution will automatically reinstate it. In order to remove it, you must leave UsePowerOutSL at
true, but change POSLPips to
0. After the next tick, all stop losses should have been removed from the basket trades, and you can change UsePowerOutSL to
As long as UsePowerOutSL is set to
false, you can set a manual stop loss on any trade, and it will not be overwritten by Evolution. Assuming that the trade has not been closed normally by Evolution, your broker will close the trade at the SL you have set.
Setting the AllowTrades parameter to
false will not allow the EA to open or close any trades on this chart, even though the overlay display will still be updated. You can use this setting to ensure that you have entered other parameters correctly, and the chart portion and starting lot size are to your expectations. Once you are satisfied you can set AllowTrades to
true. However, even with AllowTrades set to
false you will still be able to use the buttons on the chart to open a new BUY or SELL trade, or close all trades with the ECA button.
| AllowTrades is set to |
Once the EA has started running there are several other settings which can be used to restrict trading:
You can specify at what times Evolution should trade by using the time filter. There are time settings for the Basket (b), SmartScalp (s) and WaveScalp (w), so each can be set to have its own trading times. The time settings are based on the start and stop times during each day of the week, with an additional setting for Non-Farm Payroll Fridays. The start and stop times are based on the 24 hour clock, and can be entered as whole hours (8-15), or hours and minutes using a colon (8:30-16:45), or a combination of the two (9-16:48).
You can set as many trading times during each day as you like by separating each start and stop time with a comma (0-5:30,11-16:45,20:30-24). It is important that each stop time is greater than the previous start time, and each start time is greater then the previous stop time (if any). Each different Start-Stop period during a day is called a session.
To start trading at midnight, set the start hour as 0 (0-?), and to stop at midnight set the stop hour as 24 (?-24). If one day's stop hour is 24, and the next day's start hour is 0, then trading will continue over midnight, and the two periods will be treated as one session.
If you don't want to trade at all during a day, then leave that day's trade times blank.
The start and stop times are based on either your local time, the broker's time, or GMT. All our backtests are based on GMT times, but you have the choice of using local or broker time if you wish. Here is how the settings should be entered:
- GMT Time Settings
- Enter the start and stop times for each of the sessions that you want to trade each day based on GMT.
- The EA needs to know what the time difference is between GMT and your broker, which you can set with BrokerTimeOffset. (Your broker's web site should have details of what their GMT offset is - if not drop them a line). This time difference can also be calculated automatically if AutoGMTOffset is set to
- Local Time Settings
- Enter the start and stop times for each of the sessions that you want to trade each day based on your local time. Remember that you may need to change the trading times if your location is subject to Daylight Saving changes.
- The EA needs to know what the time difference is between your local time and your broker, which you can set with BrokerTimeOffset (Take the Broker Time from the Overlay and deduct your local time. Enter this time difference in BrokerTimeOffset - if the difference is negative make sure you enter a negative value). If you are using local time settings then you must ensure that AutoGMTOffset is set to
- Broker Time Settings
- Enter the start and stop times for each of the sessions that you want to trade each day based on your broker's time. Remember that you may need to change the trading times if your broker is subject to Daylight Saving changes.
- The EA does not need to make any adjustments for the GMT offset, so make sure that BrokerTimeOffset is set to 0 and AutoGMTOffset is set to
|The AutoGMTOffset function uses the local time of your PC/VPS to determine the GMT offset, so it is important that your PC/VPS clock is correct - if it is regularly incorrect then please use the manual BrokerTimeOffset parameter for your time settings.|
You can choose how the trading times are displayed on the overlay by the use of the DisplayBrokerTimes setting. If set to
true then all trading start and stop times will be displayed at the broker's time zone. If left at the default of
false the times will be displayed as the user's input times, as they were in previous versions.
The display overlay will inform you of the stop time of the current trading session or the start time of the next trading session in Green. If there is a basket of trades open and the session has ended, the display will show the start time of the next session in Yellow. The broker time offset will be shown in brackets after the broker time, and will be displayed in blue if set manually, or green if calculated using AutoGMTOffset, and the Local Time:GMT difference will also be shown in green if positive and red if negative.
ShutDown is a way of telling Evolution that we don’t want to continue trading after the current basket is closed. Once the basket closes, Evolution simply will not place any more trades until ShutDown is reset to
false. ShutDown can be turned on or off at any time and the display overlay will inform you when it is turned on.
ShutDown can be set to
true in the parameter settings of the EA, or simply by clicking the SD button on the chart if dButtons is set to
true. You can also use the SD button against this chart's details on the JTA Dashboard. If using the Buttons, you will be asked to confirm your action if ConfirmButtons is set to
The colour of the button will be reversed when ShutDown is
true, and the chart display overlay will also inform you when it is turned on. You can turn ShutDown on and off as often as you like by clicking the SD button.
Once the basket closes the overlay will display that trading has stopped, and that you will have to set ShutDown to
false in order to continue trading. Again, this can be done simply by clicking the SD button.
Holiday Shut Down
The HolidayDates are entered in the format [day]/[month]-[day]/[month], and if there is more than one holiday period they must be separated by a comma. All dates are inclusive, so Evolution will restart trading the day after the final holiday date. The next holiday period will be displayed on the display overlay if it is enabled, giving confirmation that the dates have been entered correctly.
If a basket is open when the holiday shutdown starts, Evolution will continue to monitor the trades, and will still open new levels if entry conditions allow, unless HolidayAllowTrades is set to
false, when the current trades will still be monitored, but no more trades will open until the holiday period is over.
Evolution can be set to stop trading once certain daily targets have been met. The daily targets are based on the 24 hour day, no matter how many different sessions there may be during the day.
Setting DailyTrades to any value greater than
0 will set the maximum number of baskets allowed to close during the day.
If DailyTarget is set to any value greater than
0, Evolution will stop trading for the day when the set profit target has been met. Note that the profit target is from all sources, and not just from the basket.
If you do not want to set a target for a particular session, enter a 0.
The first session for each day is the one which is the first to start that day, so any session which continues from the previous day will not be classed as today's session.
Evolution keeps track of all open trades by using a unique* magic number.
- I say unique because it uses an algorithm based on:
- The EA name,
- The EANumber,
- The chart on which Evolution is running, and
- The time frame of the chart.
This algorithm produces a number between 1 and 2,147,483,647, and while it is extremely unlikely that different instances of Evolution would result in the same magic number, it is possible. It is therefore recommended that once Evolution has been added to a chart that you check other instances of our EAs to ensure that the magic number is indeed unique.
In order to run Evolution on 2 or more charts with the same pair and timeframe, all you need to do is to alter the EANumber, so the first chart has an EANumber of
1 (default), the second an EANumber of
2, etc. This will generate a different magic number for each chart.
There is no need to use a different EANumber to differentiate between the same chart and TF when used with different EAs because they have a different EA name, so will have different magic numbers.
You can bypass the automatic magic number generation by setting a magic number of your own. This is achieved by setting the EANumber to any unique number greater than
99. This EANumber will then become the magic number.
Bear in mind that if you change the Time Frame of a chart on which Evolution is trading, then a different magic number will be generated. This means that any open trades on that chart will no longer be monitored. If the TF was changed accidentally, changing it back will allow Evolution to carry on trading as normal. However if you want to change the chart TF permanently, you can still monitor any open trades by changing the EANumber to the magic number (displayed at the top right of the chart) BEFORE the TF is changed.
Magic Numbers are also used to manage trades opened by other functions of Evolution - SmartScalp, WaveScalp and Contra Trades. These magic numbers (as well as the hedge magic number) are all generated from the chart magic number. You can find which magic numbers are used by these functions by setting Debug to
true, and checking the Terminal Experts window.
You can keep track of which instance of Evolution opened / closed which trades by using the TradeComment parameter. By default this is set to the EA name and version, or to the set file name if you load a set file, but can be changed to anything of your choice. You can view the Trade Comment in the 'Trade' and 'Account History' tab of the 'Terminal' window of the MT4 application. If the 'Comment' column is not visible, right click anywhere in the Terminal window, then left click 'Comments'.
It is recommended that you change TradeComment from the default EA name and version, so as not to inform your broker which EA is in use.
|MT4 build 600+ puts a limit on the number of characters which can be used in the trade comment to 31. Please ensure that your TradeComment is 31 characters or less to enable it to display in the Comment column.|
If you are not using the default settings then you can also use the UserComment on the display to identify which settings are in use on this chart. The default setting will show the EA name and build number, but it can be changed to anything you like.
The Overlay will show you a wealth of information, most of which is fairly self explanatory. However there are times when a label will display a different message, or will change colour, so here are some of the subtle changes that you may not notice at first:
Trading Times - this label will normally display in the default display colour if you are displaying the trading times as at the broker's time zone (DisplayBrokerTimes is set to
true) or in green if DisplayBrokerTimes is set to
false, and will give details of when the current session will end or when the next session is due to start. If there are open trades in the basket when a session comes to an end, the next start time will be displayed in yellow.
This label will also show, in red, some of the reasons why trading has been prevented, for example:
- The EA is still processing the first tick after being loaded,
- AllowTrades has been set to
- The spread is greater than MaxSpread
- The account margin is insufficient to open the next trade.
- Trading has been stopped because of an error in the settings - check the Terminal Experts tab for the reason why.
An (M) displayed after Evolution Portion indicates that this is the master chart for setting the AccountPC for Evolution to use. The Chart Portion will normally display in DeepSkyBlue if none of the charts in use are using APC. If another of the charts is using APC, it will display in Green. If this chart is using APC, it will display in Orange, and if APC is at the maximum of 100% it will display in Red.
There may be occasions when the sum of the individual chart percentages does not add up to the value shown in brackets on the chart. This occurs when charts have been added and removed, but the parameters have not been reset correctly. To reset the overall percentage double click on the label until it is highlighted, then left click and drag it across the chart. The percentage will reset and calculate the proper value as each chart receives a tick.
If Early Exit is in use, you will see both the normal Profit Potential of the basket, together with the revised Profit Potential after the Early Exit reduction has been applied.
The number of open BUY and SELL trades is normally displayed in DeepSkyBlue. They will be shown in Green if GridScalp is active, Yellow when BEPlusLevel has been reached, Orange when BreakEvenTrade is reached and Red at MaxTrades.
The line showing how many lots will open at the next trade will change depending on which function is preventing the trade from opening.
The Entry display at the top right shows which of the Entry Methods are active on this chart, with the number in brackets showing if the entry is trading in the normal direction (1) or in reverse (2). The smilies will show a happy face when the entry condition is met, or an unhappy face if the entry conditions indicate a trade in the direction opposite to the trend. If the entry condition does not indicate a trade in either direction, a neutral face will be displayed. The smilies will be displayed in Green for a BUY, Red for a SELL, and Orange for neutral. Once a basket has opened, the Entry Methods will be greyed out because the entry conditions are no longer calculated, but the Entry label will remain the same colour as the trend was when the trade was placed.
Evolution is a very complex EA, and in order to ensure that each function is working correctly it is sometimes necessary to enable a Debug print.
Under normal circumstances there is no need to set Debug to
true. However there are some occasions when you might find the additional information useful:
- When setting up your grid levels, Debug will print out a list of each level, grid size and TP size.
- Debug will show the lot size at each grid level (before MM recalculates the starting lot size).
- It will show you what basis is used to calculate the TP point.
- It will show all Magic Numbers, in case you want to open a manual trade.
- It will add detailed information about your Account and MT4 settings to the display overlay.
With the complex changes to our dll file there are many additional errors which you may encounter. In order to obtain details from the dll another parameter is provided, DebugDLL, which will output messages to a log file.
|It is highly recommended that you do not set DebugDLL to true unless requested to do so by a member of the JTA team. It will generate a very large log file which will eventually fill your hard disk.|
If dLines is set to
true then the following horizontal lines will be displayed on the chart at various times:
- Green Dash-Dot line - MT4 line to show the open price of a Buy or Sell trade.
- DodgerBlue Solid line - line to show the Break Even point of all open Basket trades.
- Gold Solid line - line to show the Take Profit point of the open Basket trades.
- Yellow Solid line - line to show the EarlyExit Take Profit point.
- Crimson Solid line - line to show the overall BE point if the Basket has Hedge trades open.
- Red Dash-Dot-Dot line - line to show the minimum open point of the next grid level.
- DodgerBlue Dot line - line to show the Basket Stop Loss.
- Gold Dot line - line to show the basket Trailing Stop or MazimizeProfit Stop Loss.
- Gold Dash-Dot-Dot line - line to show the start of the Trailing Stop or MaximizeProfit function (ProfitSet point).
- SlateBlue Solid line - line to show the Hedge Break Even point.
- SlateBlue Dot line - line to show the Hedge Stop Loss
- Yellow Dot line - line to show the SmartScalp Stop Loss
- Yellow Dash line - line to show the SmartScalp Trailing Stop
- SpringGreen Dot line - line to show the WaveScalp Stop Loss
- SpringGreen Dash line - line to show the WaveScalp Trailing Stop
The display overlay also has the option to display several buttons on the chart. Set the parameter dButtons to
true to display them, and to
false to remove them.
As soon as a button is pressed, its colours will reverse so that you can see that the function has been triggered, and they will revert back to normal once it has finished. The only exceptions to this is the ShutDown (SD) button, which will remain in the reverse colours all the time that ShutDown remains
true, and the F, M and P buttons which will be disabled for 5 minutes in order to prevent overloading your computer with multiple clicks.
There are 5 buttons which affect the overlay display, which are the B, O, T, E, and D buttons. These buttons act as follows:
- D - will turn the Debug information on/off. Note that this will also change the setting of the Debug parameter, with the associated printing of the Debug information in the Experts or Journal tab.
- E - will turn the Entry condition information on/off.
- T - will turn the open Trades information on/off.
- O - will turn all the remaining Overlay information on/off.
- B - will remove all Buttons, other than the B button, from the screen.
There are 3 buttons which provide links to pages on our web site, which are:
- F - will open your web browser and take you to the Blessing Pro! Forum.
- M - will open your web browser and take you to the Blessing Pro! Manual on the Wiki.
- P - will open your web browser and take you to the Blessing Pro! Parameter page on the Wiki.
The following buttons affect how the EA trades, and you can choose whether the buttons will execute as soon as you press them, or whether they display a messagebox with details of the action to be taken which you have to confirm, by setting the parameter ConfirmButtons:
- ECA - see Emergency Close All for operation details.
- BUY - see Adding Manual Trades for operation details.
- SELL - See Adding Manual Trades for operation details.
- SD - See ShutDown for operation details.
- Reset - This button will allow you to reset the Maximum Drawdown percent as shown on the display overlay. It will also reset the Maximum Drawdown value and date/time which is displayed if you have Debug set to
true. Note that if you have a basket of trades open when the Reset button is pressed, the Maximum Drawdown percent and value will be set to the Drawdown and Minimum Profit figure on the overlay, and the date/time of that drawdown will be set to the date/time at which the button was pressed.
These buttons will only appear under certain circumstances:
- If you are using the JTA Dashboard then a DB button will also be visible on the chart, which will bring the DashBoard chart to the top when clicked.
- When AutoUpdate has downloaded a new version you will see a 'New Version Available' button next to the EA name and build number on the chart overlay.
- If your CID has changed you will see a 'Open CID Swapper' button, which will allow you to change your own CID.
All the buttons will act as they should while back testing in visual mode. The only difference while backtesting is that the Strategy Tester is unable to display a message box, so whether ConfirmButtons is set to
false the buttons will always act as though it was set to
You can change the font size of the button text with the dButtonFontSize variable.
When back testing on a chart, the Strategy Tester report will supply you with summary details of the account balance and relative drawdown. You can also see a graph of how the balance increased, together with the equity at that point. The problem with this graph is that each point is displayed only when a trade closes. It does not show the balance and equity over time, which is what the Statistics settings will allow you to do.
In order to produce a statistics report, you must set SaveStats to
true. If you want to save the statistics for a forward test, you should leave the StatsInitialise parameter at its default setting of
false so that new data will be added to the existing file. When you are backtesting it will automatically be set to
true so that a new statistics file is created for each backtest. So you only need to change StatsInitialise to
true when you would like to close an existing stats file and start a new one.
You also need to decide how often to store the statistics information, and setting StatsPeriod to
3600 will save the statistics data once every hour, which provides a reasonable number of data points for a 2 or 3 year back test.
For a detailed explanation of what to do with this data read the Creating an Equity Chart page on the Wiki.
Thanks to ianj for providing the idea and original code.
Setting UseEmail to
true will allow Evolution to keep you informed by Email, as long as Emails are enabled in the MT4 platform (Tools - Options - Email).
You will be sent emails under the following conditions:
- When the drawdown of the chart reaches pre-defined levels. The levels are defined with EmailDD1, EmailDD2 and EmailDD3. If the price is fluctuating around one of the levels, to ensure that you are not inundated with emails, Evolution will wait for EmailHours before sending another one, unless the drawdown reaches the next level, when an email will be sent immediately.
- If ShutDown is set to
true, you will be informed when the basket has closed.
- If EmailNewTrade is set to
true, you will receive an email every time Evolution opens a new trade, along with the reason for opening it. The setting of EmailNewTrade works independently from UseEmail.
Sounds will play under the following conditions:
- When Opening a trade
- When Closing a trade
- When Evolution starts after a holiday shutdown
- When Evolution stops for a holiday shutdown
- When the Email drawdown levels are reached
- When the Portion Balance drops below the Stop Trade Balance
- When Trading is stopped for any reason
Indicators and Scripts
Each of the different Entry Methods in Evolution, and also Smart Scalp and Wave Scalp, all rely on different indicators to provide the trade entry points. The majority of them are standard indicators included in MT4, but some are not, and they all have several input parameters which are user adjustable in Evolution. Some also have features which are not present in the original indicator, such as the BBDistance setting in the Bollinger Bands indicator.
Included in the Custom Indicators section of the MT4 Navigator window, you will find modified versions of all indicators used in Evolution which are:
Each of these indicators will automatically use the settings for the indicator as entered in Evolution if UseEVSettings is set to
true, and the correct EANumber is entered in EvEANumber. Both UseEVSettings and EvEANumber can be found in the indicator settings, not in Evolution settings.
If you want to use the indicators on a chart while back testing, you must set EvEANumber to
When the indicator has been loaded, the name will display one of three settings:
- If not using the settings from Evolution (UseEVSettings is
false), the name will show the normal indicator name and settings.
- If you are using the settings from Evolution (UseEVSettings is
true), and there are no problems, then the name will show EV_ plus the indicator name, with the settings being used by Evolution.
- If you are using the settings from Evolution (UseEVSettings is
true), and the indicator has problems, then the name will display the EvEANumber and magic number (ID) for you to check. Problems are usually caused by either the wrong EvEANumber being entered, or by using an indicator which is not being used by Evolution eg. using EV_Sniper when UseSmartScalp is false.
- If not using the settings from Evolution (UseEVSettings is
Evolution also has a script (EV_Grid) which will place the grid lines on the chart in accordance with the SetCountArray, GridSetArray, GAF and MaxTrades parameters. Setting UseEVSettings to
true and entering the correct EANumber in EvEANumber will automatically use the same values as set in Evolution.
Simply drag the script onto the chart. You can specify the position of the 'Base' line by setting BasePoint to the required value (the open price of the first trade of the basket), or if you leave BasePoint at
0, the grid will be formed around the point where you dropped the script on the chart. If you drop at the wrong place, simply drag the script on again at the right place - all previous lines will automatically be removed.
Bear in mind that the grid lines produced are based on fixed values in GridSetArray, and do not account for any variations caused by EntryDelay, SmartGrid, HAMA, or slippage from the broker.
EV_Grid_X is another script which will remove all grid lines from the chart.
If you have installed the JTA Dashboard on another chart, then all the important information from the overlay will also be displayed on the Dashboard.
The chart overlay will also have another button showing DB, which will automatically bring the Dashboard chart window to the top.
Please read the JTA Dashboard Manual for further details.
|Disclaimer||Copyright © 1995-2016 J Talon LLC, All rights reserved|