(Version 2.0) <-- to be valid for up to BlueSwift GridRescue's version 5.62
Part 1: (here)
Part 2: https://www.mql5.com/en/blogs/post/753431
Part 3: https://www.mql5.com/en/blogs/post/753437
--a product by BluesAlgo Ltd 2023
MT5 -> https://www.mql5.com/en/market/product/96012
This is user manual for using BlueSwift's Grid Rescue Expert ('BlueSwift')
Glossary for terms used in this manual:
- TopOrder / BottomOrder: TopOrder means that latest order opened in the grid i.e. last order, BottomOrder means the first order in the grid series, i.e. the first order. When grid’s order(s) are closed, the ‘TopOrder’ and ‘BottomOrder’ aliases will be ‘passed’ to the current running orders. That’s why I avoid using ‘First’ or ‘Last’ order terms because this imply the very first order being opened by the grid series, which may be already closed
- Grid Cluster (or Grid Pair): the combination of two or three orders in the grid of which their profit is tracked and they would be closed together once the specific condition is met.
- Grid Size: the count of orders in a grid. For example 2 means there are currently 2 active orders in the grid
- 2-Node: grid order cluster with 2 orders TopOrder and BottomOrder
- 3-Node: grid order cluster with 3 orders TopOrder, BottomOrder and one MiddleOrder. The MiddleOrder will be determined as follows:
Grid’s size | Formula | Example |
Less than 7 orders | two orders below the TopOrder | For a grid with 6 orders, this would be the 4th orders (6-2 = 4) |
More than 7 but Less than 10 orders | three orders below the TopOrder | For a grid with 10 orders, this would be the 7th orders (10-3 = 7) |
10 orders or more | Four orders below the TopOrder |
|
- Profit-to-close: the sum $ of profit (-loss) amount for all orders in a grid cluster at which BlueSwift GridRescue will close them. This is the total of profit, swap, and commission $ for each order.
- Rescue Iteration: the iteration 1st, 2nd, 3rd of each order close instance. BlueSwift keep track of how many iteration each Rescue Mode has been executed and also the total rescue iteration for the whole grid (regardless of rescue mode)
- Rescue Mode: the mode that BlueSwift used to close grid cluster. These are bots working in parallel on every tick with different order close’s logic. At the time of this writing (v1.0), there are five modes in BlueSwift with their nickname in brackets:
- Basic Mode (‘SubGrid Close’)
- Panic Mode (‘Panic Close’)
- TimeCritical Mode (‘Crit Close’) (ß this mode utilise the NewsFilter sub-module)
- HardClose Mode (‘Hard Close’)
- OutOfTime Mode (‘OutOfTime Close’)
Input Parameters instruction
-
BASIC RESCUE MODE
# | Inputs | Description | Values & examples |
1 | Comment Rescue Strategy Note here | Free-text string field for user comment – to be used when you use more than one GridRescue chart on a terminal, useful for memory note what rescue setting being used | You can put in something that can tell you what this rescue set about, for example ‘Gold – aggressive rescue’ OR, ‘Fx – HardClose only’. There is not effect on rescue function from this parameter |
2 | Turn ON/OFF Rescue? | Main toggle on/off for Rescue operation | True/False If True, it will enable SubGrid Close mode and other rescue modes.If False, this will disable all the Rescue mode, even if you enable the individual rescue mode= True below. |
3,4,5 | #3 Scale RescueSettings for each 0.01Lot? #4 [for scaling]Tracked GridEA’s starting lot #5 [for scaling]User-input scaling factor | This group of settings allows user to universally scale the rescue parameters up /down for all rescue modes.
| Use-case: when user has grid starting at different lot size e.g. 0.03 instead of 0.01, user would need to manually update rescue settings (such as order size, drawdown trigger, profit-to-close level, etc.) for each rescue mode - which can be time-consuming and also may lead to sub-optimal settings (e.g. deviated from user's preferred rescue strategy). Using the Scaling option in the parameters window, user can quickly scale all the rescue metric by a factor - thus more flexible if user have different starting grid lots for each of their grid EAs
Options: - “No Scaling”: use the rescue setting below as it is - “By Grid Start Lot”: the rescue setting will be scaled by Factor computed base on the tracked grid EA start lot as follow:
For example if you put grid start lot = 0.05 then scaling factor should be 0.05 / 0.01 = 5. All the relevant settings like order’s size, profit-to-close in all the rescue mode will be scaled up by this factor
- “From user-input”: simply scale up all rescue settings by the scaling factor input by user at field #5 |
6 | Tracking EA's Symbol(s)-separated by comma (,) | List of Symbol which BlueSwift would operate on. Order's Symbol that not in this list will be ignore by BlueSwift For more information about BlueSwift tracking mechanism, refer below | String list of broker's symbols, separated by comma(,): - "EURUSD,GBPUSD,USDJPY" If your broker use suffix for their symbols, you can either use the "Broker's symbol suffix" input parameter below or just insert it directly here as follows: - "EURUSD.pro,GBPUSD.pro,USDJPY.pro" if this field left blank, then BlueSwift will only operate on the current chart's symbol only (i.e. the chart's symbol where you drop BlueSwift on) |
7 | Broker's symbol suffix | Broker's designated suffix for their tradable symbols | Aside from field #6, you can also add your broker's suffix for trading symbol here. For example: if your broker's instruments are EURUSD.ecn then put ".ecn"if your broker's instruments are EURUSD.. then put ".."This can be blank if you already include the symbol suffix in the field #6 above |
8 | Tracking EA's Magic number(s) to rescue - separated by comma (,) | List of Magic numbers which BlueSwift would opearate on. Order's Symbol that not in this list will be ignore by BlueSwift | Example: 123,9999,5678 |
9 | Tracking both Stem and branch magic? | This option allow user to either: - track both the Stem magic basket as well as branching magic basket. i.e. “Start-with match” - Ignore stem magic, only track those magic as exactly provided by user’s input. i.e. “Exact-match” | True/False
For an example - there is 6 running orders with the following magic: Order #1: 1235300 Order #2: 123551 Order #3: 123551 Order #4: 123551 Order #5: 1232220 Order #6: 123220
Assuming user set the Tracking EA Magic Number (field #8) above to be “123,123551”
If True, then there will be 2 baskets of grid being tracked: Basket 1: Order#1 - #6 (common Stem “123”) Basket 2: Order#2 - #4 (common Stem “123” and Branch “123551”) If False, then only Basket 2 will be tracked because the magic “123” does not match any order’s magic --------------------------------------------------------------------------------------------- Ans: Either check the on-chart’s dashboard or checking the “Expert” tab’s log message in the terminal, it will have a message which grid basket has been instantiated On-chart Dashboard |
10 | Tracking EA Trade comment to rescue | The comment of the tracked EA - This would be helpful in case you want to track separate sub-grid within the same expert’s magic with a common comment. | Some grid experts on market use order’s comment to manage their order, because the orders maybe same symbol and magic number but with different comment. For example: ”grid_ea-M15” versus “grid_ea-H1” ------------------------------------------------------ ***Author Note: from v.5.55, GridRescue internal code logic has been revised to now mainly work with order’s magic number, so this parameter has no longer been useful for rescuing functionality. I will look to gradually decommission this option in future release |
11 | Do not check Tracking EA'S comment- ifTrue, track <Symbol\Magic\Type> | If True, then ignore grid order’s comment. BlueSwift would only detect and track order with same Symbol, Direction and Magic Number | True/False If this is True, then GridRescue will ignore order's comment (e.g. value in #10) (*** as per author note above, please set this to True by default as now grid tracking is mainly done via magic number) |
12 | Order count To Start Rescue | Number of opened orders in the grid that would trigger Basic Rescue bot operation | For example, if user set this value to 4, which means that BlueSwift's would only start to attemp basic rescue function when there are 4 or more opened orders in the tracked grid |
13 🚩 | GridCluster's Profit to close ($) | the $ amount of profit at which would BlueSwift will close sub-grid cluster | For example if this is set to $1, then when the sub-grid cluster’s profit is $1 or more, then all order in the sub-grid cluster will be closed. This value can be negative |
14 | Show Tracking Panel? | Toggle On/Off grid tracking panel on the current expert’s chart | True/False. If True: display the BlueSwift dashboard panel on chart which would show active grid series placed by other Experts (if any) currently active in the account |
15 | Panel’s text size | Change the font size of the panel’s text | |
16 | Panel’s text color | Change the font color of the panel’s text | |
17 | Panel’s X-axis(vs. chart’s right corner) | Change the Dashboard panel’s X coordinate against the right chart’ edge (Please see illustration à) | |
18 | Panel’s Y-axis(vs. chart’s right corner) | Change the Dashboard panel’s Y coordinate against the top chart’ edge (Please see illustration à) | |
19 | Display Basket Profit Close on chart? | Turn On/Off the basket profit when basket is closed | True/False. If True: display the basket close proft tag on |
20 | Buy Basket Profit Color | Change the color of the BUY Basket profit close tag | |
21 | Sell Basket Profit Color | Change the color of the SELL Basket profit close tag |
2 ADVANCED RESCUE OPTIONS
2.1 BASIC CLOSE RESCUE MODE – ADVANCE OPTION (dynamic Profit-to-close($) and Cluster Scheme for each iteration)
Description
This mode here is an extension of the Basic Close mode – which allow user to dynamically set the Profit-to-close($) and the Cluster Mode (2-Node, or 3-Node) for each of the iterations, instead of only one fixed value of Profit-to-close ($) and Cluster Scheme
# | Inputs | Description | Values & examples |
---|---|---|---|
2.1.1 | Rescue Scheme | The scheme for the current iteration (i.e. 2-Node or 3-Node) | Options: - _default_, - _3node_only_, - _2node_for_less_than_7_orders_, - _2node_for_less_than_10_orders_, - _iteration_based_, _default_: if grid’s size less than or equal to 4 orders then the default scheme is 2-Node, 5-10 is 3-Node _3node_only_, always try to use 3-Node scheme, i.e. always form a cluster of three grid order and close them together at the Profit-To-Close _2node_for_less_than_7_orders_: if grid’s size is less than 7 order than use 2-Node, and when 7 orders for more than use 3-Node _2node_for_less_than_10_orders_: if grid’s size is less than 7 order than use 2-Node, and when 10 orders for more than use 3-Node _iteration_based_, this option let user define specific Profit-to-close and the cluster scheme for each iteration with the syntax {scheme}:{profit-to-close} using #2.1.2, separated by comma. For example: if user put in “2:-1.25, 3:-2.50, 2:2.0, 3:-0.1” which would means that - 1st iteration: close 2 orders when their Profit-to-close = -$1.25 - 2nd iteration: close 3 orders when their Profit-to-close = -$2.5 - 3rd iteration: close 2 orders when their Profit-to-close = $2.0 - 4th iteration: close 3 orders when their Profit-to-close = -$0.1 So that user has complete freedom to instruct at which level of Profit-To-Close this mode should close and between 2-Node or 3-Node scheme. A best practice is to try a low, negative Profit-to-close at the early iteration and then gradually increase this amount for subsequent iteration so to avoid likelihood of deep drawdown and easier to close part of the grid at the early stage. For the _iteration_based_ option, the last iteration setting in the input will continue to be used until the whole grid is closed, so in the example above, the SubGrid Close bot will continue to close 3 orders at -$0.1 for the 5th, 6th, 7th … iteration etc. ---------------------------------------- *author note: most of the time, I use only _default_, _3node_only_ and _iteration_based_ due to personal preference, as I am not prefer to let my grid get to more than 5 running orders |
2.1.2 🚩 | Iteration Mode and ProfitToClose (If select RescueScheme = _Iteration_based_) | The list of RescueScheme and Profit-To-Close for each iteration, separate by comma | {scheme}:{profit-to-close} Example: 2:1.25, 3:2.5, 2:2.0, 3:2.0, 3:1, 3:1, 3:0.5, 3:0.5 (white-space between the comma will be automatically trimmed, so not to worry) |
2.2 PANIC CLOSE RESCUE MODE
Description
‘Panic Close’ rescue mode is a feature which specialised for ‘panic’ circumstances, with the following ‘triggers’:
- grid’s drawdown ($) have reached an alarming level
- grid size (count of order) have become many
- grid’s maximum lotsize has become too big
When one or more of these trigger are met, the grid would be considered in ‘Panic’ mode à the Panic Mode bot will attempt to close TopOrder and BottomOrder.
From my reseach and experience, the factors selected above has been the primary factor contribute to the growth of drawdown and account’s margin call and hence will need to be controlled in order for the grid’s drawdown to be ‘sustainable’. Depending on the tracked grid EA logic, users can define the metric of these triggers to determine if the grid’s exposure have ‘entered’ Panic mode
Continue to Part 2: https://www.mql5.com/en/blogs/post/753431