Blessing Pro! Manual v1.0

From JTAWiki
Jump to: navigation, search

JTA_Sales.png   Blessing Pro! Manual v1.0 
From JTAWiki, a project by J Talon LLC


Contents

Overview

Blessing Pro! is an Expert Advisor which is an improved version of our free EA, Blessing 3. It has all the same trading entry and exit methods, but many of them have been improved, and many more functions have been introduced.

Blessing Pro! 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 PendingFirstTrade. 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, Maximize Profit, Close Oldest, Early Exit, and Emergency Close All.

Blessing Pro! 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 by each chart to trade Blessing Pro! can be set using Portion Control. To help you keep track of all the charts running Blessing Pro!, and the open trades on those charts, another EA is provided, called JTA Dashboard.

But Blessing Pro! 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.

There are several methods you can use to specify Trading Times, including a Daily Time filter, Holiday Shut Down times, and ShutDown after basket close.

Blessing Pro! can also provide you with Information, through the use of the Display Overlay, Email, Sounds, Debug feedback, and Account Balance and Equity statistics.

Installation

Download

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

Installing

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

Upgrades

As long as you remain a subscriber, 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 took out your subscription. If you would like to change your email address, then please send details of the new address to sales@JTAToday.com.

If you have AutoUpdate set to true then the EA will automatically download any new version to a folder on your hard drive, 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.

Troubleshooting

If you have problems when installing the files, please go through each of the items on the Experts troubleshooting page of the Wiki.

Problems running the EA, or attaching it to a chart, are covered in the Guardian troubleshooting page of the Wiki.

Error Messages

After you have successfully installed the EA there are many checks made on the Input Parameters and your Account Settings to ensure that there are no problems. If there are problems which are serious enough to stop the EA from trading then you will see an Error Message on the Overlay, and you can get more details of the error and possible solutions on the Error Messages page of the Wiki. The EA will also display a button on the chart which will take you to the relevant section of the Error Messages page when clicked.

Determining the Trend

Moving Average

Blessing Pro!'s basic design is to use the Moving Average indicator to determine the trend and bracket the current price with STOP and LIMIT trades to profit in the direction of the trend. If the current price is above the MA, the trend is set to LONG, and if below will be SHORT.

If the trend direction is LONG, BUY STOPS are used to open the initial trade to take profits in the direction of the trend. If the price reverses, BUY LIMITS are hit and profits are taken on the price reversal back in the direction of the trend. If the direction is SHORT, SELL STOPS and SELL LIMITS are placed. If the trend is RANGING, Blessing Pro! will place a BUY LIMIT and SELL LIMIT trade.

Trend MA Settings

You can specify the MA settings used in determining the trend with the following parameters:

  • TR_TF sets the time frame of the chart to use for the MA indicator.
  • TRPeriod sets the number of periods (bars) to use in the calculation.
  • TRMethod sets the moving average method.
  • TRPrice sets the applied price constant.

Click on the individual links to see the valid entries for each parameter.

Force Market Condition (FMC)

You can also force Blessing Pro! to trade in a certain direction by using ForceMarketCond. A setting of 3 turns this function off, and Blessing Pro! will trade with the trend as described above. A setting of 0 will force Blessing Pro! 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.

Entry Methods

Allow Trades

Blessing Pro! 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.

Star full 256.png
It is recommended that you leave AllowTrades at false when you load Blessing Pro! on to a chart, then when the overlay has settled down after a few ticks, and the 'Waiting for next tick ...' message has been cleared, you should click the 'Allow Trades is set to false' button on the chart overlay, which will then allow trading without having to change the EA's Input Parameters again.

Trade Long and/or Short

Under normal circumstances Blessing Pro! will open either Long (Buy) trades or Short (Sell) trades. However you can restrict trading to one direction only by setting either TradeLong or TradeShort to false. If both parameteres are set to false then the EA will be stopped with an error message.

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 PendingFirstTrade. If set to true Blessing Pro! will place pending trades, and a setting of false will place market trades. For the purposes of this manual, all examples will assume that PendingFirstTrade is set to true (its default setting).

The direction of the trade being placed is based on the Trend and Entry Decision.

If using pending orders and the trend changes, Blessing Pro! 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.

Stealth Options

When using pending trades, all details of the trade will be kept internally if UseStealthOrders is set to true, and are not sent to the broker unless UseStealthOrders is set to false. When using the Stealth option you will see lines on the chart display showing where the trades are placed, and when the price reaches either of the 'pending' trades Blessing Pro! will send a market order to open the first trade of the basket. If you are not using the Stealth option, then the normal broker lines will show the price where the pending trades have been placed.

Warning.png If you have UseStealthOrders set to false then any pending trade sent to the broker must be outside of the StopLevel set by the broker for that chart. The StopLevel will vary between different charts, but the EA will ensure that any pending order which has been triggered by the entry conditions will be placed as close to the current price as possible. If you have a small grid size, or the pending order is too close to the current price, then the pending order will be placed further away than the equivalent trade would be if UseStealthOrders was set to true. This means that a set file with UseStealthOrders set to true will trade differently from one with UseStealthOrders set to false even though all other parameters remain the same.

Pending Order Placement

Fixed Grid

The default method for setting pending trades is based on a fixed grid, determined by the size of the first grid set with GridSetArray. 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 the two pending 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.

Pending Grid Size

You can choose an independent setting for the first grid size of the pending trades by setting PendingGridSize to any value greater than 0. The size of PendingGridSize sets the number of pips between the two pending trades. If FlexGrid is not in use then the trades will be placed at an equal distance from the current price.

If PendingGridSize is left at 0 then the distance between the pending trades will be based on the first grid size set in GridSetArray.

Flex Grid

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 based on either the first grid size or the PendingGridSize, 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.

Flex ATR

FlexATR uses the following parameters:

  • FlexATRTF sets the time frame of the chart for the ATR calculation.
  • FlexATRPeriod sets the period (number of bars) to use in the calculation.

Instead of using the initial grid size or PendingGridSize 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, but only if UseFlexGrid is set to true. 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.

Entry Offset

The placement of pending trades can also be adjusted by using EntryOffset. A positive value will move the entry points further away from the current price, and a negative value will bring them closer.

Trail PA

Normally, once the pending trades have been set, then they are fixed at that position. If one of the trades is 10 pips from the price, and the PA moves 15 pips further away from the order, then the price needs to move back 25 pips before the order will be triggered. If PendingTrailPA is set to true then the pending trade will trail the price as it moves away from the original position, so the price never has to move back more than 10 pips before triggering the pending trade.

Entry Decision

Blessing Pro! uses a variety of indicators in its entry decision making process. By default, MAEntry is turned on as the base entry method. 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 can be opened.

Each of the standard entry methods built into Blessing Pro! 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 Blessing Pro! will place a SELL STOP/LIMIT order.

There are 5 main entry methods: Moving Average; Commodity Channel Index; Bollinger Bands; Stochastic; and Moving Average Convergence Divergence (MACD).

Moving Average

MAEntry uses the normal entry settings, and uses the following parameters:

  • MA_TF sets the time frame of the chart for the MA calculation.
  • MAPeriod sets the period (number of bars) to use in the calculation.
  • MAMethod sets the moving average method.
  • MAPrice sets the applied price constant.
  • MADistance sets a channel each side of the Moving Average which is treated as Ranging Market.
  • MAMaxDistance sets the maximum distance from the MA where trades can be placed - if the PA is greater than the MAMaxDistance from the MA then no trades will be placed. Set to 0 to disable this feature.

Click on the individual links to see the valid entries for each parameter.

If the price is above the MA channel but less than the MAMaxDistance, then Blessing Pro! will place BUY STOP/LIMIT trades, if below it will place SELL STOP/LIMIT trades, and if within the MA channel will place a BUY and SELL STOP order.

If dEntry is set to true then the overlay will display the state of the MA Entry: A smiley face means that the entry conditions have been met, a frowning face means that the reverse entry conditions have been met, and a neutral face means that no entry conditions are met. The graphic will display in Cornflower Blue if a Buy trade is triggered, Firebrick Red for a Sell, or Orange if Neutral.

Commodity Channel Index (CCI)

CCIEntry uses the normal entry settings, and uses the following parameters:

  • CCIPeriod sets the period (number of bars) to use in the calculation.
  • CCIPrice sets the applied price constant.

Click on the individual links to see the valid entries for each parameter.

CCI Entry 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, trades are opened in that direction. The direction of CCI for the 4 time frames can be viewed on the screen by setting both dCCI and dEntry to true in the Display Control settings.

If dEntry is set to true then the overlay will display the state of the CCI Entry: A smiley face means that the entry conditions have been met, a frowning face means that the reverse entry conditions have been met, and a neutral face means that no entry conditions are met. The graphic will display in Cornflower Blue if a Buy trade is triggered, Firebrick Red for a Sell, or Orange if Neutral.

Bollinger Bands

BBEntry uses the normal entry settings, and uses the following parameters:

  • BB_TF sets the time frame of the chart for the BB calculation.
  • BBPeriod sets the period (number of bars) to use in the calculation.
  • BBMethod sets the BB moving average method.
  • BBPrice sets the applied price constant.
  • BBDeviation sets the number of standard deviations from the MA to place the Upper and Lower bands.
  • BBDistance sets the distance to increase/decrease the Upper and Lower bands to create a wider/narrower channel.

Click on the individual links to see the valid entries for each parameter.

The Bollinger Bands indicator (BB), is a powerful indicator that 'channelizes' the prices. Movement outside the bands is rare and when it happens the chances are that a correction to the price will bring it back within the bands again. The typical upper and lower bands of the BB channel are calculated based on two standard deviations away from the mean average of the MA. Usually 2 times the standard deviation is average and is what most traders use and although user selectable, it's not recommended that BBDeviation is altered from 2. BBDistance sets a wider or narrower channel around the upper and lower bands, depending on whether the value is positive or negative. This increases/decreases the distance that the price must move before Blessing Pro! will open a trade.

Warning.png BBEntry 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.

If dEntry is set to true then the overlay will display the state of the BB Entry: A smiley face means that the entry conditions have been met, a frowning face means that the reverse entry conditions have been met, and a neutral face means that no entry conditions are met. The graphic will display in Cornflower Blue if a Buy trade is triggered, Firebrick Red for a Sell, or Orange if Neutral.

Stochastic

StochEntry uses the normal entry settings, and uses the following parameters:

  • STO_TF sets the time frame of the chart for the Stoch calculation.
  • KPeriod sets the period (number of bars) to use in the calculation.
  • DPeriod sets the period (number of bars) to smooth the %K line.
  • Slowing sets the period (number of bars) to smooth the %D line.
  • STOMethod sets the moving average method of the %K line.
  • BuySellStochZone determines the Overbought and Oversold Zones.
  • LeavingZone sets whether the entry is triggered as the main line exits the zone instead of when both lines enter the zone.

Click on the individual links to see the valid entries for each parameter.

The Stochastic Oscillator is a momentum indicator that is used to determine whether the currency pair is OverBought or OverSold. Usually a Stoch value above 80 is considered an overbought condition and less than 20 is an oversold condition. Setting BuySellStochZone to 20 creates these zones. If LeavingZone is set to false, then BlessingPro! will trigger a Buy trade when both the Main and Signal lines are in the OverSold zone (<20), and a Sell trade when both lines are in the OverBought zone (>80). If LeavingZone is set to true, then the entry is triggered when the main line leaves the zone after both the main line and signal line were within the zone on the previous bar.

If dEntry is set to true then the overlay will display the state of the Stoch Entry: A smiley face means that the entry conditions have been met, a frowning face means that the reverse entry conditions have been met, and a neutral face means that no entry conditions are met. The graphic will display in Cornflower Blue if a Buy trade is triggered, Firebrick Red for a Sell, or Orange if Neutral.

Moving Average Convergence Divergence (MACD)

MACDEntry uses the normal entry settings, and uses the following parameters:

Click on the individual links to see the valid entries for each parameter.

The Moving Average Convergence Divergence (MACD) indicator is used to determine changes in the strength, direction, momentum, and duration of a trend. BlessingPro! will place a Buy trade when the MACD Main line is greater than the Signal line, and a Sell trade when the Signal is greater than the Main.

If dEntry is set to true then the overlay will display the state of the MACD Entry: A smiley face means that the entry conditions have been met, a frowning face means that the reverse entry conditions have been met, and a neutral face means that no entry conditions are met. The graphic will display in Cornflower Blue if a Buy trade is triggered, Firebrick Red for a Sell, or Orange if Neutral.

Force Market Condition (FMC)

Even if all entry methods are set to 0, it is still possible for Blessing Pro! to open new basket trades, depending on the value of ForceMarketCond.

If FMC is set to 0 or 1 it will force an UP or DOWN trend, and Blessing Pro! will place either BUY or SELL trades.

If FMC is set to 3, Blessing Pro! will place either BUY or SELL trades depending on whether the trend is UP or DOWN. If the trend is RANGING, no trades will be placed.

Both of these settings will cause Blessing Pro! to open new baskets as soon as the previous one closes.

Star full 256.png

If FMC is set to 2 it will force a RANGING trend, and Blessing Pro! will open no new basket trades if all entry methods are set to 0, but it will still open trades at new grid levels, so you can use this setting if you only want Blessing Pro! to manage baskets which are started manually.

Delaying the Next Basket

After a basket has closed Blessing Pro! may open another basket immediately if the entry conditions are met. 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.

Manually Starting a Basket

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.



Back to Setting the Grid
Back to Entry Methods
Back to Overview




Money Management

Starting Lot Size Calculation

Blessing Pro! determines the size of the initial lot based on whether UseMM is set to true or false.

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 UseMM is set to true, then Blessing Pro! will calculate the lot size based on the Portion Balance, with a minimum lot size of StartLot. If BaseMMOnEquity is set to true then the Money Management calculation will be based on the Portion Equity rather than the Portion Balance, which will result in lower lot sizes if there are other charts on the account in drawdown.

Because BlessingPro! 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. BlessingPro! 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.

BlessingPro! will automatically calculate the total number of lots which will be open at the value set in Level, and for safety of the account it will restrict the Starting Lot size to ensure that there will be a maximum of 1 lot open at this point if possible.

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 0.5.

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, Blessing Pro! will ensure that the number of open lots at Level does not exceed the maximum allowed for this portion of the account if possible.

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 trades.

Currency Conversion

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).

Warning.png 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, the approximate ratio for the portion balance for every 0.01 lot, and whether the calculation was based on the Account Equity.

Grid Levels Lot Size Calculation

Lot Levels and Lot Sizes

Blessing Pro! used a grid system for opening further trades, and the lot size of each of these trades can be independently defined by the user, using the LotLevels and LotSizes parameters. The LotLevels parameter is used to define how many levels will use the corresponding multiplier set in LotSizes.

For example, if LotLevels is set to 3,4,5 then after the first basket trade has opened the following 3 trades will use the first LotSizes multiplier, the next 4 trades will use the second LotSizes multiplier, and the final 5 trades will use the third LotSizes multiplier. If the sum of the LotLevels is less than the MaxTrades setting then any further levels will use the final multiplier in the LotSizes parameter. All values entered in LotLevels should be integers (whole numbers) and must be separated by a comma.

The values in LotSizes can be one of two types.

  • If a number is entered on its own, then the lot size for each of the trades set in LotLevels will be the StartLot multiplied by the LotSizes value. All trades at these levels will have the same lot size.
  • If the number is preceded by an x then the lot size for each of the trades set in LotLevels will be the preceding lot size multiplied by the LotSizes value. If the multiplier number is less than 1 then the lot sizes will decrease, and if greater than 1 they will increase. Note that each lot size will increase or decrease by at least the StartLot size, unless you set the multiplier number to 1, which will produce constant lot sizes.

All values entered in LotSizes can be integers or decimals, can be preceded by an x, and must be separated by a comma. So following on from the previous example, if you had LotSizes set up as 2,x3,x0.5 with StartLot of 0.01 you would end up with lot sizes of 0.02 for the first 3 levels (StartLot multiplied by 2), 0.06, 0.18, 0.54, 1.62 for the next four levels (all previous levels multiplied by 3) , and 0.81, 0.40, 0.20, 0.10, 0.05 for the final 5 levels (all previous levels multiplied by 0.5). Any further levels up to MaxTrades will also be half of the previous level, with a minimum of 0.01. If you enter more LotSizes than there are LotLevels then BlessingPro! will allocate each of the additional LotSizes to each of the following levels up to MaxTrades - just as though you had entered ,1 in LotLevels for each additional lot size. If you enter fewer LotSizes than there are LotLevels then the last value in LotSizes will be used to calculate all remaining levels up to MaxTrades.

Lots Optimization

While using a string parameter to input the LotLevels and LotSizes gives the user a lot of flexibility in defining the multiplier for each grid level, it does mean that they can not be used for optimization due to limitations of MT4. However there is a separate set of parameters which can be used during the optimization process which can be found towards the bottom of the list of parameters. The optimization parameters will only be effective if UseLotsOpt is set to true, and they are only effective while optimizing. Each of the levels set in LotLevels can be entered individually into LotLevel1, LotLevel2 etc, to a maximum of LotLevel5. If you do not need to set a particular level then the value must be set to -1. The corresponding values from LotSizes are entered in EITHER LotSize1 OR LotSize1x, LotSize2 OR LotSize2x etc, to a maximum of LotSize5 OR LotSize5x. The parameters with an x suffix work in the same manner as those values in LotSizes with an x prefix, so each of the 5 lot size levels must only have a value in one of the two options (1 OR 1x, 2 OR 2x etc.). Any parameters which are not in use must be set to -1. The EA uses the data in LotLevel1 to LotLevel5 to generate a string in the same format as LotLevels, and does the same to LotSize1(x) to LotSize5(x) to produce a string in the same format as LotSizes, and then uses the same routine as the main code to produce the lot sizes at each level.

Nano Account

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. Blessing Pro! will do this automatically if you set NanoAccount to true. If you do not want BlessingPro! to use the increased lot sizes, then leave NanoAccount as false. 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'.

Warning.png If you set NanoAccount to true when your account is not a Nano account then all lot size calculations will be 10 times their proper values, and you will certainly increase drawdown and increase the risk of an Equity hit.



Back to Overview




Portion Control

You can run Blessing Pro! on any account, and can run it along side any other EA. In order to split your Account Balance between individual EAs and charts, you set the percentage to use with PortionPC.

If a value between 0 and 100 is entered in PortionPC, then Blessing Pro! will use that percentage of the Account Balance to calculate the portion that it is allowed to trade with. As the Account Balance increases, then so will the Portion Balance.

If a value greater than 100 is entered in PortionPC then Blessing Pro! will allocate that amount as the Portion Balance that it is allowed to trade with. Because the PortionPC amount is fixed, the Portion Balance will not increase as the Account Balance increases.

For all future examples in this manual it will be assumed that Blessing Pro! is the only EA running, and PortionPC is set to 100 (its default value).



Back to Equity Protection
Back to Lot Size Calculation
Back to Overview




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, Blessing Pro!'s strategy is to open another trade at a set distance from the first.

SetCountArray and GridSetArray

With the default settings, Blessing Pro! will open the extra levels based on the settings in SetCountArray and GridSetArray.

In order to save you from entering the distance for each level in the grid individually, Blessing Pro! 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 Blessing Pro! 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.

Using the default values for SetCountArray of 4,4 and GridSetArray of 25,50,100, Blessing Pro! will place the trades as follows:

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 levels 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.

Grid Optimization

While using a string parameter to input the SetCountArray and GridSetArray gives the user a lot of flexibility in defining the size of each grid level, it does mean that they can not be used for optimization due to limitations of MT4. However there is a separate set of parameters which can be used during the optimization process which can be found towards the bottom of the list of parameters. The optimization parameters will only be effective if UseGridOpt is set to true, and they are only effective while optimizing. Each of the values set in SetCountArray can be entered individually into SetArray1, SetArray2 etc., to a maximum of SetArray4. If you do not need to set a particular level then set the value to 0. The corresponding values from GridSetArray are entered in GridArray1, GridArray2 etc., to a maximum of GridArray4. Any parameters which are not in use must be set to 0. The EA uses the data in SetArray1 to SetArray4 to generate a string in the same format as SetCountArray, and does the same to GridArray1 to GridArray4 to produce a string in the same format as GridSetArray, and then uses the same routine as the main code to produce the grid sizes at each level.

AutoCal

The default method for setting the grid produces a fixed grid, which is not always ideal, so Blessing Pro! 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.

AutoCaluses the following parameters:

  • ATRTF sets the time frame of the chart for the ATR calculation.
  • ATRPeriods sets the period (number of bars) to use in the ATR calculation.

Click on the individual links to see the valid entries for each parameter.

AutoCal will still uses the blocks of levels set up in SetCountArray, but does not use the grid distances set up in GridSetArray. Instead it will calculate the ATR for the chart based on the ATR TimeFrame and ATR Period selected, and for block 1 this value will replace the normal 25 pips. For blocks 2 to 5 the ATR value will be multiplied by 2, 4, 8 and 12 respectively to give an increasing grid size.

The Take Profit values will also be based on the calculated ATR, with blocks 1 to 5 using a multiplier of 2, 4, 8, 12 and 18 respectively.

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).

Entry Delay

In a fast moving market, it is possible that Blessing Pro! 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 is allowed to open. The time remaining before the next level can open will be shown on the overlay.

SmartGrid

In order to get better control of the entry points for additional levels instead of 'blindly' placing a grid, the SmartGrid function can delay placing trades until market conditions improve.

UseSmartGrid uses the following settings:

  • RSI_TF sets the time frame of the chart for the RSI calculation.
  • RSI_Period sets the period (number of bars) to use in the calculation.
  • RSI_Price sets the applied price constant.
  • RSI_MA_Period sets the period (number of bars) to use in the MA of RSI calculation.
  • RSI_MA_Method sets the moving average method.

SmartGrid uses the RSI on the 15m timeframe (default) to determine the short term tend, and will defer opening a new trade until the MA of the RSI crosses the RSI, although the normal grid calculation will be used to set a minimum grid distance for the next level.

SmartGrid does not use a LIMIT trade because it is not known where this trade will be placed until the entry conditions are met, so it will place an instant market BUY/SELL trade.

Based On Entry

If BasedOnEntry is set to true, then further trades in the basket will only be allowed to open if the same entry conditions are met as required for the first trade. The minimum distance of the trade is still regulated by the normal grid size.

Other Settings

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.



Back to Take Profit
Back to Overview




Manual Trading

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 false.

If ConfirmButtons is set to true then you will be asked to confirm the trade placement.

Warning.png 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.

Closing Trades Manually

Warning.png 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.



Back to Entry Methods
Back to Setting the Grid
Back to Overview




Take Profit

Calculation

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.

Just as with GridSetArray, the value of the TP in TP_SetArray will be adjusted by the value of GAF.

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 even simply by a poor choice of settings in GridSetArray or TP_SetArray. In these cases, Blessing Pro! 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.

Forced Take Profit

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 will set the TP point at a fixed distance from the break even point for every level.

Minimum Take Profit

You can also ensure that the TP point is a minimum distance from break even by entering the minimum value in MinTPPips.

BreakEven and BEPlus

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.

Take Profit Priority

The calculation of TP is made in the following order of increasing priority:

Stealth Option

The user has the choice of whether to send the Take Profit to the broker by using the UseStealthTP setting.

If UseStealthTP is set to false then the TP point as calculated by the EA will be sent to the broker, and they will automatically close all trades when this point is reached.

Warning.png If Stealth TP is not in use then the Trailing Stop will not work if TSLStartAt is either 2 or 3 because this function relies on the price passing the set TP point before the trailing stop comes into effect, but at that point the trades would be closed by the broker.

If UseStealthTP is set to true then the Take Profit point will be kept internally by the EA. While this will stop any price manipulation by any disreputable broker, it does mean that if your internet connection is lost then the trades will be left open with no TP point. This can be fixed by setting DummyTPPips to any value greater than 0. The EA will calculate the normal stealth TP point, and then add/deduct the value set in DummyTPPips and send this new TP point to the broker.

It is also possible to close any trade in the basket by setting a manual TP with your broker. If Blessing Pro! is not set up to send a TP to the broker, any manual trade modifications will not be overridden. Assuming that Blessing Pro! 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.



Back to Overview




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, and will be shown on the overlay as a gold dotted line if you have dLines set to true.

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. The trailing stop line will be shown on the overlay as a gold dashed line if you have dLines set to true.

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 before the BE point is reached.
1 (BE+) to start trailing when the PA is at BE. This method will start trailing when the PA is TSLPips past 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. If this is not the case, then you can force the TSL point to be on the correct side of BE by setting TSLProtectBEPips to a value greater than 0. Do not set the value too high because if it is greater than the actual TP then this function will be ignored. A value of 1 or 2 pips will usually do a good job, and a setting of 0 will close at or just below BE, which may result in a small loss. Use a setting of -1 to turn this feature off.
3 (TP+) to start trailing when the trailing stop is at the TP point. This method will start trailing when the PA is TSLPips past the TP point.
4 to 100 which will be treated as a percentage, and the trailing stop will start when the price reaches the set percentage of the projected profit. This method may cause the basket to close at a loss if the set TSLPips value is greater than the calculated percentage of the projected profit.

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 except that 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). The reduction of the trailing stop uses a cosine function, which means that it will start reducing slowly at first, then speeds up as the price moves, and will slow down again it reaches TSLPipsMin. The distance over which the trailing stop reduces from TSLPips to TSLPipsMin is set using TSLMaxMinDist.

Warning.png 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.

Maximize Profit

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, Blessing Pro! will move the TP point for the number of times specified in TotalMoves.

Once the price has reached the ProfitSet target Blessing Pro! will set a stop loss for the basket. 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. If the value of TSLPips is not 0 then the normal Trailing Stop will start at this point, with the trailing stop being TSLPips before the ProfitSet point.

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 gold dash-dot-dot line which is the point where ProfitSet has been set. Once ProfitSet has been reached, the gold dash-dot-dot line will move to where the new ProfitSet is, and the normal basket stop loss / trailing stop lines will be shown.

Stealth Options

The user has the choice of whether to send the Stop Loss / Trailing Stop to the broker by using the UseStealthSL setting.

If UseStealthSL is set to false then any Stop Loss / Trailing Stop point as calculated by the EA will be sent to the broker, and they will automatically close all trades if this point is reached.

If UseStealthSL is set to true then any Stop Loss / Trailing Stop point will be kept internally by the EA. While this will stop any price manipulation by any disreputable broker, it does mean that if your internet connection is lost then the trades will be left open with no SL point. This can be fixed by setting DummySLPips to any value greater than 0. The EA will calculate the normal stealth Stop Loss / Trailing Stop point, and then add/deduct the value set in DummySLPips and send this new Stop Loss to the broker.

It is also possible to close any trade in the basket by setting a manual SL with your broker. If Blessing Pro! is not set up to send a SL to the broker, any manual trade modifications will not be overridden. Assuming that Blessing Pro! does not close the trade automatically using one of the usual SL methods, your broker will close the trade at the SL you have set.

Note: The UseStealthSL does not affect the UsePowerOutSL settings, which are always sent to the broker.

Close Oldest

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, Blessing Pro! 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.

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.

If RecoupClosedLoss is set to true, Blessing Pro! 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.

Early Exit

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 false.

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 Blessing Pro!, and it might be difficult to find every trade relating to this chart and close them out. Note that Blessing Pro! will close ALL open trades on this chart, including Hedge 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 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, Blessing Pro! 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 Blessing Pro! opens more trades and you decide to change the parameters for another reason but do not change EmergencyCloseAll back to false, Blessing Pro! will once again close all trades.

Blessing Pro! 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 Blessing Pro! to stop trading after ECA, you should set ShutDown to true at the same time as setting EmergencyCloseAll to true.



Back to Take Profit
Back to Overview




Hedge Trades

The hedge system is used when UseHedge is set to true, and is a way of reducing DrawDown when Blessing Pro! 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 Blessing Pro! 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 or at a set Level of trades in the basket. This is set by changing HedgeType to a D, or an L.

If you choose to start at a set DD%, set HedgeStart to the percentage at which to start, the default is 20 (20%).

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.

The size of the hedge trades are based on the number of open lots in the basket times hLotMult.

Hedge trades will be closed under the following circumstances:

Any losses made by the hedge trades are automatically added to the basket, so Blessing Pro! will try to recoup them, as long as the setting RecoupClosedLoss is set to true.


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!



Back to Overview




Equity Protection

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 Blessing Pro! 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.

Blessing Pro! 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.

Account Protection

If you were unfortunate enough to have an EP hit, then Blessing Pro! would just carry on trading without some means of stopping the chart from trading. This is provided by the Stop Trade Percent feature of Blessing Pro!. This is designed to stop Blessing Pro! 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 other profit centres of Blessing Pro!, eg the Hedge trades.

If you want to restart trading after it has been stopped, you will need to 'reset' Blessing Pro!. This can be done by going into the EA Inputs (F7) and clicking OK, or removing Blessing Pro! from the chart and reloading it. Both of these methods will force Blessing Pro! 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.

Note that the StopTradePercent is based on the portion BALANCE allocated to this chart, and MaximumDDpc is based on the portion EQUITY.

Power Out Stop Loss (POSL)

If Stealth mode is not in use, Blessing Pro! does not send Take Profits or Stop Losses to your broker. In the unfortunate event of you losing your internet connection, Blessing Pro! 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 Blessing Pro! 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 Blessing Pro!.

Once POSL has been set by Blessing Pro!, it can not be removed manually because Blessing Pro! 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 false.

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 Blessing Pro!. Assuming that the trade has not been closed normally by Blessing Pro!, your broker will close the trade at the SL you have set.



Back to Overview




Restricting Trading

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.

Star full 256.png
It is recommended that you leave AllowTrades at false when you load Blessing Pro! on to a chart, then when the overlay has settled down after a few ticks, and the 'Waiting for next tick ...' message has been cleared, you should click the 'Allow Trades is set to false' button, which will then allow trading without having to change the EA's Input Parameters again.

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.

Warning.png AllowTrades is set to false by default - you must change it to true to allow the EA to trade.

Once the EA has started running there are several other settings which can be used to restrict trading:

Time Filter

You can specify at what times Blessing Pro! should trade by using the time filter. 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:45).

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 brokers' 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 true.
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.
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 false.
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 false.

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 previously.

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.

Shut Down

ShutDown is a way of telling Blessing Pro! that we don't want to continue trading after the current basket is closed. Once the basket closes, Blessing Pro! 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 true.

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

Setting UseHolidayShutdown to true will stop Blessing Pro! from trading during the dates specified in HolidayDates.

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 Blessing Pro! 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.

You can also automatically set BlessingPro! to shut down over the Easter period. This is also controlled through the HolidayDates parameter, but the information is entered in the format 'E-2+3', where the E tells the EA that it is an Easter break, the -2 will shut down for the 2 days before the Easter weekend, and +3 will stop trading for 3 days after the Easter weekend. The date of the Easter weekend is automatically calculated, and both the - and + portions must be present. If you do not want to restrict trading during one of the periods then enter -0 or +0, but note that the EA will not trade on either Good Friday or Easter Monday.

If a basket is open when the holiday shutdown starts, Blessing Pro! 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.

Limiting Open Charts

BlessingPro! will allow you to restrict the number of charts with open trades. This means that you could set up 10 charts all running BlessingPro!, but only allow 3 of them to have open trades at once. The other 7 will wait patiently until one of the three closes their basket, and will then open a new basket if entry conditions allow. You can also restrict a chart from opening a new basket if the Drawdown on another chart is over a set limit. Both of these restrictions can be applied to only BlessingPro! charts, or to charts from any of JTA's EAs.

Because the control of the number of open charts and drawdown needs to be controlled from a central location, this function is run from the JTA Dashboard, which is where you will find all the relevant parameters.



Back to Other Exit Strategies
Back to Overview




Trade Tracking

Blessing Pro! 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 Blessing Pro! 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 Blessing Pro! would result in the same magic number, it is possible. It is therefore recommended that once Blessing Pro! 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 Blessing Pro! 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 be used as the magic number.

Bear in mind that if you change the Time Frame of a chart on which Blessing Pro! 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 Blessing Pro! 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.

A Magic Numbers is also used to manage trades opened by the hedge function, which is generated from the chart magic number. You can find which magic numbers are used by setting Debug to true, and checking the Terminal Experts window.

If you run BlessingPro! on several charts, you can keep track of which instance of Blessing Pro! 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.

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.



Back to Manual Trades
Back to Overview




Feedback Information

Display Overlay

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 false.
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 and the Error Messages Page for the reason why.

If the EA is running with a small portion balance the colour of the Starting Lot will warn you. A portion less than $1,000 per 0.01 lot will display in Red, then up to $2,500 will display in Orange. For safety you should always use at least $2,500 per 0.01 lots.

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 Yellow when BEPlusLevel has been reached, Orange when BreakEvenTrade is reached and Red at MaxTrades.

The Drawdown percentage normally displays in DeepSkyBlue, but it will change to Green at 10%, Yellow at 20%, Orange at 30%, and Red at 40%.

The line showing how many lots will open for 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 Cornflower Blue for a BUY, Firebrick 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.

Debug

Blessing Pro! 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, MT4 and EA settings to the display overlay.

Display Lines

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.
Orange 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.
Orange 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 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

Display Buttons

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 1 minute 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.

All remaining buttons affect how the EA trades, and you can choose whether these 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. These buttons are:

  • 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.

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 true or false the buttons will always act as though it was set to false.

You can change the font size of the button text with the dButtonFontSize variable.

Warning.png In order for the buttons to work, you must have Allow DLL Imports set to true (ticked) in your MT4 application.

Note that 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.

Statistics

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.

The data from the Statistics function will be stored in a .csv file in the Experts/Files folder if forward testing, or the Tester/Files folder if back testing. The file name will be taken from the UserComment parameter.

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.

Email

Setting UseEmail to true will allow Blessing Pro! 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, Blessing Pro! 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.

Sounds

Setting PlaySounds to true will allow Blessing Pro! to play an alarm when certain conditions occur. The sound which plays can be changed with AlarmSound.

Sounds will play under the following conditions:

  • When Opening a trade
  • When Closing a trade
  • When Blessing Pro! starts after a holiday shutdown
  • When Blessing Pro! 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



Back to Overview




JTA Dashboard

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.



Back to Overview




See also

Setfile Parameters

 
 
Disclaimer Copyright © 1995-2016 J Talon LLC, All rights reserved