USER GUIDE FOR OUR EA
Welcome to probably the most powerful trade utility
for the MetaTrader platform
Intuitive for beginners - yet with all the features an
advance trader could wish for
© 2019 Runwise Limited (UK). All rights reserved.
runwiseFX are trademarks of Runwise Limited (UK)
MetaTrader™ is a trademark of MetaQuotes, Inc.
All other trademarks are the property of their respective owners.
THIS DOCUMENT IS PROVIDED ‘AS IS’ WITHOUT ANY WARRANTY OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO,
IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, OR NON-INFRINGEMENT.
THIS DOCUMENT MAY CONTAIN TYPOGRAPHIC ERRORS AND/OR TECHNICAL
INACCURACIES. UPDATES MAY BE MADE TO THIS DOCUMENT AND/OR
ASSOCIATED SOFTWARE AT ANY TIME.
TABLE OF CONTENTS
1 INTRODUCTION................................................................................................ 1
1.1 Document Conventions ............................................................................ 3
1.2 Concepts and Conventions ...................................................................... 4
1.2.1 Use of Period for Decimal Point ........................................................... 4
1.2.2 Pips vs Points ...................................................................................... 4
1.2.3 Alternative to Pips - % of Average Daily Range .................................... 4
1.2.4 Risk Reward Ratio ............................................................................... 4
1.2.5 Synonyms and Acronyms..................................................................... 4
1.2.6 Colors .................................................................................................. 5
2 SYSTEM SPECIFIC NOTES .............................................................................. 6
2.1 MetaTrader 5.............................................................................................. 6
2.2 Windows 7 ................................................................................................. 6
3 UNDERSTANDING THE PANEL ....................................................................... 7
3.1 TOOLBAR BUTTONS ................................................................................ 7
3.1.1 Lines .................................................................................................... 7
3.1.2 + - and Minimize................................................................................... 8
3.2 NEWS EVENTS .......................................................................................... 8
3.3 STAUS TEXT .............................................................................................. 9
3.4 MULTI-TIMEFRAME TREND ARROWS..................................................... 9
3.5 CONFIG BUTTON ...................................................................................... 9
3.6 SMILEY FACE ☺ - okay to trade ............................................................... 9
3.7 MANUAL TRADE BUTTONS ................................................................... 10
3.7.1 Trade Open (MARKET/PEND SELL/BUY – shown when trade not open
and pending order not set) ............................................................................... 10
3.7.2 Scale-In (only shown when trade open) ............................................. 10
3.7.3 Trade Close including Partial Close (only shown when trade open) ... 11
3.7.4 The + Button (only shown when trade opened or pending order is set)
11
3.8 MONEY MANAGEMENT (Risk:/Lot:) ...................................................... 11
3.9 AUTO ENTRY MODE SELECTION (Entry:) ............................................ 12
3.10 AUTO EXIT MODE SELECTION (Exit:) ................................................... 13
3.11 SL Mode (SL: ) ......................................................................................... 15
3.12 Trail Tick Box .......................................................................................... 16
3.13 HIDDEN TAKE PROFIT (TP BUTTON) .................................................... 16
3.13.1 MASTER Tick Box ............................................................................. 16
3.13.2 Target n: ............................................................................................ 16
3.13.3 Exit %................................................................................................. 17
3.13.4 Stop Loss Adjustment (SL:) ................................................................ 17
3.13.5 Trail (tick box) .................................................................................... 17
3.13.6 Break Even (BkEven tick box) ............................................................ 17
3.13.7 Reset Button ...................................................................................... 17
3.14 HIDDEN PENDING ORDERS (Pending:)................................................. 18
3.14.1 Automatic Scale-In on Price Reached ................................................ 19
3.15 BREAK EVEN (BkEven tick box) ............................................................ 19
3.16 TRADE RULE CONTROLS (bottom of panel) ........................................ 19
4 LINES SHOWN ON CHART ............................................................................ 21
4.1 Yellow Hidden Stop Loss Line (slBuy/slSell) ........................................ 21
4.2 Cyan Hidden Take Profit Lines (tpBuyn/tpSelln) .................................. 22
4.3 Hidden Pending Order Lines (pendBuy/pendSell) ................................ 22
4.4 Red/Green Support & Resistance Lines (S1-3,R1-3)............................. 22
4.5 Brown/Cream Pivot Lines (* Pivot)......................................................... 22
5 CONFIGURING THE EA .................................................................................. 23
5.1 Main Config Pop-up ................................................................................ 23
5.1.1 Downloading Configuration/Trading Rules from Our Library ............... 23
5.1.2 CONFIGURATION FILE - Re-Read Button ........................................ 24
5.1.3 CONFIGURATION FILE - Revert to Previous .................................... 24
5.1.4 CONFIGURATION FILE – Copy to Tester ......................................... 24
5.2 CHANGES APPLY TO ............................................................................. 25
5.3 General Settings...................................................................................... 26
5.3.1 Trade Comment ................................................................................. 26
5.3.2 Multi Account ..................................................................................... 26
5.3.3 Magic Num[ber] .................................................................................. 26
5.3.4 Max Simultaneous Trades.................................................................. 26
5.3.5 DEFAULT AUTO MODE .................................................................... 27
5.3.6 THRESHOLDS .................................................................................. 27
5.3.7 ALERTS ............................................................................................. 27
5.3.8 TRADING HOURS ............................................................................. 27
5.3.9 Revert/Save/Cancel Buttons .............................................................. 28
5.4 Configure Risk / Lots .............................................................................. 28
5.5 Configure Default Stop Loss .................................................................. 29
5.5.1 Automatic SL...................................................................................... 29
5.5.2 Fixed Pips .......................................................................................... 30
5.5.3 Fixed Amount ..................................................................................... 30
5.5.4 Percent .............................................................................................. 30
5.5.5 Rule ................................................................................................... 31
5.5.6 Off ...................................................................................................... 31
5.5.7 Min/Max/Offset ................................................................................... 31
5.5.8 Trail Stop Loss on By Default ............................................................. 31
5.5.9 Trail Step ........................................................................................... 31
5.5.10 When Trailing Use Latest Auto/Rule Value......................................... 31
5.5.11 Broker SL Offset from Hidden ............................................................ 32
5.5.12 Auto Optimize Stop Loss .................................................................... 32
5.6 Configure Default Take Profit ................................................................. 32
5.6.1 Set TP from Indicator If It’s Configured for That ................................. 33
5.6.2 Break Even Profit Pips ....................................................................... 33
5.6.3 Broker TP Offset from Hidden ............................................................ 34
5.6.4 Auto Optimize Take Profit / Exit.......................................................... 34
5.7 Display Settings ...................................................................................... 34
5.7.1 Number of Text Lines to Show on Panel ............................................ 34
5.7.2 News Vertical Time Lines for Impacts ................................................ 34
5.7.3 Other .................................................................................................. 35
5.7.4 Panel Items ........................................................................................ 35
5.7.5 Trend Arrow Indicators ....................................................................... 35
5.7.6 Horizontal Indicator Lines to Show ..................................................... 35
5.7.7 When Panel Minimized Hide .............................................................. 35
5.8 Options .................................................................................................... 36
5.9 Pending Orders ....................................................................................... 38
5.10 Indicator Values to Capture .................................................................... 40
5.10.1 Reference ID ...................................................................................... 40
5.10.2 New Button ........................................................................................ 40
5.10.3 Delete Button ..................................................................................... 40
5.10.4 Delete All Button ................................................................................ 41
5.10.5 Enabled Tick Box ............................................................................... 41
5.10.6 Indicator Name................................................................................... 41
5.10.7 Indicator Inputs/Properties ................................................................. 41
5.10.8 Capture Mode .................................................................................... 41
5.10.9 Period ................................................................................................ 41
5.10.10 Shift.................................................................................................... 41
5.10.11 Color Index......................................................................................... 42
5.10.12 Null Value .......................................................................................... 42
5.10.13 Weighting ........................................................................................... 43
5.10.14 Priority................................................................................................ 43
5.10.15 Mid Point ............................................................................................ 43
5.10.16 Min Bars............................................................................................. 44
5.10.17 Max Bars ............................................................................................ 44
5.10.18 Hold Bars ........................................................................................... 44
5.10.19 Stop Loss and Take Profit from Indicator ........................................... 44
5.10.20 Use Indicator For................................................................................ 45
5.10.21 Optimization Settings ......................................................................... 45
5.11 Trading Logic Rules ................................................................................ 46
5.12 Rule GUI Controls ................................................................................... 47
Tools 48
5.13 Advanced ................................................................................................. 50
5.14 Statistics / Optimization .......................................................................... 52
5.14.1 Advance Optimization Settings........................................................... 53
5.15 RunwiseFX Mobile App........................................................................... 56
6 SHIFT SETTING HELPER TOOL .................................................................... 57
7 MULTI-TRADE MODE ..................................................................................... 59
8 BUILT-IN INDICATORS ................................................................................... 60
9 IMPORTANT CONSIDERATIONS ................................................................... 61
10 STRATEGY AUTOMATION............................................................................. 62
11 STRAEGY BUILDER ....................................................................................... 63
11.1 Activating Strategy Builder Mode .......................................................... 63
11.2 Understanding Statistics Shown............................................................ 63
11.3 Refresh & Revert Button ......................................................................... 64
11.4 Show Other Chart Results ...................................................................... 64
11.5 EA Inputs for Strategy Builder ............................................................... 65
12 USING WITH MT STRATEGY TESTER .......................................................... 69
12.1 Optimizing Indicator Inputs .................................................................... 69
13 MULTI-ACCOUNTS ......................................................................................... 70
14 EA INPUT PROPERTIES................................................................................. 71
15 USING OUR EA TO CONTROL ANOTHER EA’s TRADES .......................... 100
16 CONFIGURING FOR BINARY OPTIONS BROKER ...................................... 101
17 ADDITIONAL CAPABILITIES ....................................................................... 102
17.1 Indicators Crossing Other Indicators .................................................. 102
17.2 Having Separate Entry & Exit Indicators/Criteria ................................ 106
18 WINDOWS & MOBILE APP .......................................................................... 108
19 FAQ ............................................................................................................... 109
20 CONTACTS ................................................................................................... 114
1 INTRODUCTION
This document covers our trade utility EA for MetaTrader. We go through the panel
from top to bottom, we explain the lines on the chart and then go through the
configuration pop-ups shown via the CONFIG button on the panel.
We have released a few variations of our EA with different features, which are priced
accordingly. These are as follows:
Product Variation Trade Mobile Indicator Statistics &
Panel App & Capture & Auto
Signals Automation Optimization
Ultimate Trade Manager + Mobile ✓ ✓
Ultimate Trade Manager + Mobile ✓ ✓ ✓ ✓
plus purchased Indicator Combine
Strategy Builder + Optimizer ✓ $99 per ✓ ✓
year
Strategy Automator (MT4/MT5) ✓ $99 per ✓
year
Panel + Configurable Automation
(MT5)
We also have our free Trade Panel Pro, which is trade panel only with limitations of
number of take profit targets, can’t access our library (except Close All Trades on
Account button), no master/slave mode, can’t control trades from other EAs.
Please ensure you use our EA on demo account first until you have familiarised
yourself with its operation, in a variety of trading setups.
Installation
Please see the instructions when you download the product with regards to
installation. The manual assumes to product is installed and can be added to your
charts.
Other Documents
Windows & Mobile App: https://runwisefx.com/runwiseFX_App.pdf
Our app allows the EAs in MetaTrader to be controlled centrally from our Desktop
app or remotely on our mobile app for iOS and Android. You can download the apps
from here: https://www.runwisefx.com/app
Other Links
Issue 3.3 Page 1 Runwise Limited (UK)
www.runwisefx.com
Main Website: https://runwisefx.com
Prefer to watch a video rather than reading the manual?
Part 1 (manual trading): https://www.youtube.com/watch?v=vq5kuXhAawk
Part 2 (automated trading): https://www.youtube.com/watch?v=hsr2a1EKsKU
Issue 3.3 Page 2 Runwise Limited (UK)
www.runwisefx.com
1.1 Document Conventions
The following icons are used to throughout the document:
Take note – try to remember
Very import to take note of and remember - could cause undesirable
results if ignored
Top tip – shortcut or other useful information that can make the system
easier to use
Advanced feature/subject – can skip over when you are first learning
how to use the system
Technical ‘behind the scenes’ detail that you don’t strictly need to know
but maybe interested in
Issue 3.3 Page 3 Runwise Limited (UK)
www.runwisefx.com
1.2 Concepts and Conventions
1.2.1 Use of Period for Decimal Point
Floating point numbers should be specified with period (full stop) rather than a
comma. For example, one and half should be specified as 1.5 rather than 1,5.
1.2.2 Pips vs Points
Our system uses the classic definition of pips, where 1 pip is a 0.0001 change in
EURUSD, for example. This means a 20 pip stop loss is same whether you are using
a ‘4 digit’ broker or a ‘5 digit’ one. This in contrast to MetaTrader itself that uses
points, where the size of a point varies depending on your broker.
It’s possible to change the definition of a pip via CONFIG button on
panel and the Advanced pop-up. See section 5.14 - Point to Pip
Divider.
For symbols that have no digits after the decimial point for their ask/bid
prices then 1 pip will be 1 unit change in the price if EA input
Gen_pointToPipDivider1for0digits is set to true (default).
1.2.3 Alternative to Pips - % of Average Daily Range
Our system optionally supports specifying pips as a percentage of the average daily
range (ADR). Simply add ‘%’ to the pip value when configuring the system. This
allows your configuration to automatically adjust to the characteristics of asset being
traded.
For example, at the time for writing the ADR of GBPNZD is 117 pips, yet EURUSD is
only 66 pips. This means if you simply specified a stop loss of 30 pips it would be
quite a large stop loss on EURUSD but less so in GBPNZD. However, if you
specified the stop loss as 30% then would give 35 pips stop loss on GBPNZD and 20
pips on EURUSD, i.e. the stop loss would be automatically scaled to the range that
the symbol typically moves and thus your strategy would perform more consistently.
1.2.4 Risk Reward Ratio
By default, a 1:1 risk reward ratio will set the take profit to recover the stop loss +
spread, i.e. risk is SL + current spread. This means the 1:1 TP shown in pips will be
higher than SL pips to achieve this. Remember, you have to pay the spread on the
wining trade as well, so TP needs spread adding to risk pips for true 1:1 risk reward
ratio. This can be turned off by setting EA input Main_tpAddSpread to false.
Additional pips can be added to TP via EA input Main_tpExtraPipsToAdd.
1.2.5 Synonyms and Acronyms
There are quite a few terms that mean the same thing and also some common
acronyms. Here is a list:
Issue 3.3 Page 4 Runwise Limited (UK)
www.runwisefx.com
Asset = Symbol = Currency Pair
Buy = Long = Bull = Up = Call
Sell = Short = Bear = Down = Put
Candles = Bars = Shift
Note, with shift = 0 refers to live candle and shift 1 is candle just closed and shift 2 is
candle before that, etc.
Color Index = Buffer Index (concerns how indicators output information)
Entry = Open
Exit = Close
Magic Number = Expert ID
Lots = Position Size
Properties = Inputs = Parameters = Attributes
Time frame = Period
ADR = Average Daily Range
EA = Expert Advisor
EV = Empty Value (value indicator returns when it doesn’t wish to show a color)
SL = Stop Loss
TP = Take Profit
1.2.6 Colors
Our system defaults to showing items relating to Sell as red and Buy as green (lime).
Orange is a warning color and yellow is used for trade in loss, e.g. in status text.
Orange is also used when showing overall indicator value for when on the cusp of
buy and sell. Yellow is used for our stop loss line and cyan for take profit. Blue for
buy pending orders and magenta for sell pending orders. On news events, red is high
impact news, yellow medium and orange is low.
These colors are configurable.
Issue 3.3 Page 5 Runwise Limited (UK)
www.runwisefx.com
2 SYSTEM SPECIFIC NOTES
2.1 MetaTrader 5
If using the MetaTrader 5 version of our EA then we recommend under MetaTrader
5 | Options | Charts that you set ‘Show trade level’ drop-down to something other
than ‘Enable dragging of trade level’. The reason being is that if this is not done then
the trade level lines can prevent button presses on the panel even though the panel
is on top of the lines. This is a small bug in MetaTrader 5, which may be fixed in later
releases.
MetaTrader 5 doesn’t give enough time for our EA to de-initialise itself if you remove
it from a chart. Therefore, you may see panel objects left over if using our EA. It’s
only a cosmetic problem and is fine if close the chart, rather than remove the EA.
2.2 Windows 7
If you are still running Windows 7 then recommend setting EA input
Gen_forceResourceToHaveUnqiueName to true to prevent certain panel items
from disappearing. Note, this setting does use up a little more memory per chart.
Issue 3.3 Page 6 Runwise Limited (UK)
www.runwisefx.com
3 UNDERSTANDING THE PANEL
Let’s begin by going through the EA’s panel from top to bottom.
Tool Bar >>
News Events >>
Status Lines >>
Controls per Direction >>
The tool bar at the top can be used to move panel around with the familiar click &
drag. The buttons are explained in 3.1.
The main part of the control panel provides news events, status text and controls for
interacting with the EA, which we will go through.
Extra controls can be added to panel to allow on-the-fly changes to SL, TP etc. and
also controlling auto entry & exit. To enable go to CONFIG button | Display | Panel
Items and tick the options there and Save. You can also enable multi-timeframe trend
arrows – see 5.7.3. With all this enabled you will get:
Again, these controls are explained more in the following sections. Note, even more
controls can added from our Library (https://www.runwisefx.com/library) such as in
the Script Rules section, where there are things like ‘Close All Trades on Account’
button. We cover more about our amazing Library later.
3.1 TOOLBAR BUTTONS
3.1.1 Lines
The Lines button allows you to toggle between displaying horizontal lines, such as SL
& TP, or not. This is just visually to declutter the chart. It does NOT turn off SL, TP,
etc. – it’s just cosmetic.
Issue 3.3 Page 7 Runwise Limited (UK)
www.runwisefx.com
You can display dual Lines buttons for sell & buy by ticking the option
in CONFIG button | Display | Show dual ‘Lines’ buttons …. There are
also other options there to control visibility of SL & TP and even
change the text shown on the line labels.
3.1.2 + - and Minimize
The + allows you to make the panel bigger and - to make smaller. The minimize
button shown on the far right will allow you make the panel smaller by reducing what
is shown. Will toggle to restore.
3.2 NEWS EVENTS
The first part of the panel is news events. These are useful when trading currency
pairs and shows news events that are relevant to the two currencies. Shows time of
news event which will change to count down closer to the event. Red events are high
impact, yellow is medium and orange is low impact.
To get news events to show you will need to add
http://runwisefx.com to allowed web URLs, via MetaTrader Tools
menu | Options menu | Expert Advisors tab | ‘Allow WebRequest for
listed URL’. Simply tick the box and use the green + button to add the
URL. This only needs to be done once.
The setting will also allow you access trade rules from our library:
https://www.runwisefx.com/library
Don’t forget you need to include the http:// but do not add ‘www.’ to the
URL - must be entered as: http://runwisefx.com
Note, specify http rather than https.
Can turn news events off via CONFIG button | Display and set lines for news to 0.
You can get the system to recapture news events from the web via CONFIG button |
Tools | News Capture button.
If you would like to include news from a currency not mentioned in the
chart’s symbol name then you can set this in EA input
News_currenciesToAdd. For example, if trading NASDAQ-100 and
want to see USD news then set this EA input to USD. Can add extra
currencies comma separated.
You can control what severity of news events are shown via EA input
News_impactsToStoreAndShow. By default shows high and medium
severity.
Issue 3.3 Page 8 Runwise Limited (UK)
www.runwisefx.com
3.3 STAUS TEXT
The cyan colored status lines will report status for both the buy and sell direction.
This includes the profit of any open trades and the status of any configured trading
rules. It also indicates what the EA is waiting for a trade signal, e.g. our default rules
with say waiting (no rsi,tdiYlw,macd) would mean waiting for indicators with reference
IDs rsi, tdiYlw and macd. If get open signal then will say OPEN. If can’t open a trade,
e.g. spread too high then say the reason in brackets, e.g. OPEN(spread too high).
The status of any loaded filters will also be shown, e.g. fltNews. If filter is active and
blocking trades then will say fltNews:active, else will say ‘okay’ instead of ‘active’.
Changes in status text get logged to the Experts log so can be viewed later. See
Appendix B for more details.
3.4 MULTI-TIMEFRAME TREND ARROWS
Shows the direction the market is moving in, for particular time frames, using our
built-in indicator. The numbers are the pips that the market has moved in that
direction, since the direction was signalled. If the market has moved a lot of pips
already then is shows that the trend might not last much longer.
Note, the muti-timeframe trends arrows are not displayed by default as
can delay start-up of EA on a new system. You can enable via
CONFIG | Display | Trend Arrow Indicators – see section 5.7.5
You can reduce any start-up delay by reducing number of bars/candles
shown in chart via Tools| Options | Charts | Max Bars in Chart. Set to
something like 10000.
3.5 CONFIG BUTTON
Used to configure the EA via our easy-to-use configuration pop-ups rather than
messing about with endless and fiddly EA inputs. This allows you to set things like
the default stop loss, take profit, lots / risk, indicators to examine, etc. Please see
section 5 for full details.
3.6 SMILEY FACE ☺ - okay to trade
Make sure a smiley face is shown on the panel as that means the EA can open &
close trades, whether that be manually or automatically (uses same mechanism). If
you see a sad face then check the ‘AutoTrading’ button is showing a green play
button on the MetaTrader toolbar, or ‘Algo Trading’ in MT5. Tick the button if not.
In MT4 AutoTrade needs to show green play button (click if not):
In MT5 Algo Trading needs to show green play button:
Issue 3.3 Page 9 Runwise Limited (UK)
www.runwisefx.com
If still see sad face then use F7 in MetaTrader to bring up the Expert properties pop-
up and go to the Common tab. Make sure ‘Allow live trading’ is ticked for MT4 and in
MT5 need to make sure ‘Allow Algo Trading’ is ticked.
Remember, even if just using EA for manual trading then need to have smiley face. If
you still see a sad face then contact your broker to make sure the use of Expert
Advisors has been enabled on your account. Also make sure you are not using the
read-only/investor password.
3.7 MANUAL TRADE BUTTONS
Example is where buy trade is open – hence Close and ScaleIn buttons shown
3.7.1 Trade Open (MARKET/PEND SELL/BUY – shown when trade
not open and pending order not set)
The SELL MARKET and BUY MARKET buttons can be used to open a trade
manually based on the lot size shown in the Lots text box.
The SELL PEND and BUY PEND buttons can used to quickly setup manual pending
order by allowing a line to be moved on the chart. The SL & TP are also set unpinned
so can be moved manually if need be. After pressing Pend you’ll see the pending line
appear on the chart, which you can click and drag to desired price. Will change
between limit and stop type automatically depending on current market price. On the
pending line you’ll see X, R and SET:
Click X to cancel, R to reverse, i.e. change from sell to buy or buy to sell and click
SET when happy with position of lines and want to set pening order. Note, by default,
we use hidden pending orders are managed by our EA. This can be changed to
broker pending order in CONFIG | Pending Orders | Implementation.
Note, if see orange text for MARKET buttons then this means no stop loss is set.
This can happen in auto stop loss mode, where the stop loss only calculates for the
current direction the market is moving in, e.g. ParabolicSAR calculation method.
The magic number (Expert ID) and trade comment used for the trade is set CONFIG
| General Settings.
If a pending order has been set then will show button with the price. Clicking that
button allows the pending order to be managed. Once a trade has been opened the
buttons are replaced by a Scale-In and a Close button and a + button, which are
explained below.
3.7.2 Scale-In (only shown when trade open)
The Scale-In appears when a trade is open and allows additional tickets to be
opened in the same direction, in order to add to the position. The size of the scale-in
ticket is expressed as a percentage of the original trade, e.g. if the original lot size
was 1 lot and Scale-In is pressed with 20% then an additional ticket will be opened of
Issue 3.3 Page 10 Runwise Limited (UK)
www.runwisefx.com
0.2 lot size. To scale-in further then the percentage needs to be increased, i.e. 40%
would open another 0.2 lots, in the example, creating a total of 40% extra scale-in.
Obviously, scaling-in adds to the risk relating to the trade if the stop loss is still in the
original location.
If you would like to hide the Scale-In button, say for discipline reasons,
then set EA input Obscure_hideScaleInButton to true.
3.7.3 Trade Close including Partial Close (only shown when trade
open)
The close button also has a percentage setting associated with it. This is the
percentage of the trade to be closed. 100% will completely close the trade and 50%
will close half the total trade size, i.e. it will scale-out 50%. Note, the total position will
include any scaled-in tickets.
To progressively scale-out of the trade the close percentage will need
to be increased, i.e. it is the percentage of the original trade that was
opened rather that what is left open.
3.7.4 The + Button (only shown when trade opened or pending
order is set)
This can be used to put the EA into multi-trade mode, if not already in that mode, and
allow another independent trade (with its own SL/TP/magic number) to be opened or
another pending order to be setup, in the same direction. Note, this is different to
scale-in which is an additional ticket but with the same SL/TP as the main trade and
is managed with the main trade, e.g. close will affect scale-in as well.
3.8 MONEY MANAGEMENT (Risk:/Lot:)
The EA will calculate the lot size for you based on the percentage of your account
balance (or equity – whichever is lower) you wish to risk. The percentage is shown
the Risk text box and can also be selected via the pop-up, which is activated by
pressing the button. You can also enter a fixed amount of the account currency by
simply typing the amount in and omitting the % sign. The default value is set
CONFIG button | Risk / Lots – see section 5.4
The pips at risk that is used for the lot size calculation comes from the current
position of the hidden stop loss line (yellow) and the current price.
To manually enter a lot size, simply clear the Risk text box and enter the required lots
value into the Lots text box. Or use the selection list on Lots box which will auto clear
the Risk box if sued.
Issue 3.3 Page 11 Runwise Limited (UK)
www.runwisefx.com
If the value in the Lot box is colored orange then this means it is being
limited by available margin on your account, i.e. limited by the current
setting of EA input Main_minMarginToKeepFreePrct and what the
broker says your free margin is. Note, inputs like this are explained in
section 14.
Selection lists, like for the Risk and Lots, can be altered via EA inputs
Main_selection*
3.9 AUTO ENTRY MODE SELECTION (Entry:)
It is possible to display auto entry control on the panel for on-the-fly changes via
CONFIG | Display | Panel Items | Auto Entry tick box.
The following auto entry modes are available that relate to the level of automation of
the EA. Essentially, it allows you to tell the EA what you want it to do when the
configured rules issue a trade command, such as TRADE_OPEN, SCALE_IN, etc.
This allows you switch (say) from the rules to just alerting you, to actually taking the
trade automatically. If taking the trade, this can be as a one-off (semi-automatic) and
continuously (fully automatic) as each fresh trade signal arises.
MAN Manual Mode. This turns off the rules engine for when ticks coming in
form the market or on regular time intervals (both for entry & exit).
However, rules can still be executed on ‘script basis’, i.e. executed
when a user configured button is pressed. Note, does not affect stop
loss, pending orders or take profit.
MAN mode is purely for manual trading. Only use MAN
if you don’t want do automatic alerting/trading both in
terms of entry & exit, including account management
rules. Use EVL mode if don’t want to alert/trade at the
moment but may want to later on. EVL mode is so the EA can keep
track of whether the market is in the buy or sell situation, which it can’t
do if you turn off rules via MAN mode.
Issue 3.3 Page 12 Runwise Limited (UK)
www.runwisefx.com
EVL Evaluate Mode. Rules are evaluated on incoming price ticks and
regular intervals. However, TRADE_OPEN, SCALE_IN commands will
be ignored, in terms of raising alerts or opening/closing trades.
However, the alert lines will still be set on the chart.
This mode is useful for semi-automatic trading, where don’t want
alert/trade at the moment but may do later. With this mode the EA can
still keep track of the market, so when you do enable alerting/trading it
knows where it is up to.
EVL mode is the mode to select when you don’t want
the EA to alert/trade a particular direction – but may do
later or have enabled alert/trade in other direction.
ALT Alert Mode. Any TRADE_OPEN and SCALE_IN commands will result
in an alert but won’t actually open trades. Note, the alert will only
happen on a fresh signal, i.e. where ‘reset’ has happened. By default,
reset means a signal in the opposite direction.
PND Pending Mode. Will setup a pending order when TRADE_OPEN is
issued by a rule. The pending order will be offset from the market price
the value set in CONFIG | Pending Orders | Offset. Note, it is also
possible to configure a text box on the control panel to supply this
value instead. Just needs to be named rwfxPendOffset.
TOE Trade Once then Evaluate Mode. This will act up on TRADE_OPEN
SCALE_IN commands but after trade closed the mode will switch to
EVL. This can be used to authorise the EA to do a one-off action,
which we refer to as semi-automatic. If you wanted it to take future
trades (say) then you would need to set back to TOE (say).
TOA Similar TOE but after trade close the mode will be switched to ALT.
TC Trade Continuous Mode. This will act up on TRADE_OPEN and
SCALE_IN and keep doing so until mode is changed.
It is important that you test your rules well before this
mode is selected, which we refer to as automatic, as will
keep trading.
3.10 AUTO EXIT MODE SELECTION (Exit:)
Allows auto exit to be control, i.e. what to do when configured trade rules signal exit.
By default the ‘AUTO’ setting will exit the trade but can be set to ALERT, where will
just alert or OFF. Note, trade exit rules, e.g. indicator based exit, has nothing to do
with stop loss, break even or take profit, which operate independently of the trade
rules.
Issue 3.3 Page 13 Runwise Limited (UK)
www.runwisefx.com
Note, displaying of Exit Mode on the panel needs to be turned on via CONFIG |
Display | Panel Items | Auto Exit tick box.
Issue 3.3 Page 14 Runwise Limited (UK)
www.runwisefx.com
3.11 SL Mode (SL: )
Click the SL: selection box will display the Stop Loss edit box, which allows on-the-fly
changes to made to stop loss. Note, the default stop loss is set by CONFIG button |
Stop Loss – see section 5.5. The stop loss is also visualized on the chart by a
horizontal yellow price line whose label can be clicked to show this pop-up or
unpinned and moved manually to a different price – see section 4.
The EA uses a hidden stop loss (sometimes called virtual or stealth)
which is hidden from the broker – your broker is not your friend. We
still set a broker stop loss, as a backup, but it’s a configurable distance
away from the actual/hidden level. The hidden SL works on the bid
price, which is the price you see in the charts. So, can set from chart
candles/indicators without having to worry about spread. Using bid
price also avoids being triggered by spikes in the ask price, which is a
common trick from brokers, as doesn’t appear in the charts.
This pop-up is shown when
SL: is clicked. Also shown if
you click the label of the yellow
hidden stop loss line shown on
the chart.
Use the radio button ‘Stop Loss Mode’ selection to switch between setting stop loss
automatically, specific price, pips from current market price, amount in account
currency, trading rule (if loaded from library) or off.
Note, for AUTOMATIC, the calculation method used and properties is set via
CONFIG button | Stop Loss. See section 5.5.
For PIPS, you can use the [v] drop-down selection list to chose from a list which can
be set via EA input Main_selectionSLmodePips
You can turn on trail stop loss via ‘Trail stop loss’ tick box. Finally, you set for break
even. Note, our break even mechanism is separate to the stop loss, so you can
change your mind easily and untick it, i.e. don’t need to remember where stop loss
was originally if had to move that instead.
Use the OK button to save the changes or use Cancel or button to close without
making changes.
Issue 3.3 Page 15 Runwise Limited (UK)
www.runwisefx.com
3.12 Trail Tick Box
The Trail tick box can be used to turn on/off trailing for the stop loss. This is the same
setting as ‘Trail stop loss’ that is shown in the SL: pop-up box, mentioned in the
previous section.
3.13 HIDDEN TAKE PROFIT (TP BUTTON)
The TP button allows you edit the take profit levels on-the-fly. Note, the default take
profit regime can be configured via CONFIG button | Take Profit, see section 5.6.
When you press the TP button the following pop-up is shown. The take profit is also
visualized on the chart by a horizontal cyan price line whose label can be clicked to
show this pop-up or unpinned and moved manually to a different price – see section
4. Use the OK button to make any changes, or Cancel or button if you change
your mind and don’t want to make the changes.
The EA uses a hidden take profit (sometimes called virtual or stealth)
which is hidden from the broker. This is more powerful than a broker
take profit, as it can do partial closes and make adjustments, e.g. set
for break even. We still set a broker take profit, as a backup, but it’s a
configurable distance away from the actual/hidden level. The hidden
TP works on the bid price, which is the price you see in the charts. So,
can set from chart candles/indicators without having to worry about
spread.
The take profit pop-up shows the settings for each of the TP levels (targes), plus a
master on/off control.
3.13.1 MASTER Tick Box
If this is unticked then the hidden take profit feature/levels will all be switched off.
3.13.2 Target n:
The first value and selectable list is where amount, price, pips or rrr (risk reward ratio)
can set for the take profit level/target. The amount (amnt) is in account currency. In
the example above the take profit targets are set to risk reward ratio of 1,2,3 and 4
respectively. As with other areas of the system, when pips is selected you can add a
‘%’ sign, which will be the percentage of the Average Daily Range in pips.
Issue 3.3 Page 16 Runwise Limited (UK)
www.runwisefx.com
3.13.3 Exit %
If ticked this will perform the partial close of the trade using the percentage of the
trade to close shown with the tick box, when the target price is reached. If 100% is
selected then this will close the entire trade. If 0 or the box is unticked then no close
will take place.
If you specify a negative percentage then when the target is reached the trade will
scale-in by that percentage (non negative), i.e. add to your position. To scale-in
specific lots when target reached then enter in Exit % box but to letter ‘l’ afterwards,
e.g. 0.5l will scale-in 0.5 lots when target is reached.
It’s perfectly fine to have the exit % as 0 but still use the profit target to
adjust the stop loss or set for break even. Best to think of the hidden
take profit as take action when profit target is reached. Note, if the
MASTER tick box is unticked then no action will be taken when the
targets are reached.
3.13.4 Stop Loss Adjustment (SL:)
If set then will adjust the stop loss when the profit target is reached. This can be
used, for example, to narrow the stop loss to a certain number of pips. If RAISE is
selected then will raise the stop loss to the previous target, or break even in the case
of target 1. If RAISE-OC is selected then does RAISE functionality but only if candle
close price reaches the take profit level.
If RAISE-OC is selected then the exit % and other settings will also
only happen on candle close price reaching the level.
You can alter the SL selection list, e.g. to change available list of pips,
by changing EA input Main_selectionSLmodePips.
3.13.5 Trail (tick box)
If set then set for trailing stop loss when the profit target is reached.
3.13.6 Break Even (BkEven tick box)
If set then will set for break even when profit target is reached. Note, this doesn’t
mean adjusting the SL but setting flag in the EA that will exit if trade goes down to
break even, i.e. think of the as a second stop loss.
3.13.7 Reset Button
Use this to reset the level to the configured defaults, i.e. as set by CONFIG button |
Take Profit
Issue 3.3 Page 17 Runwise Limited (UK)
www.runwisefx.com
3.14 HIDDEN PENDING ORDERS (Pending:)
If you click Pending: selection box then pending order pop-up is displayed that
allows you to setup a pending order. The EA uses hidden pending orders, which are
more powerful, as can optionally just alert or work on candle close price. Hidden
pending orders mean the broker isn’t tempted to nudge the price/spread to trigger
your broker pending order when they believe the market isn’t favourable. Our hidden
pending orders also work on bid price, so can be set from the price action/candles in
you see in the chart, which is in bid price. Triggering on bid price avoids spikes the
ask price, which can be quite common from brokers as doesn’t show up in the charts.
The pending order is also visualized on the chart by a horizontal price line whose
label can be clicked to show this pop-up or unpinned and moved manually to a
different price – see section 4.
The following pending order
pop-up
Use is shown Mode
the Pending when click
radio b
Pending: box on the panel:
Use Pending Mode radio button selection to select between alerting or trading when
price reached, and if want to consider current market price or closed candle price.
Can also select OFF to turn off the pending order. If setting new pending order then
TT will be selected automatically to save you mouse click.
Use the Pending Trigger radio button selection to select between providing the
trigger as a price or pips offset from the current market price. If supply negative value
for pips then will set up a limit order, else a stop order. Any % supplied the pips box
will be % of average daily range. Note, the default value for pips can be set in
CONFIG button | Pending Orders – see section 5.8.
The Expiry section can be used to set any expiry for the pending order. This can be
supplied in variety of different ways, as selected via the drop-down selection box next
the Expiry input box. You can supply as date/time timestamp both in server/chart
time or local time. Of just time if current day. Can also supply as offset from current
time or number bars/candles. You can use the Enabled tick box to temporarily
Issue 3.3 Page 18 Runwise Limited (UK)
www.runwisefx.com
disable the expiry. You can delete/forget the expiry by selecting <<BLANK>> from
the selection list. If an expiry has been set then it will be shown as a vertical line on
the chart and can be moved by doubling-clicking it to select the line and moving it
with your mouse. Note, the default expiry can be set in CONFIG button | Pending
Orders – see section 5.8.
Setup bracketed….: If ticked then will set up both buy and sell pending orders
based around a supplied number of pips. If One Cancel Other is configured in
CONFIG | Pending Orders then the sell pending order will be automatically cancelled
if the buy pending order is reached, for example.
Preview SL/TP/lots…: If ticked then the system will show the SL and TP based on
the pending order, rather than current market price. The lots will also be appropriately
calculated based on that as well. Note, if the SL is from an indicator then the SL will
still be based on the current market situation.
Use the OK button to save the changes or use Cancel or button to close without
making changes. The OFF button can quickly be used to turn off pending order.
3.14.1 Automatic Scale-In on Price Reached
The EA can be set to automatically scale-in when a target priced is reached on an
open trade. Simply set a pending line as you would normally (previous section) and
this will be place a ‘pending scale-in’ line on the chart that can be positioned to the
desired price. When that price is reached the EA will either alert or perform the scale-
in, depending on what was selected from the Pending: list. The scale-in in
percentage is that which is shown next to the manual Scale-In button. Essentially, it’s
like the EA presses the Scale-In button for you when the pending scale-in price is
reached.
3.15 BREAK EVEN (BkEven tick box)
The ‘Breakeven’ tick box can be used to set a trade for breakeven where the trade
will be exited when the price comes back to its open price. If you change your mind
whilst the trade is still open, simply untick the breakeven checkbox. Note, if you tick
the box when a trade is not in profit then will close the trade if trades improves and
comes back to the open price. Note, break even takes spread into consideration and
exits on genuine break even after spread is paid.
Our break even mechanism is separate to the stop loss, i.e. stop loss
won’t move when break even is activated. Best to think of it as a
secondary stop loss that will exit when open price reached (offset by
spread). The reason for this is that if you change your mind about
break even you can just untick to the box, rather than having to put the
stop loss back to where it was.
3.16 TRADE RULE CONTROLS (bottom of panel)
The bottom of the panel is where any controls for configured trades rules will appear.
If indicators have been configured to be captured then the default rules ‘Entry on
Indicators’ and ‘Exit on Indicators’ will appear. This default rule will signal entry/exit
Issue 3.3 Page 19 Runwise Limited (UK)
www.runwisefx.com
when the configured indicators are in agreement, subject to the thresholds in
CONFIG | General Settings (default 100%). The Auto Entry Mode setting in CONFIG
| General Settings will say whether the signal will cause an alert (default), set-up a
pending order, trade one off or trade continuous. The Exit Mode in CONFIG |
General Settings says what should happen on exit signal, e.g. alert or close trade or
off/ignore. Note, the default rules may not show if you have the manual trading
version of our EA, such as our Ultimate Trade Manager.
You can add more functionality to Trade Rule Controls by downloading filters and
trade rules from our library at: http://runwisefx.com/library. These are easily added to
the EA via our ‘Quick Load Codes’ that can be entered via CONFIG pop-up and the
Code box & Download button.
We recommend the following filters and rules:
• News Avoid Filter – quick load code: f-na (as news events can blow your
trade out of the water)
• Exit Before News – quick load code: e-n
• Close Trades Before Weekend - quick load code: e-t (as market gaps can
happen over the weekend that can exceed your stop loss)
Other popular rules are:
• Exit All Trades On Equity Target – quick load code: e-gtp
• Close All Trades Button – quick load code: bi-ca
The Rule GUI controls at the bottom of the panel are for on-the-fly
changes. If you wish to change the default value, so will get used by
default and when generating statistics, then set this via CONFIG button
| Rule GUI Controls. See section 5.11.
Issue 3.3 Page 20 Runwise Limited (UK)
www.runwisefx.com
4 LINES SHOWN ON CHART
The main horizontal lines are shown on the chart are for the hidden stop loss, take
profit and any pending orders, so can see the price they are set to. These can be
shown to the right of the price/candles by using MetaTrader’s Chart Shift option –
enabled via F8 Common tab and tick ‘Chart shift’. This will allow you to move the
candles to the right.
You can click on the label to bring up the appropriate pop-up to manage the line. It’s
also possible to unpin the lines by clicking on the pin icon so it becomes and
then you can click on the label to move the line to a new price with your mouse. After
finished moving, click on pin icon again to lock in place. When line is unpinned a
icon appears, so you can still access pop-up if click that.
The line labels will not overlap so you can read them easily. The dotted line will show
the actual price and the label will be positioned as close to that line as possible, but
without overlapping other labels.
4.1 Yellow Hidden Stop Loss Line (slBuy/slSell)
The hidden stop loss is shown by a yellow dotted line on the chart and label. The line
will go dashed when a trade is open to indicate it’s active. The line shows the number
of pips for the size of the SL and the number of lots that have been calculated based
on it. If you’ve set the system with fixed/dynamic lots then the amount the SL
represents will be shown instead. Use the pin icon as described above.
The hidden stop loss, pending lines and take profit all work on the bid
price. This prevents these items from being triggered by spikes in the
ask price, which could come from broker manipulation as the ask price
is not shown on the charts or in the history. The bid price is also the
price shown by the candles, so it means you do not have to account for
the spread when setting lines from what you see on the chart including
indicators that are calculated from the candle prices e.g. moving
averages.
When you open a trade the EA will also set the broker stop loss, which
is deliberately further away than the hidden/actual level. This is so your
broker doesn’t know where you true stop loss is. Remember your
broker is not your friend and you should hide a much as possible from
them. See our video if you want to know why:
https://www.youtube.com/watch?v=hWVNYWEVG9A~
The additional offset from hidden level can be configured in CONFIG
button | Stop Loss – see section 5.5.11.
Issue 3.3 Page 21 Runwise Limited (UK)
www.runwisefx.com
4.2 Cyan Hidden Take Profit Lines (tpBuyn/tpSelln)
The hidden take profit lines are show as cyan dotted lines on the chart. If there are
multiple take profit levels then number (n) next to tpBuy or tpSell will say which level
the line relates to. The line will go dashed when a trade is open to indicate it’s active.
The line shows the number of pips for the size of the TP and the risk/reward ratio that
represents. Use the pin icon as described earlier to unpin the line to move to different
price.
When you open a trade the EA will also set the broker take profit,
which is deliberately further away than the hidden/actual level 100%
exit level. The addition offset from hidden level can be set in CONFIG
button | Take Profit – see section 5.6.3.
4.3 Hidden Pending Order Lines (pendBuy/pendSell)
For buy: For sell:
The hidden pending lines are show as dashed lines on the chart, colored blue for buy
and magenta for sell. The line will show if it’s of limit or stop type, which will depend
where it is placed in relation to current market price. The number of pips from current
market price will also be shown. If the pending order has an expiry then this will be
shown as an additional vertical line, which can be selected with double-click and
moved to different time, should you wish.
4.4 Red/Green Support & Resistance Lines (S1-3,R1-3)
Theses show daily support & resistance lines. They need to enabled via CONFIG |
Display | Horizontal Lines, as not shown by default. The market can often reverse
around these lines so can be good place set take profits, e.g. partial, and break even.
4.5 Brown/Cream Pivot Lines (* Pivot)
Daily, weekly and monthly pivot lines are calculated shown. They need to enabled via
CONFIG | Display | Horizontal Lines, as not shown by default. Again the price can
bounce off these lines and may not ‘break through’. Good idea not open trade in
same direction as market if price close to one of the these lines, as price may
reverse.
Issue 3.3 Page 22 Runwise Limited (UK)
www.runwisefx.com
5 CONFIGURING THE EA
The EA can be configured using pop-up forms, available when you press the
CONFIG button on the panel. This makes the EA much easier to configure than the
old way of using endless EA inputs! EA inputs are still there and are used if not made
changes via CONFIG button.
5.1 Main Config Pop-up
Pressing the CONFIG button shows the main pop-up that allows the various areas of
the system to be configured. The sub sections that follow will go through each of
these buttons.
Also in main config pop-up, it is possible to download rules from our library:
5.1.1 Downloading Configuration/Trading Rules from Our Library
Ready-made rules can easily be loaded into your EA from our rules library webpage:
http://runwisefx.com/library.
To load rules you will need to have added http://ruwnisefx.com to the list of URLs
that the EA can access via Tools | Options | Expert Advisors tab | ‘Allow WebRequest
for listed URL’. This only needs to be done once.
Enter the quick load code, shown in the library (right column) in the ‘Code’ text box
and press the Download button. Click OK in the Confirm the download message
box.
The tick box Replace Existing can be ticked to replace any rules are already
configured, such as the built-in rules that EA ships with. This is recommended if
downloading rules that perform an automatic entry if other entry rules are already
loaded.
Issue 3.3 Page 23 Runwise Limited (UK)
www.runwisefx.com
Our library also contains the supplied rules that EA ships with, in case
you want to re-add later. You’ll see them at the bottom of the library.
5.1.2 CONFIGURATION FILE - Re-Read Button
This will re-read configuration, which is stored in a file, into the memory of the EA.
However, this button doesn’t normally need to be pressed, as by default, the EA will
automatically re-read the file if it detect a date/time change on the file.
The filename of the configuration file is shown above the button and is store in the
MQL4\files folder of your MetaTrader Data Folder (or MQL5\files in MetaTrader 5).
It is possible to have different configuration files and switch between
them, both in terms of reading and writing, via EA input
Main_configFileName. This can even come from a special common
folder that is accessible by all MetaTrader instances installed on you
computer, when EA input Main_configInCommonFolder is set true.
5.1.3 CONFIGURATION FILE - Revert to Previous
If pressed then will revert to previous configuration file before last change was made.
Useful (say) if downloaded incorrect rule.
5.1.4 CONFIGURATION FILE – Copy to Tester
Will copy EA’s configuration file to MetaTrader’s Strategy Tester. Note, the EA’s
configuration file can’t be directly read when using the EA in the MetaTrader Strategy
Tester Tool. However, this button will copy the current configuration into a special
common folder that can be accessed by the Strategy Tester when the next test is
run.
Click this button when you are happy with your configuration and wish to try out in the
Strategy Tester.
When using the Strategy Tester the EA’s configuration file is
read/written from/to folder tester\files, in your MetaTrader Data Folder,
as MQL4\files cannot be accessed by the Strategy Tester. In
MetaTrader 5 the location of tester\files varies, so recommend using
Copy Config to Strategy Tester button.
Issue 3.3 Page 24 Runwise Limited (UK)
www.runwisefx.com
5.2 CHANGES APPLY TO
Most CONFIG button pop-ups have a Changes Apply To at the top:
This allows you to make changes just for a particular symbol and/or time frame
period. It’s also possible to make changes per trade index (per magic number) when
in multi-trade mode – see section 7.
When you click the selection list it will present some possible symbols or periods.
However, there is also a <Select…> option where you can enter specificly what you
need:
Note, the Symbol box also supports just entering a currency, e.g. JPY and in Period
can enter multiple periods if separated by underscore, e.g M15_M30. The Trade
Index # is numbered 0 and above and allows different configuration for each magic
number/trade index when in multi-trade mode – see section 7.
‘Changes Apply To’ works for changes to the boxes (fields) on the pop-
up panel for existing items. So, if only want to use indicator for certain
symbol/period then add indicator for all symbols & periods and use a
change to the Enabled tick box to only turn on for the required
symbols/periods.
Issue 3.3 Page 25 Runwise Limited (UK)
www.runwisefx.com
5.3 General Settings
Let’s go through each of the buttons in main CONFIG pop-up, beginning with
General Settings. This allows general/main settings of the EA to be changed via the
following pop-up form:
5.3.1 Trade Comment
The trade comment that is used when trades are placed on MetaTrader and is shown
in the comment tab of the Terminal frame in MetaTrader. If using a Binary Options
broker then specifies the expiry time for the order. See section 15 for more details.
5.3.2 Multi Account
Can be used to place the EA in multiple account mode where manual trades and
adjustments can be automatically copied to slave accounts on other MetaTrader
instances on the same computer. See section 13 for more details.
5.3.3 Magic Num[ber]
Specifies the magic number, as known as the Expert ID, that the EA will use for
trades that is manages.
5.3.4 Max Simultaneous Trades
This allows additional magic numbers to be allocated that allows multiple trades in
the same direction on the same symbol to be managed, i.e. with separate stop loss /
take profit. This includes having multiple hidden pending orders in the same
direction/symbol.
Entry the number of additional trades/pending orders you want to permit on the same
symbol/direction. If greater than 0 then this places the EA in multi-trade mode, see
section 6.
Issue 3.3 Page 26 Runwise Limited (UK)
www.runwisefx.com
5.3.5 DEFAULT AUTO MODE
This tells the EA what to do what a trade signal occurs, e.g. should it just alert you or
should it auto trade. The trade signals come from the configured trade rules, which
by default will follow any configured indicators, i.e. by default, signal entry when all
configured indicators are in agreement and signal exit when all gone opposite.
The auto mode is set separately for entry and exit, so allowing a flexible choice over
automation, e.g. manual entry on alert, but auto exit. See section 3.9 for an
explanation of what the entry modes do. The exit mode can be one of OFF, no auto
exit or even alert, ALT to alert or AUTO to automatically close trade when exit signal
occurs. Note, exit just means by the loaded trade rules and doesn’t affect SL/TP.
As mentioned in section 3.9, be careful about setting auto entry mode
to MAN (manual) as this will turn off our rules engine for both entry &
exit. For example, this would stop our account management rules from
working. Set to EVL (evaluate only) instead.
5.3.6 THRESHOLDS
The entry, exit and reset thresholds are used by our built-in ‘Entry on Indicators’ and
‘Exit on Indicators’ rules. The percentages refer to what percentage of indicators
need to be in agreement for trade signal to happen or exit if indicators gone in
opposite direction. The reset is about when can trade again. If reset threshold is
100% then indicators need to all go opposite for a trade to happen later on when they
come back. If set to 0 then indicators just need to go to cusp of buy/sell and come
back for trade to be signalled.
The ‘Auto reset for new/trade on opposite signal’ will also do reset when signal
happens in opposite direction. If ticked this means trades will still happen if Reset
Threshold % is blank.
The following video says more about thresholds and this concept of ‘reset’:
https://www.youtube.com/watch?v=gHQec21cj7k
An indicator will only contribute to given threshold when the ‘use
indicator for’ is corresponding ticked for entry, exit and/or reset in
CONFIG | Indicator Values to Capture. Plus Weighting box needs to
non zero value and of course the indicator enabled.
5.3.7 ALERTS
Allows you specify what should be done when the EA wishes to raise an alert. Can
select between alert pop-up box in MetaTrader (and sound), email and/or notification,
i.e. send to a configured mobile.
5.3.8 TRADING HOURS
Allows you to select the trading hours that any configured rules are allowed to open
trades for. Possible to specify two start and ends so can say configure a morning
session and afternoon session. Note, the EA will not close a trade already open
based on these times – it just relates to opening a new trade. Note, the times are
server/broker time.
Issue 3.3 Page 27 Runwise Limited (UK)
www.runwisefx.com
The Friday Reduce allows the end time to be adjust down on Fridays. This is useful
as a of traders don’t like to open new trades close to the weekend market close.
5.3.9 Revert/Save/Cancel Buttons
This pop-up form and others have these buttons. The Revert will remove
configuration items of the pop-up form from the configuration file and revert to what is
configured in the EA inputs. The Save button will save any changes to the
configuration file and Cancel will close the form without doing a save. Pressing [X]
button will also do a cancel.
Note, when the Save button is pressed it will trigger a re-read of the configuration file,
which will also, by default, be performed by other instances of the EA, when they
detect a date/time change in the file modification timestamp.
5.4 Configure Risk / Lots
Allows you specify the default method for setting trade position size method, i.e. lots
size to use. Use radio button style selection list to select between:
• Risk % of account balance/equity (whichever is lower) to risk per trade
• Risk fixed amount of account currency per trade
• Amount of account currency per pip
• Dynamic lots, i.e. how many lots per 1000 of account balance
• Fixed lots
Max Spread For Auto Open: Allows the max spread to be specified when the EA is
automatically opening a trade. This can be used to avoid entering trade when spread
is too high.
Issue 3.3 Page 28 Runwise Limited (UK)
www.runwisefx.com
Max Tickets Open at Once: Is the maximum tickets that can opened on the whole
account for trades that are initiated by the EA. This can used to limit your account
exposure.
Finally, the cyan color text shows important values, such as your broker’s lot size
requirements, where step is the smallest increment allowed in lot size.
5.5 Configure Default Stop Loss
Allows default stop loss mode to selected, using radio button style selection list. Plus
other items related to the SL.
5.5.1 Automatic SL
Sets SL automatically based on the selected calculation method. Some of those
methods have associated properties which can also be set. The methods supported
are:
ATR Average True Range for supplied period and multiplied by
supplied factor. Suitable for both trend following and reversal
strategies and stop loss is calculated in both directions. Note,
can use EA input Property_SLATRAvgTimeframe to change
which time frame the ATR comes from.
BollingerBands Set from lower and upper Bollinger Bands indicator lines
Issue 3.3 Page 29 Runwise Limited (UK)
www.runwisefx.com
Envelopes Set from Envelopes indicator
Fractals Set from Fractals indicator
MovingAverage Based on high/low price moving average
ParabolicSAR Popular indicator for setting stop loss for trend following
strategies, i.e. only calculated in the direction the market is
moving in.
RecentHiLow Based on recent high / low prices. Note, number of bars will
come from EA input Property_SLRecentBarsNum.
RunwiseFX Our own calculation method that adds on PSAR type check.
Only calculated in the direction the market is moving in.
SwingHiLow Based on swing high/lows also know as fractals. Uses EA input
Func_swingLength to say how many lower highs or higher
lows are needed on either side of swing candle that the SL
price is comes from. EA input Func_swingMaxSearchBack
says how far should search back for swing high/low.
CustomIndicator Will set stop loss based on configured indicator if the indicator
provides a stop loss value, i.e. SL Indexes box in the Indicator
Values to Capture pop-up has been populated. See section
5.10.19
Don’t select this option unless an indicator has
indeed been configured to provide an SL.
Otherwise, will end up with no stop loss calculated
and no trades will possible.
5.5.2 Fixed Pips
Allows you set a fixed pip stop loss. Can also use a % to set percentage of the
Average Daily Range of the symbol.
5.5.3 Fixed Amount
Fixed amount based on current lot size. Will size stop loss based on what the amount
equates to in pips.
Needs lot size to be known in order to work, i.e. not based on risk % or
amount per trade in CONFIG | Risk / Lots.
5.5.4 Percent
Will size stop loss based on what the supplied % of account balance equates to in
pips. Alternatively, if set EA input Gen_treatDoublePrctAsPrctOnPrice to true then
will be % of current price instead of account balance.
Issue 3.3 Page 30 Runwise Limited (UK)
www.runwisefx.com
Needs lot size to be known in order to work, i.e. not based on risk % or
amount per trade in CONFIG | Risk / Lots.
5.5.5 Rule
Allows stop loss to be set by trading rules that have been loaded, say from our
library. Only select Rule if you know that you’ve configured/downloaded a rule that
does indeed do this. Note, rules in our library that need this will update selection to
Rule when you download from the library.
5.5.6 Off
Allows you to trade without a stop loss. Not compatible with setting SL based on risk
% or amount per trade, as the risk is infinite without a stop loss!
We do not recommend trading without a stop loss, as your ‘stop loss’
would be your entire account. Remember there can a sudden move in
the market of any size and that exit indicators might not be quick
enough to respond to, especially if the indicator is non-repainting and
only calculates on candle close.
5.5.7 Min/Max/Offset
Allows the automatically calculated stop loss, or that from a trading rule to be
constrained within a min or max value in pips. Can also specify as percentage of
Average Daily Range by adding %. The Offset allows you to add extra pips to the
calculated value. The min/max trim is applied after the offset.
The min/max is useful to avoid a calculated stop loss that is either too shallow or too
big than you would be comfortable with. A shallow stop loss can result in a large
position size if set to risk certain percentage or amount per trade.
5.5.8 Trail Stop Loss on By Default
If ticked then will turn trailing stop loss on by default. If not ticked then trailing SL will
be off initially, but can manually turned on by using the SL Trail tick box on the panel
or in the pop-up shown when you click on the label of the yellow SL horizontal line.
Note, to display SL Trail box on the panel, you will need to enable this in CONFIG
button | Display | Panel Items | SL / TP.
5.5.9 Trail Step
Allows a trail step to be supplied, where trail will happen stages, e.g. if set to 5 then
trail will only happen after price moved by 5 pips each time.
5.5.10 When Trailing Use Latest Auto/Rule Value
Tick this option if would like any trailing SL to move with the latest SL value from an
indicator (auto) or rule. This is useful if want the SL to follow something like a
Parabolic SAR or Bollinger Band, where the SL moves with the latest value from the
indicator. Note, trail SL also needs to be on as well, i.e. tick ‘Trail Stop Loss on By
Default’.
Issue 3.3 Page 31 Runwise Limited (UK)
www.runwisefx.com
When this option is not ticked any SL trail will use the number of pips auto/rule gave
at the time of trade open and only move the SL as price improves.
5.5.11 Broker SL Offset from Hidden
The EA will set a broker stop loss that is a given distance away from the hidden level,
where the offset is supplied by this box. If % is given then instead of pips, will be
percentage of actual stop loss. For example, if set to 50% then broker SL will be 50%
bigger than hidden SL level. The broker stop loss is useful if MetaTrader loses
internet connection to broker or stops running.
5.5.12 Auto Optimize Stop Loss
Available to Strategy Builder users, will automatically optimize the stop loss by trying
the various settings, including various properties of the calculation methods to see
which provides the best profit without increasing draw-down. Any improvement is
saved to the configuration file on a per symbol/period basis.
5.6 Configure Default Take Profit
Allows default take profit regime to configured, including the number of take profit
levels. Partial closes are supported via Exit % box. Note, it is possible that take profit
level doesn’t actually exit the trade, but is used to adjust stop loss, set for break even
and/or set for trail stop loss. Best to think of ‘take profit’ as ‘take action’ when target
price is reached. Note, lots of examples are contained in Appendix A of this manual.
If configuring the EA on per trade index basis, i.e. via ‘Changes Apply
To’, then keep number of take profit levels/targets the same for all
trade indexes. However, can set a take profit target not do something,
if need be, for certain trade index.
Issue 3.3 Page 32 Runwise Limited (UK)
www.runwisefx.com
The target price can be expressed as Risk Reward Ratio (RRR), pips, % of account
or amount in account currency. If a negative value is supplied then the take profit line
will act as additional stop loss line, e.g. can be used a partial stop loss.
Exit % is percentage of original trade (+ any scale-in) to exit. To scale-out of trade
then need to increase %, e.g. exiting 25% as each target is reached out of 4 then
would need exit % of 25, 50,75,100, respectively for each target.
The Exit % box can also be used to indicate you wish to scale-in when
target is reached, i.e. add to your position with an additional ticket. This
is achieved by setting Exit % to a negative value, e.g. setting Exit % to
-100 will open an additional ticket, when target is reached, to increase
your position by 100%.
The SL: box allows the stop loss to be adjusted when the target is reached. Use ▼
selection list to see what options are available. If set to number then the stop loss will
be set to that when TP target is reached. Appendix A in the manual has some
examples.
Advanced stop loss adjustments are supported, where if set SL: box to
-5 (say) will reduce stop loss by 5 pips when target is reached. Or, if
set to -5% will reduce stop loss by 5% of Average Daily Range when
target reached. A double % sign can be used to mean adjust SL by %
of its current value, e.g. -50%% would reduce size of SL by 50% when
target reached.
If double %% sign is used without + or – then will be treated as
percentage of account balance or if EA input
Gen_treatDoublePrctAsPrctOnPrice to true then will be % of current
price instead.
Trail SL will start trailing the stop loss after target has been reached.
Break Even will turn on our break-even mechanism for the trade when the target has
been reached. Note, this is a separate mechanism to the stop loss. Think of it as a
secondary stop loss. Note, the break even is just based on comparison with the
original trade open price and doesn’t take into consideration any partial closes or
scale-ins.
Note, once Trail SL or Break Even ticked then don’t need to be ticked on next
targets, i.e. will stay on once set.
5.6.1 Set TP from Indicator If It’s Configured for That
This can safely be left ticked. It will only alter take profit target price if an indicator has
been configured that provides a take profit, i.e. has TP Indexes box populated in
CONFIG | Indicator Values to Capture has been set. If such an indicator has been
configured then can untick this box to switch to using risk reward/pips target.
5.6.2 Break Even Profit Pips
Allows profit in pips to be captured if price moves to break even point. The profit is
after spread has been paid. For example, a value of 1 can cover trade commission.
So, break even close will be trigger when the profit in pips reaches 1 or lower.
Issue 3.3 Page 33 Runwise Limited (UK)
www.runwisefx.com
5.6.3 Broker TP Offset from Hidden
The EA will set a broker take profit that is a given distance away from the hidden
level, where the offset is supplied by this box. If % is given then instead of pips, will
be percentage of actual 100% exit take profit. For example, if set to 50% then broker
TP will be 50% bigger than hidden TP level. The broker take profit is useful if
MetaTrader loses internet connection to broker or stops running. A broker take profit
is only set if there is take profit level where the Exit % is 100.
5.6.4 Auto Optimize Take Profit / Exit
Available to Strategy Builder users, will automatically optimize the take profit setting
by trying the various settings. This includes trying partial closes and turning on/off
indicator based exit, raise to break even, etc.
5.7 Display Settings
Allows you to remove/size various items that the EA shows on the chart.
5.7.1 Number of Text Lines to Show on Panel
Allows you to specify the number of news lines and the number of status lines (cyan
colored) to show on the panel. Smaller numbers will make the panel smaller.
5.7.2 News Vertical Time Lines for Impacts
Controls the vertical dash/dot lines shown on the chart for news events coming up.
Here you can select the various impact levels to be shown. By default high impact
events are red lines, medium are orange and low impact events are yellow.
Issue 3.3 Page 34 Runwise Limited (UK)
www.runwisefx.com
5.7.3 Other
Extra tick boxes are shown for controlling the visibility of other items shown on the
chart. Namely, average daily range (by default top left), spread (top right) and
Ask/Bid prices in big numbers (bottom right).
5.7.4 Panel Items
Allows various buttons/controls on the panel to be added both for sell and buy that
allow on-the-fly changes, e.g. change stop loss for a particular trade to one that is
different to the default stop loss set via CONFIG button, or to change the Auto Mode
so can set to only trade in one direction.
5.7.5 Trend Arrow Indicators
Controls the visibility of our built-in indicators for the direction the market is moving in
and number of pips moved that is shown on the panel. Unticking ‘show on panel’ will
hide the arrows, where the ‘periods to calc’ box gives the timeframes to be
calculated, comma separated. Note, calculating these arrows does use CPU time, so
set the minimum you are interested in.
5.7.6 Horizontal Indicator Lines to Show
Allows you turn off the horizontal dotted lines for pivots and support & resistance
shown on the chart and also stop them from being calculated. Recommend turning
them off if not needs as will reduce chart clutter and improve (slightly) CPU
performance.
5.7.7 When Panel Minimized Hide
Allows you to specify additional items that should be hidden when the minimize
button is pressed in the top right of panel. This can include the various horizontal
lines to help declutter the chart.
Issue 3.3 Page 35 Runwise Limited (UK)
www.runwisefx.com
5.8 Options
Allows various options to be changed which relates to how the EA works.
Broker requires SL to be sent with order…: Some EU brokers require this option
to be ticked. However, classic ECN brokers don’t support this being ticked. In the
latter case, the EA send a Order Modify immediately after trade open to set the
broker SL/TP.
Broker supports hedging: Tick this option to allow auto buy and sell orders at the
same time.
Apply config changes to chart symbol/period by default: ** Need to set EA
input Obscure_showOptionPerSymPeriod to true to see this option as prone to
misuse** If ticked then ‘Changes Apply To’ shown at the top of CONFIG pop-ups
will be set to ‘Per symbol/period’ by default. If not ticked then changes will be set to
‘All Symbols & Periods’. Of course, we are just talking about the default, you can set
‘Changes Apply To’ to something else as need be.
The reason this option isn’t shown by default is that it can be quite
toxic to have ‘Per Symbol/Period’ on by default, as can lead to
overuse. Usually, you’ll configure the system for all symbol & periods
and then briefly make small changes that are genuinely needed on a
per symbol / period basis.
Note, it’s not possible to add indicators just for certain symbols/periods – they need
to be added for all. However, you can alter the Enabled tick box in CONFIG |
Indicator Values to Capture to turn indicators on or off on a per symbol/period basis
and alter other settings.
Only allow auto enter on new candle: Can be used to switch entry configuration
rules that will normally work on live candle (on price tick) to just work on new candle
open, i.e. candle just closed. Note, won’t effect pending orders, just configured trade
rules, which by default will be when configured indicators signal.
Only allow auto exit on new candle: Similar to above but for indicator based exit.
Note, won’t affect the execution of the stop loss, break even or take profit – just
related to exiting due to configured trading rules, which by default is configured
Issue 3.3 Page 36 Runwise Limited (UK)
www.runwisefx.com
indicators signalling opposite direction.
Only allow reset for new trade on new candle: Similar to above but for when will
reset, i.e. when can alert/trade again. If ticked then will ensure don’t get more than
one alert per candle as reset can only happen on candle open.
Do reset on each new candle: Will allow a trade to happen on open of each candle
if indicators are signalling. Useful for indicators that display arrows (say) on particular
but potentially consecutive candles in the same direction and wish to open trade for
such candles, i.e. if in multi-trade mode – see section 7. Without this option there
would be no opportunity for a reset on consecutive candles, i.e. no gap or opposite
signal, which would normally be required to say okay to trade again.
This option is intended only for the type of indicator mentioned which
puts an arrow/dot on discrete candles that are to be traded. If set this
option for indicators that continually signal buy or sell then could get
repeated entries on consecutive candles if the stop loss or take profit is
hit. This can lead to severe overtrading (potentially trade per candle)
where the non-perfect execution of live accounts could turn a profitable
strategy into a non-profitable one.
High speed testing – default rules only: If set then will only trade with default rules,
i.e. entry/exit on configured indicators. It won’t take any filters or other trade rules,
e.g. stop loss adjustment, loaded from our library into consideration when testing.
Allow filters to block manual trading: If set and you have downloaded filters from
our library then will block manual SELL/BUY buttons if filters are indicating trades
shouldn’t be opened. You will get an alert which says which filters are active and
blocking trading. The SELL/BUY button go grey if blocked in this way. Tip: You can
use EA input Obscure_blockManualTradesOnFiltersEtc instead, which gives more
control like blocking based on trading hours. Tip: Can download rule m-mfc from the
library if you would like a tick box on the panel for this, so can change on-the-fly.
Issue 3.3 Page 37 Runwise Limited (UK)
www.runwisefx.com
5.9 Pending Orders
Allows options relating to the EA’s hidden pending order functionality to be changed.
Implementation Method: Allows you to switch between hidden pending orders that
are managed by the EA, with maximum features, or set pending order with broker.
There is also an option of BrokerSpread that will add spread for buy pending orders,
so can set target price based on the bid price you seen in the charts and that
indicators calculate to. Buy broker pending orders are taken with Ask price reaches
target price. Hidden pending orders always operate on the bid price, so can set from
the charts which are also bid price.
Automatic one cancels other: If ticked means that is you set both a sell and buy
pending order that as soon as one is triggered the other will be deleted/cancelled.
Checking filters…. on pending hit: If ticked system will check any filters loaded
from the library, trading hours set in General Settings and max tickets in Risk/Lots. If
those items are blocking trading when pending price is reached then the pending
order will be cancelled. Note, only works for hidden pending orders that are managed
by the EA.
Show pending control: Show pending control on panel, including the break even
tick box as well. Can untick if not interested in setting pending orders (or break even)
from then panel. Will make the panel smaller.
Show all pending orders….: If ticked then will show all pending orders when in
multi-trade mode, i.e. have multiple pending orders for the same direction. See
section 7.
Expire Pending After Time: Allows default expiry time to be specified for pending
orders. Value is in seconds.
Default Offset Pips: Allows the default offset from market price to be specified. This
is both in the Pending: pop-up and for Auto Mode of PND which will set a pending
order instead of immediately opening a trade when the configured trading rules
signal. This setting gives the pips offset that is used for the pending order based on
market price at time of signal. As with other places where you can specify pips, a %
Issue 3.3 Page 38 Runwise Limited (UK)
www.runwisefx.com
can be added which will use the specified % of the average daily range of the
symbol.
It’s also possible to configure bracketed pending orders with both buy
and sell pending orders set at a configurable distance away from the
signal price. Just include : before the offset amount. E.g.
:15 will set buy and sell pending order at 15 pips either side of signal
price.
Issue 3.3 Page 39 Runwise Limited (UK)
www.runwisefx.com
5.10 Indicator Values to Capture
Allows indicator to be captured to be specified, which can be used for entry/exit
signals and also setting SL and TP if the indicator provides that information. Please
see our Videos section on our website (https://www.runwisefx.com/videos.htm) for a
tutorial video on configuring custom indicators
Note, Ultimate Trade Manager users will also need our Indicator Combine product for
this to work. Not available in our free version of the panel - contact us for upgrade.
The Apply button allows you to save changes without closing the pop-up, so you can
then select/create a different indicator.
5.10.1 Reference ID
Use the ▼ button to see the indicators already configured. Click on its ID to view and
edit its settings. The reference ID is used to refer to the item being captured and
must not contain spaces or a full stops.
If adding new indicator then choose something that represents what the indicator is,
e.g. if TDI green line crossing 50, you might put ‘TDIgrn’.
5.10.2 New Button
Use this to set the pop-up to defaults in order to enter details of a new indicator.
5.10.3 Delete Button
Will delete the indicator show in the Reference ID box.
Issue 3.3 Page 40 Runwise Limited (UK)
www.runwisefx.com
5.10.4 Delete All Button
Will delete all configured indicators. Will ask for confirmation first, via pop-up list.
5.10.5 Enabled Tick Box
Can be used to temporarily disable an indicator for being included in the mix, both in
terms of the stats and alert/signals. This is useful to see if an indicator is helping or
not but without having delete it and then possibly having to re-add.
5.10.6 Indicator Name
For Custom Indicators this is the name of the indicator as appears in the Indicator
section of the Navigator frame of your MetaTrader. Note, if indicator has been
purchased from Market, or is stored in another sub folder, then you will need to add
this. In the case of Market that means adding Market\ to the indicator name.
Standard indicators can be accessed via selection list by clicking the ▼ button. They
are denoted by F: in Indicator Name (F meaning function). These are captured
directly in our product and do not require anything extra installed on your system.
See http://www.runwisefx.com/rules/si.htm?md=csa for details of each of them.
5.10.7 Indicator Inputs/Properties
Allows indicator inputs to be specified that are different from the indicator’s default,
which is what you get if you leave blank. The inputs should be supplied comma
separated in the order they appear in the Inputs tab of the indicator. Only need to
supply up to and including the one you need to change. As setting indicator inputs is
common between our products, we have a separate tutorial online for this:
https://www.runwisefx.com/tutorials/indi_inputs.htm
5.10.8 Capture Mode
A variety of capture modes are available to say how the indicator values should be
captured/interpreted. For example, if color change red/green gives buy/sell or lines
crossing gives buy/sell then these would require different capture modes. As the
mode/methods are common between our products, we have a separate tutorial
online for this:
https://www.runwisefx.com/tutorials/capture.htm
5.10.9 Period
This is the timeframe that the capture will be performed for. If 0 then will be current
period of the chart, else can be set to something else. Can be used to check that
other timeframes are in agreement.
Even if an indicator allows the timeframe to be set via input property,
we suggest using our Period setting instead and leaving the indicator
set to current chart period (0). This is more efficient and will reduce
load on MetaTrader.
5.10.10 Shift
Shift 1 means candle just closed. We recommend keeping at shift 1 unless it is stated
in the documentation for the indicator you wish to combine that is doesn’t repaint. If
Issue 3.3 Page 41 Runwise Limited (UK)
www.runwisefx.com
that is the case then can use shift 0 which means live/current candle. Note, some
indicators don’t output a value for shift 0, so shift 1 will be required for those also.
If you set Shift=0 but the indicator repaints on live candle then can get
stats which are overly optimistic, as effectively looking a candle ahead.
For realistic stats, only set shift=0 when you are sure the indicator does
not repaint, i.e. always shows close candle values.
Our Shift Helper tool can be used to check the shift setting is correct
and should help give reliable stats. See section 6 for more details. You
can also examine an indicator visually in MetaTrader’s Strategy Tester
to see if its value repaints on the candle you are capturing from.
Be careful about supply a negative value to Shift, including in indicator
inputs where the indicator also has a shift setting. Negative values look
into the future but most indicators don’t provide any signal in the future,
so won’t get any trades if you trade live. Negative value also means
stats will look overly good, as effectively looking ahead at happened in
the market, which is not possible when trading live.
5.10.11 Color Index
This is the color/buffer index of the color of the indicator wish to capture. Can be
comma separated, where first item gives buy color and second is sell. Note, -1 can
be used to signify price. This is useful for price crossing indicator values (see
Caputre Mode = CrossBuySell)
Note, can click [?] button to activate the Color Index Helper tool what will show you
what the color index buffers are saying based at the candle where the vertical cursor
line is positioned. Note, by default this will be place at the most recent candle and will
have the color set by EA input Indi_colorIndexBufferCursorColor. Using this tool
you can see which color index is providing the buy and/or sell signals you require.
Move the white cursor line by double clicking line to select it, so can see values from
different candles, e.g. candles in the buy situation and candles in the sell situation.
5.10.12 Null Value
This is used for capture mode of Distance or UseNotNull, where it gives the value the
indicator has when the color is not shown. AUTO should be fine where it checks for 0
or EMPTY_VALUE. Note, EMPTY_VALUE is the official way an indicator should
indicate that the color is not be shown. Note, for some indicators that display in their
own window, the 0 could be a legitimate (non-null) value. In this case the field should
be set to EV for EMPTY_VALUE. A few indicators use -1 for their null value, so need
to set to that in those cases.
You can use MetaTrader’s Data Window (Cntrl+D) to see what color
indexes have what values by moving the mouse over the chart. If blank
is shown then that means EMPTY_VALUE. The color indexes are
shown in order from top to bottom in the Data Window.
Issue 3.3 Page 42 Runwise Limited (UK)
www.runwisefx.com
5.10.13 Weighting
Can be used to add more or less importance to an indicator. If left at 1 then will keep
unadjusted. Entering 2 will be the same as adding the indicator twice. Fractional
values are supported. Can be blank if don’t want to include directly in the indicator
mix, but want to use the value later, say when checking if one indicator is crossing
another one.
The Weighting box can also be used to specify any moving average that is to be
applied to the indicator value. This can be configured by adding
<maPeriod,maShift,maMode>. Where maMode can be one of sma, ema, smma or
lwma. For example, to apply a 10 period exponential moving average, you would put:
<10,0,ema>
5.10.14 Priority
Allows you pick out certain indicators that are high priority. Possible settings are:
Normal: Indicator is simply included in the mix and it will signal a trade when the set
threshold % of indicators (in CONFIG | General Settings) are in agreement.
High: Will not show buy/sell color or alert/signal if this indicator is not present in that
direction. This is only relevant when Entry Threshold in CONFIG | General Settings is
set less than 100. For example, if interested in 4 out 5 (80%) indicators lining up but
want to set that a particular indicator must be present in that 4 out of 5 then set its
priority to High.
HighAndStart – i.e. act as a filter: Will void signal from other indicators if
HighAndStart priority indicator(s) aren’t in agreement when others signal. With this
option the indicator isn’t to be included in the main mix, but will cause a grey X to
appear if not in agreement with the color of main mix. There will be no alert/trade if
there is color change but there is a grey X shown. This is useful (say) for upper
timeframe checks where don’t want alert/signal if indicator not in agreement with
upper timeframe when there is a color change. This prevents severely delayed
entries that you could get if you simply included the upper timeframe check in the
main mix of indicators.
The HighAndStart isn’t just for upper timeframe checks, it can be
used to cherry pick entries where the alert/signal won’t happen if
indicators set with this option are not in agreement at the moment the
other indicators cause a color change (buy/sell transition).
Do not set all indicators to have priority HighAndStart. Otherwise, there
will be no ‘start’, i.e. no indicators to give the main signal. In other
words, nothing to filter, so won’t get any alerts/trades or statistics.
5.10.15 Mid Point
Gives the mid point where the indicator transitions from buy to sell, if such a mid
point exists, i.e. doesn’t need to be set if indicator has (say) one color index for buy
and color index sell and uses that to signify buy/sell.
Issue 3.3 Page 43 Runwise Limited (UK)
www.runwisefx.com
It’s also possible to use this to set buy if value above 50 (say) and sell if below -50
(say), by setting Mid Point to 50/-50. Here are the settings to combine CCI indicator
where signals buy if CCI > 50 and sell < -50:
If / is used but first value is less then second then will be assumed to be reversal
strategy.
If \ is used, e.g. 80\20, then will signal buy when value < 80 and signal sell when >
20. Note, \ is only support by DefaultBuySell capture mode, no OnCross.
If \ is used but first value is less and second, e.g. 20\80, then will signal buy when >
20 and sell when < 80 (mid point between 20 and 80 used as transition from buy/sell)
Mid point can also contain a colon give value required for buy first and value required
for sell second. For example, 1:2 would mean indicator would need to be returning
value of 1 for buy signal and value of 2 for sell. This is useful for MetaTrader 5
indicators that return index buffer that is one value for one color and another value for
a second.
5.10.16 Min Bars
Minimum number of bars that indicator needs to signal for before it will be included
into indicators total. This can be used to make sure the indicator has given a signal
for number of bars before a trade can happen based upon it.
Note, if the indicator briefly goes to 0 rather than opposite direction then count
doesn’t get reset but the indicator will contribute 0 to the indicators total until it returns
back. Only if the indicator goes to the other direction does the count get reset.
5.10.17 Max Bars
Maximum number of bars that indicator can signal for in a certain direction before
indicator regarded as void (not signalling). Used to limit trades close to where
indicator transitioned for buy to sell or visa versa. If blank then no max bars limit.
5.10.18 Hold Bars
If set will hold/remember the indicator value for a specified number of bars (candles).
Can be used for indicators that only briefly show the value you are interested in. The
hold feature allows that value to be remembered and continue to contribute to the
combined indicators total, whilst other indicators have yet to line up.
Examples of indicators that this might be useful for are those that put arrow/dots on
the chart, but just at the start of the move, or oversold/overbought indicators, where
might just move out of oversold/overbought before other indicators line-up, yet still
want the signal.
You can enter the number of bars the value should be held on to for before being
forgotten, or if set to * then will hold until indicator goes to the other direction.
5.10.19 Stop Loss and Take Profit from Indicator
If the indicator provides a stop loss value that you are interested in then you can use
‘SL Indexes’ box to specify the color indexes that give the SL. If two buffers are used
Issue 3.3 Page 44 Runwise Limited (UK)
www.runwisefx.com
then specify buy SL color index first followed by comma and the sell color index
second.
Similarly, can set TP indexes that give take profit if indicator provides that. If multiple
take profit levels are provided then simply comma separate the indexes that provide
them. If different indexes are required for buy and sell then use ‘:’ to separate them
and provide buy ones first, e.g. 1,2:3,4
Both SL and TP indexes boxes support providing object name, by specifying
o(objectName), e.g. SL index could be set to o(buySL),o(sellSL) this would look for
an object called buySL to provide SL for buy trade and sellSL for sell trade. Note, if
using this don’t forget to set Mode to price, as mentioned below. If the indicator
places multiple objects on the chart, say historically, and just want latest then set EA
input Indi_SLTPobjFindLatest to true and set EA input Indi_SLTPobjFindType to
type of object. Note, in this latter case only need to supply part of the object name.
Mode box allows you to say how the indicator provides the SL/TP, as some may give
it points (or pips) or some the specific price. Note, if an indicator happens to provide
both SL/TP as either prices or points/pips then we recommend choosing points/pips
in preference to price.
For the stop loss from indicator to work you also need to select the
auto calculation method to CustomIndicator in CONFIG | Stop Loss
and have AUTO selected in the radio selection list. For Take Profit
need to have ‘Set TP from indicator if it’s configured for that’ in
CONFIG | Take Profit. Also for take profit set number of levels/targets
to what the indicator provides also set ‘action on hit’ section for each
target.
5.10.20 Use Indicator For
This allows you specify if the indicator should contribute to the totals for entry, exit or
reset. Exit are the indicators that need to go opposite for an exit to happen. Reset
concerns what indicators need to go opposite before another trade can happen later
on, i.e. used to detect fresh move/trade.
Be careful about specifying an indicator for exit but not entry. Could
mean that both entry and exit could be signalled at the same time. In
theory that would cause a trade to be open and then immediately exit,
which is obviously not good. Worse still this could in theory repeat if
exit was also reset. Our EA does protect against this and will block a
trade entry if will immediately exit due to exit criteria. However, only
meant to last resort safety check and not intended to be relied on.
5.10.21 Optimization Settings
Use Optimization Settings… to give the start/step/stop of the inputs you wish to vary
during optimization. Input # is the input number where 1 is the first one, 2 second,
and so on. Start/Stop is the range to be tried when optimizing and Step is the step to
be used to between each calculation pass. Optionally, you can just Step box to the
values you wish to try, separated by |.
Issue 3.3 Page 45 Runwise Limited (UK)
www.runwisefx.com
For example, to optimize F:MovingAverageCross with Indicator Inputs set to
8,24,0,ema you could set the following:
This is vary the first input (number 8) from 5 to 12 with a step of 1 and the second
input (number 24) from 15 to 40 with a step of 2. For the forth input, Step has been
set to try various values separated by a |, e.g. sma|ema|smma|lwma.
Can set Input # to 0 in order to optimize Mid Point value. Note, if Mid Point is
oversold/overbought (say) then keep Start and Stop blank and just set Step to, for
example, 40/60|35/65|30/70|25/75|20/80
You can use the ‘Save & Auto Optimize…’ button to optimize a particular indicator.
Our start optimization in bulk via CONFIG | Stats / Optimization – see section 5.15.
5.11 Trading Logic Rules
Can be used is disable any trade rules that have been loaded. Note, if you would like
to delete a Quick Load Code from your configured then use Remove button in
CONFIG | Tools.
Enabled: If unticked then will disable the rule
Void signal if filter not in agreement: If ticked and rule is a filter then will void
signal (say from indicators) if the filter is not in agreement at the time of the signal.
Issue 3.3 Page 46 Runwise Limited (UK)
www.runwisefx.com
5.12 Rule GUI Controls
Allows any configured Rule GUI (Graphical User Interface) Controls, which appear at
the bottom of the panel, to be altered, e.g. to change default value. Use Reference ID
to select the control you wish to amend.
Visible: Can unticked so that item isn’t seen at bottom of panel and Default Value
will just be used. This can make the panel smaller and less cluttered.
Allow value to set per trade index in multi-trade mode: If unticked then any value
will be used for all trade indexes (magic numbers) when in multi-trade mode – see
section 7. However, when ticked can specify values for each selected trade index.
Block Master/Slave send/receive: If ticked then will block rule GUI item changes
from being sent from Master or received by Slave, when in multi-account mode.
Use comment as value if list box item: If ticked and rule GUI item is a selection list
then will return comment of list item if GUI item is referred to in the rules. The
comment is the text after the hyphen in the Selection List.
The Apply button can be used to save changes without closing the pop-up box. This
allows you to then select a different Reference ID and make changes to that too.
It’s possible to have the Default Value come from EA inputs. If set
Default Value to {c.user_configStr1} then will use value from EA input
User_configStr1 – up to 10 provided. Can also specify (say)
{c.User_configNum1} for numeric inputs, User_configNum1, and
{c.User_configBool1} for boolean (true/false) inputs,
User_configBool1.
Issue 3.3 Page 47 Runwise Limited (UK)
www.runwisefx.com
5.13 Tools
Contains various tools that you won’t normally need to use, but may be asked by us
to use, e.g. to help diagnose a problem (say). The exception is ‘Remove Downloaded
Configuration’. With this you can enter a quick load code in Code box and click
Remove button to remove that configuration from your current configuration. There is
also a [v] selection list of code that have been loaded. The following addition codes
can be selected:
Code Outcome
*.* Will remove any symbol/period specific configuration items, i.e. will end up
with same configuration values for all symbols/periods.
*. Will reset configuration values to defaults, e.g. SL / TP etc. (excludes rules
and indicators, i.e. will leave those alone)
* Will delete configured trade rules and trade GUI controls. Indicators will
remain, plus settings for SL/TP, etc.
** Will reset configuration file to default, i.e. what you get when you add EA to
chart for first time.
Issue 3.3 Page 48 Runwise Limited (UK)
www.runwisefx.com
Other buttons that maybe useful:
Force Reset to Configuration: Will reset EA to configured defaults even if a manual
change has been made, unless trade is open. Normally, when configuration is re-
read any on-the-fly manual settings, e.g. moving SL line or adjust auto entry mode
will be preserved. However, this button will blindly reset all EA’s data the defaults
specified in the configuration file. The only exception is where a trade is open, as it's
essential to preserve things like the current stop loss (otherwise could increase risk).
A reset will happen when the trade is closed.
Force All EAs to Reset: Similar to ‘Force Reset to Configuration’ but will be
performed by all EA instances running on the platform.
Test Alert Signal: Use this button to generate an alert shown in the text in the box to
the left. This can be used to test your Signals configuration of our Windows app.
Test Email Signal: Use this button to send an email with the text in the box to the
left. This can be used to test your Signals configuration of our Windows app. The
button calls the same SendEmail function of MetaTrader that indicators would use,
so is a realistic test.
Transfer Indicator Combine Config to EA: Useful for users that have made the
switch from our Indicator Combine product to our EA. This will copy over the
configuration and implement on the EA.
News Capture: Will get latest news from our website and store locally in a file and
parse into memory. Note, this is done every 24 hours automatically.
News Parse: Will just parse the local file with news events into memory.
Issue 3.3 Page 49 Runwise Limited (UK)
www.runwisefx.com
5.14 Advanced
Single trade per signal when in multi-trade mode: If ticked then will automatically
allow a trade signal to only enter on one of the available trades, when in multi-trade
mode. If unticked then will open multiple trades if get trade signal, when in multi-trade
mode.
Separate magic number per period/timeframe: If ticked then will auto allocate a
different magic number depending on the chart period. Useful if wish to trade multiple
time frames at the same time. Different magic numbers will allow the trades from the
different time frames to be managed separately.
Exit threshold explicitly based on indicators gone opposite: If ticked then will
change how exit threshold is calculated. The indicator will have to have gone
opposite direction to be counted for exit, i.e. if indicator no longer signalling buy or
sell then it won’t be considered.
Apply configured SL to any found orphan/external trades: If ticked then will apply
configured stop loss to found orphan/external trades, i.e. trades not opened by our
EA. This allows our EA to ‘take over’ the trade and use the SL you have configured. If
unticked (default) then will just use any SL the trade had.
Apply configured TP to any found orphan/external trades: If ticked then will apply
configured take profit to found orphan/external trades, i.e. trades not opened by our
EA. This allows our EA to ‘take over’ the trade and use the TP you have configured,
including partial closes. If unticked (default) then will just use any TP the trade had.
Master/Slave Auto/External Trade Copying: If using our Master/Slave mode,
mentioned in 5.3.2, then will open/close trades on the Slave(s) if sees trade
open/close on the Master, even if those trades are from external source (e.g. from
other EA) or automatic (e.g. due to configured trade rules). Provides trade copying of
automated trades seen on the Master. Can tick if open and/or close should be
copied. Note, doesn’t not copy SL or TP. Will just use SL/TP configured on Slave.
However, if trade closed on Master due to SL/TP then will close on Slave(s) if ‘Trade
close’ has been ticked.
Issue 3.3 Page 50 Runwise Limited (UK)
www.runwisefx.com
Max Market Move During Open Retry: If a trade can’t be opened immediately, e.g.
spread too high, slippage or broker returned temporary error, this input says how
many pips the market can move against you for the retry to still be allowed.
Max Time Away from Market for Restore After Restart: If not blank then will
restore settings if restart MetaTrader or close chart and re-open. For example, will
restore any pending orders or manually set SL, etc. This is done intelligently, so if
pending order reached whilst MetaTrader/PC was restarting then will be cancelled
when EA is running again. The value is the number of minutes can be away from live
market for this restore happen. Past this time the saved data is regarded as old and
won’t be restored. Note, time only includes when market is open, so fine to have your
PC turned off over the weekend if market closed, without increasing this time.
Point to Pip Divider: Can be used to override our auto setting of what a pip is
regarded as. If blank then automatically sets to classic pips, i.e. where 1 pip is a
0.0001 change for EURUSD, regardless of whether using ‘4 digit’ or ‘5 digit broker’.
So, if set stop loss to 20 pips then would exit EURUSD trade if price deteriorated by
0.0020. If set Point to Pip Divider to 1 then points will be used throughout the system,
where, for a ‘5 digit broker’, 1 pip is 0.00001 change on EURUSD. So, would need to
set stop loss to 200 to get the same exit as described for classic pips. Users trading
indices asset class might benefit setting this to 100 which will make each ‘pip’ one
basis points. Values should be multiples of 10, i.e. 1,10,100,1000 etc., with blank
being auto.
For symbols that have no digits after the decimal point for their ask/bid
prices then 1 pip will be 1 unit change in the price if EA input
Gen_pointToPipDivider1for0digits is set to true (default) and Point
to Pip Divider box is blank, i.e. auto.
Issue 3.3 Page 51 Runwise Limited (UK)
www.runwisefx.com
5.15 Statistics / Optimization
Used to control the statistics calculation and optimization. Note, Ultimate Trade
Manager users will also need our Indicator Combine product for this to work. Not
available in our free version of the panel. Contact us for upgrade.
Provides options to activate Strategy Builder mode by default on start-up and
whether to use a temporary file for configuration changes so doesn’t interfere with
current trading.
How far back the statistics calculation goes can be specified either in terms of bars or
days. Note, if both are supplied then bars will be used, so blank bars out if want to
use Days. The Days box can also contain a date range instead. Note, the end date
can be omitted, e.g. can just put 2021.01.15-
The Model Quality should be set to High if you are using a trailing stop loss. The High
mode uses M1 chart to more accurately following fluctuations in the price – needed
for trailing SL. Note, in MetaTrader 4 you may need to use the History Centre to
download chart data for the chart symbol so the M1 chart is fully populated.
Use the ‘Scope’ selection list to select what should be optimized and use START
button to begin optimization. If ‘Send bulk optimization Start press to all EAs’ then will
automatically request other instances of the EA on other charts to start optimizing as
well.
Optimization trigger allows optimization to be triggered automatically when market
closes, i.e. at the weekend. There is also an option to optimize continuously. Note, if
Issue 3.3 Page 52 Runwise Limited (UK)
www.runwisefx.com
optimizing continuously then will increase CPU load but the EA is designed to
prioritise live trading.
A ‘max draw down for profit improvement save’ allows you to specify a maximum
draw down where improvement profit will be saved, during optimization, provided
draw down does not exceed the given value and the improvement in profit is bigger
than any increase in draw down. If left blank then improvements in profit will only be
save if draw down remains the same or is less.
Activate Shift Setting Helper when run MT strategy test: Will activate a tool described
in the next section when you run a strategy test using MetaTrader’s Strategy Tester.
See next section for full details. Market processing off option will turn of live/demo
trading and use all CPU for optimization.
The results of the optimization, i.e. the settings that yielded
improvement, get saved to runwiseFX_optimResults.csv file in the
MQL4\files of your MetaTrader data folder (or MQL5\files on MT5).
With each improvement recorded on a separate row. Any fields with *
means that item did not change for the original run at start of the
optimization. The file is comma separated values that can imported
into other programs, such as a spreadsheet.
Note, ‘Market processing off’ option will prevent MetaTrader’s Strategy
Tester from being able to produce any results, as that simulates live
trading.
We don’t recommend trying to optimize the M1 timeframe. M1 is
generally regarded as random, so really no chance of optimized
settings being helpful going forwards.
5.15.1 Advance Optimization Settings
This allows you full control over the optimization process. The pop-up allows you
specify the items you wish to optimize, with each item on a separate row. Examples
of optimization items include indicator inputs, indicator priority, stop loss method, take
profit amount, etc.
After setup advance settings you use the ‘Advanced’ item in the Scope selection list
when using Start button to start optimizing.
So, let’s look in detail how you configure advance optimization. Here is the advance
optimization configuration pop-up. As mentioned, separate rows are used for each
configuration item:
Issue 3.3 Page 53 Runwise Limited (UK)
www.runwisefx.com
Groups are used to prevent the number of combinations from getting out of hand.
Each group is optimized in turn. So for example, could tick Group A for indicator
inputs and SL then use Group B for take profit. Tick which group you wish the item to
belong to. You can tick more than one to say re-optimize SL after other items have
been optimized.
The item column is where you select the item you wish to optimize. The following
items are available for selection via the [v] button:
i.* Indicator input optimization. Use # column to set which input wish
to optimize, number 1 upwards.Note, make sure you’ve configured
the indicator with the inputs up to and including the one you would
want to optimize in the Indicator Inputs box in CONFIG | Indicator
Values to Capture.
i.*.midPoint Allows Mid Point box of the indicator to be optimized.
i.*.period Allows Period box of indicator to be optimized. Recommend
leaving Min & Max blank and setting Step say to M15|M30|H1 etc.,
this will try those time frame periods in turn.
i.*.priority Allows Priority box of indicator to be optimized. 0 is Normal, 1 is
High and 2 is HighAndStart. To optimize Normal and HighAndStart
then set Min/Max to blank and set Step to 0|2
SL SL method, where -1 is fixed pips and 0 and above are the various
auto calculation methods, as follows: 0 = MovingAverage,
1=RunwiseFX, 2=ParabolicSAR, 3=ATR, 4=SwingHiLow,
5=RecentHiLow, 6=CustomIndicator, 7=BollingerBands,
Issue 3.3 Page 54 Runwise Limited (UK)
www.runwisefx.com
8=Envelopes, 9=Fractals
SL.value This will give the pips to use for fixed stop loss or if auto then will
be used to try the various properties of the calcuation method.
Note, the system will automatically scale the supplied min/max to
what is appropriate to the auto calcuation method.
SL.trail Optimize if stop loss trail should be on by default. Recommend
setting Min/Max to blank and set Step to 0|1
TP Take profit size, i.e. pips if Important_tpRiskRewardAsPips EA
input is set or risk reward ratio. Don’t forget to set # column with
target wish to optimize. If blank then will assume target 1.
TP.exit Take profit exit percentage.
TP.SL Take profit adjust of stop loss when take profit target is reached
TP.trail Take profit turn on trailing when target reached. Recommend
setting Min/Max to blank and setting Step to 0|1
TP.brkEven Take profit break even when target reached. Recommend setting
Min/Max to blank and setting Step to 0|1
exitThresh Exit threashold. If which to try exit on indicaotr on/off during
optimization then set Min/Max to blank and set Step to |100
This will try Eixt threshold of blank, i.e. off, and 100, where will exit
when configured indicators have gone in opposite direction.
The # column needs to be set if optmizing indicator inputs to say which input. Or, if
optmizing take profit to say which target. Note, all are numbered 1 and upwards.
Min/Max/Step gives the values to try during optimization. Note, you have the option
of leaving min/max blank and setting Step with values to try seperated by |. For
example, if optimizing moving average method could to set Step to
sma|ema|smma|wma, which would try those methods in turn.
Here are some examples:
Example 1) Optimize auto SL settings but keeping method the same, e.g. ATR
Firstly, configure system with the SL auto calcuation method you want to use via
CONFIG | Stop Loss. Then set the following line in Advance Optimization Settings
The system will automatically map the 1 to 100 to meaningful values for the
propreties that the auto calcuation method has, e.g. for ATR will try appropriate
Issue 3.3 Page 55 Runwise Limited (UK)
www.runwisefx.com
period and multiplers.
Example 2) Optimize TP profit levels
Again configure take profits via CONFIG | Take Profit, e.g. two levels using
risk/reward. Then need to add entries in Advanced Optimization for each level (use #
column to specify level number)
This will try various risk/rewards and exit % for two levels.
Example 3) Optimize indicator, SL & TP
Optimize F:MovingAverageCross built-in indicator, with certain different SL types and
risk reward ratio on single TP
Note, the step box on the third line is sma|ema|smma|wma
5.16 RunwiseFX Mobile App
Show status of mobile app connection to the EA. Our mobile app requires installing
our Windows application as well, which acts as a communications gateway and
allows you to configure password access. Please see www.runwisefx.com/app.
Issue 3.3 Page 56 Runwise Limited (UK)
www.runwisefx.com
6 SHIFT SETTING HELPER TOOL
The shift helper tool allows you to make sure the Shift box setting is correct in
Indicator Values to Capture pop-up, when capturing custom indicators. Having the
shift set incorrectly can cause misleading stats and trade entry/exit that doesn’t
match the indicator when you look back through the chart.
The tool displays the following panel which shows rows for each configured indicator
and if the various possible shift settings (5 to 0) are ok or repaint (!!). The ‘current’
column shows if your current setting is ok and will advise if change required, e.g. in
the screenshot below the ‘ts’ indicator needs its shift setting changed from 1 to 2 as
the current setting of 1 is repainting as ‘!!’ is shown. And indicator ‘tdig’ can have it’s
shift setting lowered from 2 to 1 as 1 isn’t repainting and want lowest possible value
that doesn’t repaint. Note, if see – then means shift isn’t giving buy/sell.
Here are the steps to use the tool:
• Got to CONFIG | Statistics / Optimization pop-up and tick ‘Activate Shift
Setting Helper when…’ option and click Save
• Click CONFIG | Copy to Tester button (towards lower right of that pop-up)
• Then run the EA in the MetaTrader’s Strategy Tester with Model set to
‘Control points…’ in MT4 or ‘1 minute OHLC’ in MT5. The symbol doesn’t
matter. Recommend period of M15. Also run in visual mode. You’ll see the
above Shift Setting Helper panel appear on the chart, while the test is
running.
• Keep test running until ‘bars/candles checked…’ comment in shift helper has
reached at least 250 but 1000-2000 better
After you’ve used to the tool you can update the Shift settings that were recommend.
Of course, do this on a normal chart, not in the Strategy Tester chart, so changes get
saved to configuration that will be used going forwards.
Be careful with indicators that check upper time frames. They often
repaint but that repaint isn’t apparent to Shift Helper Tool, as happens
after many more than the 5 candles that the tool checks. Tip: If wishing
to check upper time frames it is much better to use indicators that work
on the current time frame and set our Period box in CONFIG | Indicator
Values to Capture.
Issue 3.3 Page 57 Runwise Limited (UK)
www.runwisefx.com
Our Shift Helper tool goes a long way to making sure your Shift setting
is correct and the indicator value being captured is stable. However,
we always recommend still running your finished strategy in the
Strategy Tester in visual mode to check the trades made match your
indicators and also match the simulated trades if using our Strategy
Builder mode – see section 11
Issue 3.3 Page 58 Runwise Limited (UK)
www.runwisefx.com
7 MULTI-TRADE MODE
The EA can be configured to operate in a ‘multi-trade’ mode, where it can manage
multiple trades/pending orders for the same symbol and direction (buy/sell). Each
trade/pending order can have its own stop loss and take profit settings and operate
independently. [This is in contrast to opening additional tickets by Scaling-In, where
the same stop loss and take profit is used for all scaled-in tickets.] Each trade will
have a separate Magic Number (Expert ID), so the EA can keep track of which stop
loss / take profit relates to which open ticket.
Note, you can still scale-in in multi-trade mode, where the additional tickets will have
the same magic number as the trade they relate too.
To configure multi-trade mode, click CONFIG button | General Settings button and
enter number of additional trades/pending orders wish to have for any given
symbol/direction in the ‘Max Simultaneous Trades’ box. You can also enter multi-
trade mode by using the + button that appears when trade is open or pending order
is set.
In multi-trade mode a ‘Selected Trade’ selection box appears on the panel that allows
you to select which trade you wish to manage via the panel and see lines on chart.
For example, to change the stop loss for Magic Number 3 then select it first with
Selected Trade and then use the control panel/line on chart to adjust the stop loss.
Note, as always, moving a stop loss line on the chart will only work if SL mode is set
to MAN (manual).
Selected Trade selection box
Note, any trade rule controls shown at the bottom on the panel are, by default, not
specific to the selected trade, i.e. relate to all trades. However, they can be
configured to be per selected trade. This is done on a per control basis.
The dreaded FIFO rule: If you live in the US or use MetaTrader 5
(with netting type account) then the FIFO rule can get in the way of
being able to manage separate trades on the same symbol on the
same account. The FIFO rule prevents a trade from being closed if
there is an earlier trade (ticket) still open. Please bear this in mind if
your broker requires you to follow the FIFO rule and you wish to use
multi-trade mode.
Issue 3.3 Page 59 Runwise Limited (UK)
www.runwisefx.com
8 BUILT-IN INDICATORS
The EA is supplied with several built-in indicators. The first is shown within the
control panel that gives the direction the market is moving in with arrows on multiple
timeframes. The number next to the arrow is the pips moved in that direction and can
used to know how much of the move has been missed. Note, the timeframes shown
can be configured via the input property via CONFIG | Display | periods to calc.
Daily support & resistance lines can be shown via CONFIG | Display and also Daily,
Weekly & Monthly Pivots.
The average daily range is shown in the top left of the chart, together the percentage
of that range that the symbol has already done. If that percentage is approaching
100% or exceed 100% that it can be an indication that the symbol may not move
much more in the current trading day. Finally, the current spread is shown top right,
color coded if spread is high. The current ask/bid prices are show bottom left in large
text. Again color coded if the price is going up, down or the same (yellow). These
items can turned on/off in CONFIG | Display | Other tick boxes (top right of Display
pop-up).
Issue 3.3 Page 60 Runwise Limited (UK)
www.runwisefx.com
9 IMPORTANT CONSIDERATIONS
The EA must remain on the chart of the symbol for which a trade has
been opened. Otherwise, the hidden items, including breakeven and
auto exit will fail to work.
Your internet connection and login status with your broker must remain
in place for the hidden items, including breakeven and auto exit to
work. The broker stop loss and take profit will be the fallback if this
fails.
A smiley face ☺ is shown in the top right of the EA’s control panel that
indicates that the EA is allowed and is able to trade (including being
able to a close trade (say) when a hidden stop loss is hit ).
If you see a sad face then check trading allowed/login and internet
status, as the EA believes it is unable to trade and the hidden items
including auto exit and breakeven will not work.
Issue 3.3 Page 61 Runwise Limited (UK)
www.runwisefx.com
10 STRATEGY AUTOMATION
The built-in rules that the EA supplied with are capable of entering and exiting trades
when the configured indicators are in agreement. You can download additional rules,
e.g. exit before news or close all trades when equity target on account is reached
from our library at: http://www.runwisefx.com/library
Our EA can also be configured with more complex, bespoke, trading rules that can
alert, open/close trades, setup pending lines, adjust stop loss and more, based on
indicator/chart object values, candle values and other information from MetaTrader.
The rules can also be interactive with extra control panel items, such as tick boxes,
input boxes, buttons, etc. that the rules can act upon. If you are interested in
amending/writing your own rules the please see our document:
http://www.runwisefx.com/runwiseFX_CSA_Rule_Writing_Guide.pdf
We can also write bespoke configuration for you. Email us at:
support@runwisefx.com
Issue 3.3 Page 62 Runwise Limited (UK)
www.runwisefx.com
11 STRAEGY BUILDER
This section covers the Strategy Builder version of EA. This allows you
see real-time statistics of Win Ratio/Profit/Draw Down of the
configuration currently loaded. This is achieved much more
conveniently and faster than using MetaTrader’s own Strategy Tester.
11.1 Activating Strategy Builder Mode
Click CONFIG button and Click ‘Activate Statistics’ button shown at the top of the
pop-up. This will switch to Strategy Builder mode that will calculate and display
statistics for currently configured strategy/settings, i.e. currently configured indicators
and stop loss and take profit/exit regime, along with trading hours set in CONFIG |
General Settings.
You can de-activate Strategy Builder mode by press CONFIG button and press
button again.
Note, our stats works by looking back at the chart and using signals from indicators
shown on close of candle. It also can look at built-in stop loss methods and configure
take profit regime. It requires you to use non-repainting indicators. For more
complicated setups, e.g. using rules from our library or repainting indicators or
trading during candle then can use MetaTrader’s Strategy Tester.
11.2 Understanding Statistics Shown
• Trade Days is number of days tested. You can increase this by CONFIG |
Statistics / Optimization and setting STATS CALCULATION – how far back.
If Trade Days isn’t as high as you are expecting then you can use
History Centre of MetaTrader 4 or scrolling back if MetaTrader 5 to get
more chart data loaded. However, recommend restarting MetaTrader
after this. Also, make sure in MetaTrader Tools | Options | Charts |
Max Bars in Chart that the value there is large enough to
accommodate the number of bars you wish to test over.
• Num Trades is number of trades that occurred during trades days
• Trades per Day is the average number of trades that happened per day
Issue 3.3 Page 63 Runwise Limited (UK)
www.runwisefx.com
• Win Ratio % is the percentage of trades that did not result in loss
• Consec Win/Loss: Is the largest number of consecutive wins followed by
largest number of consecutive losses during the test days.
• Profit % is the profit made on the account start balance. The value in brackets
is the change since the previous configuration, which will go orange color if
worse. Note, if risk per trade is set to fixed amount then profit will be in that
amount. If risk per trade is set to fixed lots then profit will be shown in pips.
• Draw Down % is the maximum draw down that occurred during the test
period. The value in brackets is the change since the previous configuration,
which will go orange if worse, i.e. higher. As with profit, if risk per trade is set
other than percentage then will be shown in the same units as profit.
11.3 Refresh & Revert Button
The Refresh button will recalculate that the statistics, say if you have download
history data from the history centre. Note, refresh automatically happens if there are
any configuration changes.
The Revert button will re-load the configuration prior to the most recent change. This
button is useful if you make a configuration change that make profit and/or draw-
down worse (will go color orange) then simply press Revert to restore previous
configuration.
11.4 Show Other Chart Results
Use this tick box to see results from other EAs running on different charts. This
allows you test multiple symbols / timeframes at the same time. The pop-up also has
‘Change on Last’ row, which is the improvement (or not) of profit and drawn down
(DD) after a configuration change. Tip: You can use the Revert button to go back to
previous configuration if the change made things worse.
The Other Chart Results pop-up is as follows:
Issue 3.3 Page 64 Runwise Limited (UK)
www.runwisefx.com
11.5 EA Inputs for Strategy Builder
There are some extra EA inputs for Strategy Builder users:
Variable Description
How many rows are available to be edited
StratBuild_advOptimMaxLines
when click Advance Optimization button
Increase value to make arrows bigger
StratBuild_arrowFontExtra showing where simulated trades where
opened
Risk reward ratio to be used for profit
calculation when in Binary Options mode.
StratBuild_binaryOptionRiskRewardRatio
Value of 0.85 would mean you get 85%
return on amount risked if trade successful.
If true then will close any virtual trades that
are open at the end of the test and add them
to the statistics. Note, can cause fluctuations
StratBuild_closeTradesStillOpenAtEndOfTest
in stats if trade is indeed still open as profit
will depend on current live market price, if
market is open.
If set then will reduce balance by broker’s
commission charge based on trade position
size (lots) when trade is opened.
StratBuild_commissionPips Commission is expressed in pips, i.e.
amount of pips that gives the amount of
commission. A value of 0.5 is usually
appropriate.
Maximum trades to display on chart – does
StratBuild_displayMaxTrades
not affect statistics.
Increasing this value (say to 2) can increase
StratBuild_highModelPipResolution speed of testing in high resolution mode, but
at the expense of accuracy.
Number of bars/candles to show combined
StratBuild_indicatorDisplayBars indicator value at the bottom of the chart –
does not affect statistics
Issue 3.3 Page 65 Runwise Limited (UK)
www.runwisefx.com
Variable Description
Height in pixels of combined indicator value
StratBuild_indicatorDisplayHeight
shown at the bottom of the chart
How many lines to show when ‘show log’ is
StratBuild_logDisplayLines
ticked. This is used for debugging.
StratBuild_logDisplayWidth How wide log should be in pixels
If ‘Max Draw Down for Improvement Save’ is
set to AUTO then will allow solution if profit
StratBuild_maxDrawDownAuto-
improvement is greater the DD deterioration
MaxConsecLosers
provided no more than this number of
consecutive losing trades were encountered.
If true then will calculate and show statistics
when EA added to chart, i.e. on start-up. If
StratBuild_onByDefault
false then need to manually activate
statistics via CONFIG button
If true then when optimizing indicator it will
StratBuild_optimCopyIndiInputsTo copy the inputs to other instances of the
OtherInstances same indicator, provided they don’t have
optimization settings configured.
If true then will output all optimization runs
StratBuild_optimResultsAllInProfit
that were profitable.
If true then will output peak consecutive wins
StratBuild_optimResultsConsecWinLoss and loses to the optimization results CSV
file.
If true then will just output * for any columns
StratBuild_optimResultsOnlyOutputChanges in optimization runs where value didn’t
change.
If true then will output win rate % to the
StratBuild_optimResultsWinRate
optimization results CSV file.
Controls how ‘other chart results’ table is
ordered, i.e. if on profit or draw-dawn. This
StratBuild_otherChartsResultsOrder
can be used to show best performing
symbols/periods at the top.
Issue 3.3 Page 66 Runwise Limited (UK)
www.runwisefx.com
Variable Description
How long (in milliseconds) should the EA
calculate stats for before allowing EA to do
something else. Can decrease to make EA
StartBuild_processDurationMS
more responsive during stats calculation,
and increase it to focus CPU on calculating
stats.
If true then will show Experts log of status
change messages and alerts that happened
StratBuild_showExpertsLog
when running stats. Can be help to know
why not trading at a particular point.
If true then will show extra buttons to quickly
StratBuild_showQuickConfigButtons access configuration pop-ups rather than
having to CONFIG button first.
The spread to use when simulating trades,
StratBuild_spread
in pips.
Start balance to be used when calculating
statistics. Shouldn’t need to change, unless
StratBuild_startBalance
risking very big amounts (not percentage)
per trade and balance is getting down to 0.
How far back in bars/candles to run stats
StratBuild_statsBarsToCalcBack
over
If not -1 then will use the as number of days
StratBuild_statsDaysToCalcBack
to test for
If true then will show draw dawn relative to
StratBuild_statsDrawDownRelative current balance, instead of absolute which is
start balance.
Allows width of Symbol column to be
StratBuild_symbolWidth adjusted that is shown in the ‘Other Charts
Results’ pop-up.
Issue 3.3 Page 67 Runwise Limited (UK)
www.runwisefx.com
Variable Description
StratBuild_tradesFileOutput If set to On then will output simulated trade
details, including profit, to CSV file in
MQL4|5\files\runwiseFX folder of your
MetaTrader data folder. File name will begin
with ‘testTrades_’ and include symbol and
period. The first row of the CSV are the
column headings that should be self-
explanatory.
If Yes then will use close price of previous
candle for open price of simulated trade
used in the statistics. Recommend setting
this to true for Renko charts, especially
StratBuild_
Median Renko where open price of current
usePrevClosedForStatsTradeOpenPrice
candle isn’t very realistic. Can also be ‘Yes
And For Close’ where will also be used for
close price if closed due to trade rule (not
SL/TP).
Issue 3.3 Page 68 Runwise Limited (UK)
www.runwisefx.com
12 USING WITH MT STRATEGY TESTER
The EA can be run in the MetaTrader Strategy Tester. Don’t confuse with this our
stats/optimizer in ‘Strategy Builder’ mode. This section refers to using the Strategy
Tester that MetaTrader is supplied with.
The strategy tester can’t access any EA configuration you may have when the EA is
running on a normal chart. This is because the files folder the tester has access to is
in a different place to the files folder used on a normal chart. However, if you click
CONFIG button on the panel on a normal chart and click Copy Config to Strategy
Tester button. This will copy the EA configuration from files folder of normal charts to
the files folder used by the Strategy Tester.
For the EA panel buttons to work in the Strategy Tester then a test needs to be
running at least at market speed.
Don’t forget to use the Expert Properties button in the Strategy Tester frame to set
any EA inputs you require.
12.1 Optimizing Indicator Inputs
A number of User_* EA inputs are available that can be used to pass values from
MetaTrader’s optimizer into indicator inputs. For example to optimize an indicator
called Non_Repainting_SuperTrend_Alerts that has two numerical inputs you can
configure the indicator as follows, where {c.User_configNum1} and
{c.User_configNum2} expressions are used to provide values from the
corresponding EA inputs:
Then in the optimzer you can set the start/step/stop values like this:
Issue 3.3 Page 69 Runwise Limited (UK)
www.runwisefx.com
13 MULTI-ACCOUNTS
Multiple instances of the EA on different accounts, i.e. on different instances of
MetaTrader, can talk to each other provided they are on the same computer. This
can enable actions on one account to be automatically replicated on the other
accounts, using a master/slave principle. This approach works better than a trade
copier, as trades can be opened/closed at the same time, where a trade copier
needs to see the trade opened on one account before it can be opened on the other
and similar for close - creating an inherent delay.
To activate multi account support set the Multi Account box in CONFIG | General
Settings to Master for instance of MetaTrader that is the master (a M should appear
above the CONFIG button) and similarly set to Slave on the slave instance (a S
should appear). Actions performed on the master account should then be replicated
on the slave accounts.
If using multi-trade mode then make sure number of additional trades is the same on
Master and on Slaves
You can test the link via the CONFIG button | Tools popup on the
Master and click ‘Test Alert to Slaves’ button. This should cause an
alert on the Slave if comms link between master and slave is okay.
You can set EA input Obscure_masterSlaveSendMask to control
what is sent from the Master to Slave. Useful if want to make changes
on the Slave, e.g. adjust TP, that aren’t overwritten by similar changes
on the Master. See the description of the EA input in section 14 if
interested.
If the symbols are different between master and slave (often the case
with indices) then you can use EA input Gen_brokerSymbolTranslate
on the slave to handle this. For example, if set input to DE30=GER30
then will convert DE30 from Master to GER30 on Slave. Can add extra
symbols by comma separating them.
It's possible to have more than one Master on the same machine
talking to a different set of slaves by using EA input
Gen_commsChannel, which should be set the same on a master and
its slaves then a different value on the other master and its slaves, e.g.
use s1 an s2 for (say) Strategy 1 and Strategy 2.
It is possible to share the same configuration file across multiple
instances of MetaTrader on the same computer. To do this set
Main_configFileName EA input property to the configuration filename
and set Main_configInCommonFolder input property to true. The
configuration file should be placed in the common data folder. The
common data folder can be found by going to the Tools | MetaQuotes
Language Editor and then in that tool clicking on to File | Open
Common Data Folder menu.
Issue 3.3 Page 70 Runwise Limited (UK)
www.runwisefx.com
14 EA INPUT PROPERTIES
Many of these configuration items can now be more conveniently set
via the CONFIG button on the panel and the corresponding
configuration pop-ups. We recommend using this route to configure the
system as more user friendly. The inputs remain for backwards
compatibility and for more obscure/cosmetic items, such as colors
used.
Configuration changes made via the CONFIG button pop-up take
precedence over what is set in these EA inputs. However, you can use
the ‘Reset/Revert to Inputs’ button at the bottom of the CONFIG pop-
ups to clear CONFIG changes and use the EA inputs instead.
Any changes to the EA input properties can be applied to other charts
by saving a template within MetaTrader and then applying that
template to other charts. Please consult the MetaTrader help file on
this.
Variable Description
StratBuild_* See section 11.5 if these inputs are present
Set to true if your broker requires stop loss/take
profit to be set in the order send command –
some European brokers require this else will
Important_brokerSLTPSetOnOrderSend
return error. If false then any broker stop
loss/take profit will be set immediately after
trade open – ECN accounts usually require this.
Set to false if your broker does not support
hedging. This will prevent the EA from trying to
Important_brokerSupportsHedging
automatically open trades in the opposite
direction to any that are currently open.
Important_defaultStopLossMode Default stop loss mode
Important_defaultStopLossTrail Default setting for the stop loss trail tick box
Magic number for trades that the EA opens. The
Important_magicNumberToUse EA will ignore trades with a different magic
number (now often called Expert ID).
Issue 3.3 Page 71 Runwise Limited (UK)
www.runwisefx.com
Variable Description
If not set to -1 then activates multi trade support
with each trade having a different magic number
(now often called Expert ID). This input gives
the maximum that will allocated and represent
Important_magicNumberToUseMax the maximum number of trades the EA can
handle. Note, a different trade is required if want
two or more trades in same direction (e.g.. buy)
with different stop loss / take profit / pending
orders.
Lot size to be used if risAmount is not set
(blank). If this input is set the
Important_lots Important_riskAmount should not be, i.e. be
blank. The value can still be changed on the
control panel.
Risk amount to be used. Can be % of
account/equity (whichever is smaller) or fixed
Important_riskAmount
amount (omit percentage). The value can still
be changed on the control panel.
If set then when strategy testing the auto mode
Important_strategyTestTradeContinuous will be set to ‘trade continuous’, regardless of
the setting of Main_defaultMode
If supplied then will use this symbol for
open/close/modify rather than current chart
symbol. Useful for MT5 Renko charts (say)
Important_symbolForTrade
where chart symbol can be synthentic and the
symbol it’s based on needs to used with the
broker.
If set then any supplied values in EA input
Important_tpRiskRewardAsPips Important_tpRiskRewardRatios will be regarded
as pips rather than as risk reward rations.
Take profit risk reward ratios (comma
separated) for each level. If value followed by ‘p’
Important_tpRiskRewardRatios then will be regarded as pips (this happen
without the ‘p’ if Important_tpRiskRewardAsPips
is set).
Take profit exit percentages (comma separated)
Important_tpExitPrcts
for each level
Issue 3.3 Page 72 Runwise Limited (UK)
www.runwisefx.com
Variable Description
Stop loss adjustment to be made when take
profit target price is reached. Values are
comma separated for each level. Can be
number of pips to set SL to, or can be set to
RAISE to raise SL to previous target, or open
price if first target. Can be set to STEP to trail
Important_tpAdjustSLasTargetsReached
stop loss just when profit target is first reached.
Can also contain | followed by BE or TRAIL or
BETRAIL. This will set break even tick box
or/and trail tick box when take profit line is
reached.
Additional pixels to add between control panel
Main_additionalGUISizing GUI items. Useful if system font sizing above
normal is being used.
Main_alert* Allows various alerts to be turned on and off
Allows the trade signal alert text to be changed.
Supports curly bracketed operands in order to
insert extra information. For example, to include
Main_alertTextTradeSignal the account number in the alert text then set to:
Trade open signalled on #{a.acctNum}
{t.symbol} for {t.buySellUC}{t.tradeID}
@{t.alertPrice}
Will permit another alert/trade when rules signal
in the opposite direction. If this is set to false
Main_autoClearAlertOnOppositeSignal then rules will need to issue RESET_ALERT
command in order to permit a trade on a fresh
move.
If set then auto clear will only happen on new
candle or configuration change. This will
prevent repeated alerts when rules are
Main_autoClearOnlyOnNewCandleOrConfig
straggling the buy/sell situation on a per tick
basis, as the reset will only happen on a new
candle.
Days used for ADR calculation. Recommend
Main_averageDailyRangeDays
leaving as is.
Main_averageRangeCorner Chart corner where ADR is displayed
Issue 3.3 Page 73 Runwise Limited (UK)
www.runwisefx.com
Variable Description
Main_averageRangeMode Switch from ADR to ATR (Average True Range)
Period used for ADR/ATR calculation, e.g.
Main_averageRangePeriod
number of days if daily (D1) time frame.
Time frame used for ADR/ATR calculation. If set
Main_averageRangeTimeFrame to current then will use time frame of chart EA is
running on.
Main_averageRangeX X location of ADR
Main_averageRangeY Y location of ADR
Pip profit below which breakeven close will
Main_breakevenThresholdPips
occur (if set)
Minimum number of seconds between requests
to broker to modify trade, i.e. set broker stop
Main_brokerModifyMinFreqSecs loss / take profit. Acts as safety net to prevent
broker from being bombarded with modify
requests too frequently. Leave as is.
Pips difference between calculated broker
Main_brokerSLTPAdjustmentThresholdPips
SL/TP and actual for modification to happen
Extra pips to add to hidden SL for broker SL (or
Main_brokerStopLossExtraPips
% of Daily Range)
If true will modify broker SL if hidden SL is
Main_brokerStopLossMoveWithHidden
moved
Extra pips to add to hidden TP for broker TP (or
Main_brokerTakeProfitExtraPips
% of Daily Range)
If true will modify broker TP if hidden TP is
Main_brokerTakeProfitMoveWithHidden
moved
Allows various confirmation message boxes to
Main_confirm*
be turned on and off
Issue 3.3 Page 74 Runwise Limited (UK)
www.runwisefx.com
Variable Description
Says if configuration file should be auto re-
loaded by the EA on changes made by another
instance of the EA. Can be set to No, ‘On File
DateTime Change’, when it sees date/time on
file has changed or ‘On Config Change’ where
Main_configAutoReReadUponChange
other EA has sent out message to say file
changed. Recommend last option, as the file
date/time can cause unnecessary re-reads, say
if another instance has updated config to save
it’s optimization settings, which only relate to it.
If set then this file will be used as the
Main_configFileName
configuration file for the EA.
If set the common data folder will be used when
reading/writing the configuration file of the EA.
Main_configInCommonFolder This can be used to share the same
configuration file for multiple instances of the EA
on different accounts.
Should be set if configuration file has been save
Main_configInUnicode
in Unicode (international) format
Default rule mode to be used when EA loaded
Main_defaultMode
onto chart
Default period to be used when EA loaded onto
Main_defaultPeriod
chart
This is for use by RunwiseFX. We may ask you
Main_diagnosticMode put in diagnostic mode but the file generated is
only suitable for us to read.
Control how trades are closed. ‘When Possible’
will follow FIFO rule, where possible, i.e. won’t
go as far as closing trades not managed by EA,
Main_fifoMode
where ‘strict’ will. The ‘first in last out if scaled’
will close last opened ticket on a scaled-in trade
first.
If set then will automatically connect with
Main_GUIautoConnect
Windows GUI if present
Issue 3.3 Page 75 Runwise Limited (UK)
www.runwisefx.com
Variable Description
Comma separated list of magic numbers that
will be used for signal service. Used if
Main_magicNumbersForSignalService corresponding value on GUI is blank. Note,
must have allocated magic numbers using
Important_magicNumber*
If set then will put stop loss to manual mode
Main_manualStopLossAfterOpen when a trade is opened. This allows it to be
adjusted by moving the line on the chart.
If set then will put take profit to manual mode
when a trade is opened. This allows the take
Main_manualTakeProfitAfterOpen
profit lines to be adjusted by moving the lines on
the chart.
If > 0 then will keep free margin of specified
percentage. The lot size will be reduced
accordingly on newly opened trades. If lot size
is being limited in this way then will show in
orange color on the panel. The formula looks at
existing open trades and subtracts the negative
Main_minMarginToKeepFreePrct
affect they could have on balance. If < 0
negative value then will use different formula
based on current free margin and reducing lots
such that the supplied percentage of margin will
be left free. Again if lots is being limited by this
input then will show as orange on the panel.
Maximum slippage when opening tickets, if
negative value then means multiple of current
Main_maxSlippagePips
spread, e.g. if set to -1.5 then allowed slippage
will be 1.5 * current spread.
If >= 0 then will give the maximum number of
pips that a trade will be regarded as breakeven
for the purposes of the Martingale calculation. If
Main_martingaleBreakevenMaxPips
breakeven then will not reset Martingale but
won’t count it as losing trade either, i.e. won’t
increase martingale level.
Issue 3.3 Page 76 Runwise Limited (UK)
www.runwisefx.com
Variable Description
Used to control how lots are adjusted for
Martingale. If left blank then turns Martingale
off. Can either be a numeric value which is
multiplied by lots of last losing trade for symbol,
e.g. if set to 2 then will open trade with double
Main_martingaleLotsAdjust
previous losing trade lot size. Or, it can be a
comma separated list of lots, which are indexed
by number of consecutive losing trades. If
reaches end of list then no Martingale will be
performed.
If >= 0 then gives maximum number of
Main_martingaleMax
Martingale levels that are allowed.
Says what to do after Martingale maximum
number of levels has been reached. Can either
Main_martingaleMaxAction
reset to first level or stop Martingale, where lots
will stay as configured on the panel.
Maximum spread for which a trade open will be
allowed to go ahead, in pips. Useful to prevent
Main_maxSpreadForAutoTradeOpen
the EA from automatically opening a trade when
the spread is especially bad.
As Main_maxSpreadForAutoTradeOpen but for
when a trade is manually being opened. If -1
Main_maxSpreadForManualTradeOpen
then will turn check off, i.e. won’t check spread
on manual trade open button press.
If true will alert/trade pending when bid price
Main_pendingBuyOnBid
reaches target price
If true will cancel pending order in opposite
Main_pendingCancelOther
direction when pending price is hit.
If true then when trading rules have temporarily
disabled pending orders, e.g. due to indicator
Main_pendingCancelIfHitButDisabled
value, then if pending order target price is hit
then the pending order will be cancelled.
If > 0 then will automatically expire pending
Main_pendingExpirySecs orders after this amount of time. Note, this is for
both pending orders set manually and via rules.
Issue 3.3 Page 77 Runwise Limited (UK)
www.runwisefx.com
Variable Description
If true and pending order set to operate when
closed price is beyond target price then it will
Main_pendingOnCloseActOnPrice- ensure that price hasn’t gone back after close.
AtOrBeyondClose This is achieved by changing pending mode to
TT (trade on touch) when close price has
reached target pending price.
If true then if pending set to TC (trade on close),
or AC, then will use Heiken Ashi close price (as
Main_pendingOnCloseUseHeikenAshi configured by input
Obscure_indicatorHeikenAshiClose) rather then
close price of ordinary candle.
Comma separated list of periods for which the
Main_indiDirPeriods built-in direction arrows should be calculated
and shown for
If set the will shown the built-in direction arrows
Main_indiDirShow
on the control panel of the EA
Main_hideAlertSignalLines If true then will hide horizontal alert/signal price
lines that indicate the price at which an
alert/signal happened.
Main_hideSLTPUnlessPendOrOpen If true then will hide SL & TP lines unless
pending order is set or trade is open
If set then the hidden take profit lines will not be
Main_hideTPLinesIfTradeNot shown until a trade is open or if it has been set
OpenUnlessSetManual to a specific price. This can be useful to de-
clutter the chart prior to trade open.
If take profit line has been reached/taken and
Main_hideTPLinesWhenTaken trade still open then the take profit line will no
longer be displayed.
Maximum slippage allowed when
Main_maxSlippagePips
opening/closing trades, in pips
If not empty will allow format the stop loss line
to this text. Can include curly bracketed
Main_lineTextStopLoss
expressions, e.g. to show current profit. See
Appendix D for examples.
Issue 3.3 Page 78 Runwise Limited (UK)
www.runwisefx.com
Variable Description
If not empty will allow format the take profit
line(s) to this text. Can include curly bracketed
Main_lineTextTakeProfit
expressions, e.g. to show current profit. See
Appendix D for examples
If not -1 then can be used to limit the calculated
lots between a supplied min and max value.
Note, if Main_riskAmntAsAmntPerPip is set
then gives min/max amount per pip.
Main_lots[Min|Max] If set to -2 then will use min/max lots as
supplied from your broker. Note, for
Main_lotsMin this could mean rounding up lots
that are calculating below minimum to the
minimum, which could increase intended risk.
If true then will only capture indicator values on
new one minute candle, or if price reached new
Main_optimizedProcessing low or new high in that candle. Can be useful for
reducing processor load when lots of indictors
are being captured on many charts.
If true then will allow risk setting to be changed
Main_panelShowDualRiskSettings
on the panel on per direction basis
If true then will allow period setting to be change
on the control panel. The period setting is used
Main_panelShowPeriodSettings for such things as the time frame for automatic
stop loss calculation and the pending order on
candle close
If true then will set broker SL & TP with broker
Main_pendingBrokerSetSLTP pending order if EA input
Main_pendingImplementation is set for broker.
If true then opening of pending will cancel any in
Main_pendingCancelOther
other direction
If > 0 then will give an expiry for pending orders,
where they will be automatically deleted after
the specified duration of time (in seconds). The
Main_pendingExpirySecs
timer starts when the pending line is placed on
the chart either manually via the panel or via a
configured rule.
Issue 3.3 Page 79 Runwise Limited (UK)
www.runwisefx.com
Variable Description
Controls if hidden or broker pending orders
should be used. Hidden allows max features
and isn’t susceptible to spikes in spread/ask
price. Hidden always works with bid price, which
is the price you see in the charts and what
indicator calculate to. Hidden pending orders
Main_pendingImplementation
are managed by the EA, where opens market
order when pending target reached. Broker
means setting pending order with the broker.
Can select to add on spread of buy pending
orders, as those work on ask price if set with the
broker.
If the EA is in auto mode ‘PND’ then this gives
the number of pips to offset the pending order
from the market price, which is placed when
Main_pendingOffsetOnSignalPips
there is trade open signal. The value can be
expressed as pips or as a percentage of the
Average Daily Range of the symbol.
Used to control log message and alert if
processing is taking too long both on receiving
tick from market and in timer processing. Simply
Main_performance* leave as is and only change if directed by us.
Values are in milliseconds and say how long
processing has to take before log message
and/or alert. Set to -1 to turn off alerts.
If -1 then will get pip value per lot from broker
but will verify with recent trades, as sometimes
value from broker (tick value) can be wrong. If 0
Main_pipValPerLot
then will only user value from broker. If > 0 then
will use this value. Pip value is amount a pip is
worth in the account currency for 1 lot traded.
If true will reset settings, e.g. SL & TP, to default
Main_resetAfterTradeClosed
after trade closed
Issue 3.3 Page 80 Runwise Limited (UK)
www.runwisefx.com
Variable Description
If > 0 then will save & restore settings if
shutdown/restart MetaTrader. The value is how
many minutes you are allowed to be away from
the live open market for restore to happen. This
prevents sudden trades if been away for too
long and restored data would be out of date. If
outside this time limit then data set to default.
Main_restoreStateMaxMins
Note, time limit does include weekends when
market is closed, i.e. can shut computer down
over weekend without penalty, but watch out
don’t run into Australian session that starts
Sunday evening. If set to -1 then turns this
feature off. Also see
Main_restoreStateMaxMovePrct below.
This is used when EA input
Main_restoreStateMaxMins has been set, i.e.
not -1. It says how much price is allowed to
have moved, whilst MetaTrader was shutdown,
for Auto Mode to be kept on auto. This is used
Main_restoreStateMaxMovePrct
to prevent sudden entries at a terrible price. The
value is a percentage of how much the price is
allowed to have moved. If beyond this then EA
will be put into alert only mode for that symbol
and you will be alerted this has been done.
If true will interpret any supplied risk setting that
is not a percentage, i.e. is an amount, as the
Main_riskAmntAsAmntPerPip
amount per pip that the lots should be
calculated for.
If not blank then will be used for the minimum
risk pips used in the lot size calculation. Can be
Main_riskMinPips
used to limit lot size if the stop loss is very
shallow.
Main_scaleInPrctDefault Default percentage to scale-in by
If true will interpret scale-in percentage value
Main_scaleInLotsInsteadOfPrct
directly as lots
Additional text to be included in screenshot file
Main_screenShotExtraText
names
Issue 3.3 Page 81 Runwise Limited (UK)
www.runwisefx.com
Variable Description
Take screenshot when particular events
happen. Set to true to take screenshot for event
that the particular input relates to, e.g. auto
trade open. Screenshots appear in the
Main_screenShotOn*
MQL[4|5]\files directory of the Data Folder and
start with ‘rwfx_ss_’. Further control of
screenshots can be made via inputs
Gen_screenShot*.
Take screenshot when trade is opened
Main_screenShotOnManualOpen
manually.
Main_selection* Allows various selection lists to be altered
Main_show* Allows various items to be shown or not
Used when stop loss is set manually (moving
line on chart) and trade is not open yet. Won’t
open trade if stop loss is less than this, e.g.
Main_stopLossMinManualPips market price come very close to the set stop
loss. Can be used to avoid a very shallow stop
loss with potentially high lot size calculation and
a quick close due to stop loss.
Min/max of calculated stop loss (can be % of
Main_stopLoss[Min|Max]Pips Daily Range). This is applied in both AUTO and
RULE stop loss modes.
Controls whether the close price or market price
is used when setting stop loss. Can be No, i.e.
Main_stopLossCalcOnClosePrice use market price, Yes or TrailOnly, where the
close price will be used but only when trailing,
else market.
Will offset the AUTO stop loss by the supplied
number of pips. If positive value then will
Main_stopLossOffsetPips increase stop loss and a negative value will
reduce. Note, the new value will then be subject
to the configured min/max.
If set to true then will only check for hidden stop
Main_stopLossOnClose loss hit on candle close, i.e. new candle has
opened.
Issue 3.3 Page 82 Runwise Limited (UK)
www.runwisefx.com
Variable Description
If set then will trail stop loss at discrete steps of
size supplied by this input. Can be expressed
Main_stopLossTrailStep
as pips or percentage of daily range if % sign
added.
If not blank and Main_stopLossTrailStep not
blank then will change stop loss mode to this
Main_stopLossTrailStepMode
when trail step occurs. Can be used to (say)
tighten stop loss when step level first reached.
If set then when trailing SL in mode of AUTO or
RULE it will use the stop loss pips at the time
the trade was opened as the trail distance. If
Main_stopLossUseCalcValueAtOpenForTrail
false then the any trailing SL will move based
on the latest indicator value being used for the
stop loss.
Will write result totals, e.g. profit factor, of
MetaTrader Strategy Test to a ‘runwiseFX’
folder in the Common Data Folder. The file will
Main_strategyTestOutputResults
start with ‘testerResults_’. This input is not
related to our Strategy Builder functionality, i.e.
our own statistics.
If set then will be used in filename of the results
file mentioned in
Main_strategyTestOutputAltName
Main_strategyTestOutputResults, instead of
including test symbol.
If set then will speed up MetaTrader’s Strategy
Main_strategyTestHighSpeed
Test but without reducing accuracy of testing.
If set to other than -1 then will only evaluate
Main_strategyTestHighSpeedExtraLowHr rules on bar open when strategy testing if hour
of server time is less than this hour.
If set to other than -1 then will only evaluate
Main_strategyTestHighSpeedExtraHighHr rules on bar open when strategy testing if hour
of server time is greater than this hour.
Issue 3.3 Page 83 Runwise Limited (UK)
www.runwisefx.com
Variable Description
If true then only trades (including alert, etc., if
Auto Mode set to that) if fresh signal, i.e. reset
has happened. If false then will continuously
Main_TradeOnlyOnFreshSignal trade (again depending on Auto Mode) if entry
conditions are valid even if say after a SL or TP
hit. Recommend keeping to true so EA doesn’t
over trade.
If trade open fails with error or spread too high
(see Main_maxSpreadFor*) then gives the
maximum number of pips that price can move
Main_tradeOpenRetryMaxMovePips
from original attempt for a retry to be allowed
(can be specified as pips, e.g. 6 or % of Daily
Range, e.g. 5%).
If trade open fails then gives how long will open
will be retried for. This is in seconds, but if
negative value then number of bars/candles,
Main_tradeOpenRetrySecs
e.g. value of -1 will retry for number of seconds
in one of chart candles, which would be 900
seconds if EA running on a M15 chart.
Allows you to specify the trading days, i.e. days
of the week, that the EA is allowed to auto
trade. The values are comma separated, which
Main_tradeDays gives day of week where Sunday=0,Monday=1
etc. For example, to only trade Tue-Thu, set
Main_tradeDays=2,3,4
If left blank then will trade any day.
Allows trading time to specified. Up to two start
and ends per day are supported. All times are in
server/broker time. For example to only trade
between 10:00-19:00 server time, set:
Main_tradeTimeStartHours=10
Main_tradeTimeEndHours=17
Another example, to only trade 10:30-12:30 and
14:30-16:30,set:
Main_tradeTime*
Main_tradeTimeStartHours=10
Main_tradeTimeStartMins=30
Main_tradeTimeEndHours=12
Main_tradeTimeEndMins=30
Main_tradeTimeStart2Hours=14
Main_tradeTimeStart2Mins=30
Main_tradeTimeEnd2Hours=16
Main_tradeTimeEnd2Mins=30
Issue 3.3 Page 84 Runwise Limited (UK)
www.runwisefx.com
Variable Description
Can be used to reduce end time of when EA is
allowed to auto trade on a Friday. This is useful
to finish trading earlier on Friday before markets
Main_tradeTimeFridayReduceMins close for the weekend. The value is in minutes,
so to stop trading an hour early than specified in
Main_tradeTime*, set
Main_tradeTimeFridayReduceMins=60
If true will allow a trade to be opened where a
Main_tradeWithoutStopLossAllowed
stop loss has not been set.
Allows processing performed periodically to be
Main_timer* adjusted in terms of frequency performed.
Shouldn’t need to change theses.
If true will add spread to calculated take profit
Main_tpAddSpread
risk reward ratio prices
Extra pips to add to the calculated take profit
price, when calculated using a risk reward ratio.
Main_tpExtraPipsToAdd
Can be used to add extra pips to cover
commission, for example.
Use Ask price for hidden stop loss and take
Main_useAskForSLTP
profit where it would be used if broker
Use to position GUI control panel where you
Box_*
would like
Style_* Use to control the style of the various lines
Color_* Use to control the color of various items
If true will add spread to stop loss when
Obscure_addSpreadToSLWhenDeterminingRisk determining risk, as spread needs to be paid
when stop loss is hit
Issue 3.3 Page 85 Runwise Limited (UK)
www.runwisefx.com
Variable Description
Shifts advance labels, say for SL/TP/Pending,
over to the right of the price action. Value of 2
will mean labels are offset by 2 from live candle
Obscure_advLabelSpacingBars
thus creating one candle gap. Note, input only
used if MetaTrader’s Chart Shift has been set to
create sufficient space for the setting.
If true then will move SL/TP/Pending line labels
Obscure_advLabelMoveWithChart if you scroll back your chart, such tha the line
labels remain visible & accessible.
If true will allow the EA to be used in the
strategy tester in non-visual mode. Note, this is
Obscure_allowNonVisualTesting
set to false by default so the EA doesn’t fail
submission test to Market.
If true then will apply any configured
min/max/offset in CONFIG | Stop Loss pop-up
Obscure_applyMinMaxOffsetToSLInRuleMode
to the stop loss when in RULE mode. If false
then only applies those in AUTO mode.
Obscure_autoFixConfiguration If true will auto add default trade rules if
indicators defined for buy/sell but not rules
present to act up on them.
Obscure_blockClicksAfterGUIcreateMS If greater than 0 then will block any click events
for a short time after GUI re-create. Value is in
milliseconds, e.g. set to 1000. Input added for a
user whose system sent in a spurious click after
GUI was re-created, which happens on things
like panel move, Lines button press, etc.
Obscure_blockManualTradeCloseOnExitFilters If true will block manual trade close if any exit
filters are active (blocking exit), i.e. from ‘Filters
– Exit’ section of our library.
Obscure_blockManualTradesIfNoAutoEntryMode If true will block manual trades if auto entry
mode is not set to trade. Useful to prevent
accidental manual trades if (say) draw down
limit reached and account management rule has
turned off auto trading.
Issue 3.3 Page 86 Runwise Limited (UK)
www.runwisefx.com
Variable Description
Obscure_blockManualTradesOnFiltersEtc If set then will block manual trades if items like
filters and trade hours are not in agreement.
The SELL and BUY buttons will go grey if
manual trades are blocked. If set to ‘Set Based
on CONFIG | Option’ then will block on filters if
option is ticked in CONFIG | Options | Allow
filters to block manual trading.
Obscure_breakEvenDontAllowUntickOnceTicked If true then won’t allow break even to be
unticked once it has been ticked
Obscure_captureDailyRange If true then will capture daily range which is
used at the top left corner of the chart (by
default) and if % used when specifying pips.
Can set to false to use bit less CPU.
If true then will adjust chart foreground if panel
Obscure_chartForegroundAdjustOkay positioned to the left, so that candles appear
behind the panel.
If true then will look at all tickets on the account
when looking at trades that have closed, e.g.
Obscure_closedTicketsFromEntireAccount used for account profit/loss, martingale, etc. If
false then will only look at closed tickets with the
magic numbers that the EA is configured for.
If true then check on consecutive losing trades
Obscure_consecLosingTradesForSymbolOnly
will be for the symbol only.
If true then if creating pending order the line will
be unpinned by default with a view to the line
Obscure_createPendingUnpinned being moved manually to the correct price. Just
saves you from unpinning line first, i.e. saves
you from an extra click.
If true set background rectangles to be behind
Obscure_displayBlockABackground
candles as well
Used in library rules such as d-i that display
Obscure_displayInputsLen indicator inputs on the chart. Gives maximum
number of characters to be shown.
Issue 3.3 Page 87 Runwise Limited (UK)
www.runwisefx.com
Variable Description
If true uses dual edit boxes to get over 64
character limit of edit boxes shown in CONFIG
pop-ups. The dual edit boxes are shown next to
each other and are concatenated together on
Obscure_dualEdit*
save. Note, if configuration contains long items
then these inputs will automatically be set to
true, so configuration can be successfully edited
without truncation.
Allows any loaded exit filters from the library to
not just block exit rules, e.g. indicators gone
Obscure_exitFilterAdditionalScope
opposite, but also hidden SL, TP, break even,
multi trade account closures, etc.
Width in pixels of the pop-up selection list for
Obscure_guiListBoxPopupWidth
rule GUI controls of type List Box.
If true then will hide Scale-In button on the
Obscure_hideScaleInButton
panel when trade is open.
Custom indicator to use in order to Heiken Ashi
Close price, when configured to do so. Format
Obscure_indicatorHeikenAshiClose is comma separated with indicator name for
MT4,color index for MT4, indicator name for
MT5, color index for MT5
If true then will keep support, resistance and
pivot lines shown even if Lines button on toolbar
Obscure_keepSuppResPivotLinesShown
has been toggled to hide other lines, such as SL
& TP.
If true then a signal on trade index 1 or above
won't prevent trade on index 0 when in multi-
trade mode and have 'single trade per signal'
Obscure_mainTradeIsIndex0Mode ticked in CONFIG | Advanced. Example where
needs to be true is filter f-nmto, where don't
want signal for indexes 1 or above to block main
trade index 0.
Issue 3.3 Page 88 Runwise Limited (UK)
www.runwisefx.com
Variable Description
Controls what is sent from Master to Slave
when in multi-account master/slave mode.
Useful if want to make some adjustments on
Slave, e.g. take profit, which is not overwritten
by a similar change on the Master. Works as a
bitfield, where if bit is set then will send to slave.
Only needs to be set on the Master. Set to the
sum total of what you want to send. 1=open,
2=close, 4=scaleIn, 8=GUI button clicks, 16
(reserved), 32=SL mode/price, 64 = SL trail
Obscure_masterSlaveSendMask
on/off, 128 = break even on/off, 256 = pending
orders, 512 = auto entry mode changes, 1024 =
exit mode changes, 2048=take profit, 4096=GUI
tick box clicks, 8192=GUI edit box changes,
16384=GUI select list changes. For example, to
send open, close and SL mode/price then set
input on the Master to 1+2+64, i.e .67, as this
will set the necessary bits. The default of 65535
will set all the first 16 bits, i.e. enable everything
mentioned.
If true then will check entry configured filter
rules okay before sending trade to slaves,
Obscure_masterSlaveAutoSendCheckFilters
when in Master mode and enabled sending on
auto trades.
If true then will check max tickets on account
Obscure_masterSlaveAutoSendCheckMaxTickets before sending trade to slaves, when in Master
mode and enabled sending on auto trades.
Number of ticks of current bar/candle for when
regarded has having new bar. If > 1 then allows
extra ticks after new candle formed before EA
Obsure_newBarTickCount
will execute rules that start with ‘New Bar’ (N)
flag. Useful if indicators need extra ticks to
calculate before can be examined.
Obscure_pendingButtonsOnToolbar If true then place SELL and BUY PEND buttons
on toolbar rather than on main part of the panel.
Especially users that don’t usually require
pending orders may wish to this to true.
Issue 3.3 Page 89 Runwise Limited (UK)
www.runwisefx.com
Variable Description
If true then will show our original compact
selection list for selecting pending mode when
panel ‘Pending:’ drop-down is clicked. This is a
Obscure_pendingFastModeSelection
shade faster as doesn’t require a Save button
click. However, our new pop-up has more
options.
If true then will, by default, calculate SL/TP and
lots based on pending order if pending is set.
Obscure_pendingPreviewDefault You can make on-the-fly change to ‘preview
pending’ via ‘Pending:’ drop-down list on the
panel.
Used visually when risk reward is being
displayed, e.g. on the panel / horizontal line
Obscure_riskRewardRatioDisplayDigits
text. Gives number of digits to be shown after
the decimal point.
Used when capturing standard indicators (not
custom) to provide stop loss. Value of 0 means
live candle and 1 is closed candle. If using our
Obscure_shiftForSLAuto
stats to tune your strategy then recommend
setting this to 1 as this will match the closed
candle values that stats works with.
(used by us when recording videos – please
Obscure_showAllControls
ignore)
If true then will show option in CONFIG |
Options which if ticked allows configuration to
be set for current symbol/period by default.
Obscure_showOptionPerSymPeriod However, have to be careful with this option as
danger can end up making changes per
symbol/period that are actually meant for all
charts.
If true then will recalculate Exit % for take profits
Obscure_signalsTPhandleVaryingNumberOf based on number of take profit levels contained
Levels in the signal alert text, when using the Signals
system of our Windows app.
Issue 3.3 Page 90 Runwise Limited (UK)
www.runwisefx.com
Variable Description
Can be used for offline charts, e.g. Renko
charts, where the chart may not be receive
market ticks. If true then will simulate these ticks
Obscure_simulateRealTicksInTimer using the EA’s timer processing. Note, you
shouldn’t need to set this input anymore as auto
detection of simulate real ticks required has
been added.
Obscure_snapPixels How close mouse needs to be to
Open/High/Low/Close (OHLC) for snap to
happen, in pixels
Obscure_snapBars How many extra bars/candles will look back for
a OHLC to snap to, when mouse is to the right
of the candles. If mouse is on a candle that will
snap to OHLC of that candle.
Obscure_snap* Sets whether snap is turned on/off by default.
Three inputs are provided for snap on stop loss,
take profit and/or pending.
Obscure_snap*Offset Default pip offset for the snap. Can be used to
add extra pip(s) to OHLC price. Set to number
of pips required. If positive value then will be
treated as breakout offset, e.g. added to high
price and subtracted from low price. If negative
then offset done the other way around.
Obscure_snapToTickSize If set to -1 (default) then will snap SL/TP and
pending lines to tick size as reported by the
broker. Or can set to manual value, e.g. 0.25
will move lines in steps of 0.25. If set to 0 then
turns feature off and will just use MetaTrader
default. Note, if turn on snap to high/low then
will override this mechanism.
If true then and if SL box shown on panel then
Obscure_slFastModeSelection clicking that will bring up a mode/pip selection
list immediately, rather than a pop-up.
If true then and attempt to manually move SL
line further away after trade open then will snap
Obscure_slManualMoveOnlyCloser
back to prior price. Will only be able to move SL
line closer.
Issue 3.3 Page 91 Runwise Limited (UK)
www.runwisefx.com
Variable Description
If true then if Obscure_*ManualMoveOnlyClose
Obscure_sltpManualMoveOnlyCloserNoPopup
also true then will turn off pop-up if trade open.
If true then will not show hidden stop loss or act
up on it. Can be used if still want TPs calculated
on risk/reward, but not actually exit on SL being
Obscure_stopLossIgnore
reached. Note, you may also wish to set broker
SL offset to blank in CONFIG | Stop Loss to turn
that off also.
If true then and attempt to manually move TP
line further away after trade open then will snap
Obscure_tpManualMoveOnlyCloser
back to prior price. Will only be able to move TP
line closer.
If tick value from Broker appears to more than
this factor out based on previous recent trades
Obscure_tickValueDiscrepancyAllowed
then will value from recent trades. Note, use if
wrong then factor of 10 out.
If true then will recalculate stop loss/take profit
as SL/TP line is moved on the chart, i.e. the
Obscure_updateAsMoveSLTPlines
mouse is moved with line clicked. This includes
updating the text shown below those lines.
ONLY FOR MT5 VERSION. If false then will
use ‘Tick Value’ from broker to work out how
much a pip is worth per lot. If true then uses
Obscure_useOrderCalcProfitForPipValue UserCalcProfit function of MetaTrader which is
regarded as better and includes cost of
commission. Used for calculating lots based on
risk per trade.
When using {d.amnt}, say in SL text, will give
Rules_amountForNoDigits threshold where no fractional digits will be
displayed.
If true then any rules which have a confirmation
Rules_ignoreMessageConfirm pop-up, e.g. close all trades, will simply go-
ahead without displaying confirmation pop-up.
Issue 3.3 Page 92 Runwise Limited (UK)
www.runwisefx.com
Variable Description
Maximum iterations when rule is marked for
Rules_maxLoopIterations loop but LOOP_END command hasn’t yet been
encountered in the rule.
Logs changes in the rule status comment. Note,
changed in values that are in brackets will not
Rules_logRuleOutcomeChanges
be regarded as a change so the status
comment text.
Offset to be applied to server hour in order to
Rules_testingServerToLondonHourOffset
get London hour when using the strategy tester.
If set then will adjust
testingServerToLondonHourOffset (say) further
if Europe DST (daylight saving time) is on but
Rules_testingServerAutoAmericanDSThandling
American DST isn’t, or visa versa. Recommend
setting to true if server time changes with
American DST.
Various configuration items that can be
referenced in the rules. Designed for user to
use and is great if using the Optimizer of the
User_*
Strategy Tester, as the rules can be
automatically tested with a variety of possible
values.
Used to control block A and B which are spaces
above/below (A) and to the left/right (B) of the
EA chart control panel that can be used to
Block_*
output additional information. The blocks auto
move if the corner that the EA control panel is
positioned to is changed.
Used to set the properties of the indicators used
Property_SL* for setting the stop loss automatically
(dependant on calc method)
Special configuration items that are used in the
RWFX_* built-in rules supplied with the EA or in rules in
our ready-made rules library.
(Can generally be left as is. Some more
Gen_*
significant ones are explained below)
Issue 3.3 Page 93 Runwise Limited (UK)
www.runwisefx.com
Variable Description
Number of digits to show after decimal point
Gen_accountCurrencyDigits
when displaying account balance, etc.
If true then any functions and commands that
work on whole account will be only be for trades
Gen_accountManagedTradesOnly with configured magic numbers. Otherwise, will
will be all trades on the connected account,
regardless of magic number.
If not 0 then will apply step to any broker SL/TP
price, so it is in multiples of supplied step value.
Gen_brokerSLTPStep
Can be set if broker requires SL/TP to be
multiples of certain value.
Used in master/slave trade copy mode. Can be
set on slave to add to symbol received from
master. However, not normally required as
system can auto handle where master has
Gen_brokerSymbolAdd
different symbol extensions to slaves. For
example, if master has EURUSD but a slave
requires EURUSD.r then that is fine and
handled automatically.
Used in master/slave trade copy mode. Can be
set on slave to symbol translation from master,
e.g. broker for master uses DE30 symbol and
slave it’s GER30 then can set this input on
slave to be DE30=GER30. Other items can be
added separated by a comma. Note, generally
Gen_brokerSymbolTranslate
don’t need to add where brokers have different
extensions on end of symbol, as this is handled
automatically. However, in some cases may
need to include the extension on the slave, e.g.
US500=SPX500.p where on Master symbol is
US500.r
Can be used in Master/Slave multi account
mode. Where can have more than one Master
on the same machine by using different
channels. Set one master to have a channel
Gen_commsChannel
value and the slaves the same. Then set other
master and slaves with a different channel.
Recommend just using a short string, e.g. s1
and s2 (for strategy 1 and 2)
Issue 3.3 Page 94 Runwise Limited (UK)
www.runwisefx.com
Variable Description
Gen_GUIFontSize Master font size used for the panel
Gen_GUIFont Font used for GUI panel
Horizontal scale of GUI panel. -1 means
Gen_GUIScaleX automatic. Can use value 0-1 to make panel
smaller, or greater than 1 to make panel bigger.
Vertical scale of GUI panel. -1 means
Gen_GUIScaleY automatic. Can use value 0-1 to make panel
smaller, or greater than 1 to make panel bigger.
If the EA can’t work out automatically how to
convert points to pips then this value will used.
The default is 10, which is correct for ‘5 digit
Gen_fallbackPointToPipDivider
brokers’, i.e. that quote 10th of a pip. For ‘4 digit
brokers’, i.e. who don’t quote fractional pips,
then this value would need to be 1.
Used to control the definition of a pip. If -1 then
will workout automatically using definition of pip
as 0.0001 change in EURUSD. Some users that
Gen_forcePointToPipDivider trade indexes may wish to set this 100, as the
definition of pip is typically different. If not -1
then will convert points to pips by dividing the
points with the value specified.
If true then any offset supplied in Period, e.g.
0+2, will only result in a main timeframe, e.g. if
current chart is M6 and offsetting by 2 then
would give M30, rather than M10. If false then
Gen_periodOffsetMainTFsOnly
will (if MT5) take minor timeframes such at
M3,M4,M6,M8,M20, etc., into consideration for
offset and possibly return them, i.e. would
indeed return M10 in the example.
If true and number of digits after decimal point
for chart symbol prices is 0 then will set ‘point to
Gen_pointToPipDivider1for0digits
pip’ divider to 1. This will mean one unit change
in price is one pip.
Gen_lineLabelFontSize Font size used for horizontal line labels
Issue 3.3 Page 95 Runwise Limited (UK)
www.runwisefx.com
Variable Description
Will move horizontal line labels by number of
Gen_lineLabelRightShift supplied bars/candles. Can use negative value
if want to move left.
Width to allow for horizontal line labels. Reduce
Gen_lineLabelWidth
to move line labels to right.
Sets the maximum number of items that can
Gen_selListMaxItemsPerColumn appear per column when a pop-up selection list
is shown
Used to control screenshots when EA has been
Gen_screenShot*
configured to take them
If false then any %%, e.g. setting SL in percent
terms, will be based on account balance. If true
Gen_treatDoublePrctAsPrctOnPrice
then will be percentage adjustment of current
price.
Additional currencies to be included in news
events listed and acted up on by any loaded
News_currenciesToAdd
rules. Can be comma separated. Use
uppercase.
Gives the impact that should be used for news
News_impactMaxForAllCountriesEvents events that affect multiple countries
(currencies), e.g. G7 conference.
If Auto will the will read news when strategy
testing or using our built-in stats if CSV file is
News_strategyTesterAllow present. Else if On then will read only if weekly
xml is present. Otherwise set to Off. See
Appendix D for more details.
Will be used when using MetaTrader Strategy
Tester and looking at news or when using our
News_strategyTesterGMTOffsetHrs internal statistics and the market is closed.
Gives the number of hours to adjust news time
(GMT) to server/chart time.
If true will apply an additional -1 offset from
News_strategyTesterGMTNewYorkSummer server time if New York summer time is in effect
for tester time.
Issue 3.3 Page 96 Runwise Limited (UK)
www.runwisefx.com
Variable Description
If true then functions tradesProfitPrct,
tradesNum and tradesProfit will use close time
Func_tradesProfitUseCloseTime
instead of open when deciding if trades that
should be looked at.
If true will buffer objects during live trading. This
Indi_bufferObjectsDuringNormalTrading can help if seeing performance issues with
indicators that show objects on the chart.
If true will won’t disable indicator if returns error,
e.g. can’t initialise. This can be necessary for
Indi_checkErrorReturnFromICustom indicators that are slow to initialise and give this
error initially buy are eventually fine if carry on
capturing.
Allows the color of the vertical cursor line of the
Indi_colorIndexBufferCursorColor
Color Index Helper tool to be changed.
If true will return raw value from indicator if
weighting box is blank. Note, will do this anyway
Indi_forceUsingValueIfWeightingBlank if DefaultValue capture mode is used. If false
then will get 100 of buy and -100 for sell for non
DefaultValue capture modes.
Indi_maxBarsToSearch Maximum number of bars/candles to search
back when using capture modes Distance and
DistanceMidPoint, i.e. how far back to search
for buy/sell indication.
Indi_numHelperBuffers How many color index buffers should be shown
in our Color Index Helper Tool.
Indi_searchBarsBuffer If true then will search our buffer when using
capture modes Distance and DistanceMidPoint.
If false then will search chart as is. Usually,
latter is better because these capture modes
are often used when indicator repaints and
really need to see what indicator is saying on
chart, rather than relying on our internal buffer.
However, using buffer is more CPU efficient.
Issue 3.3 Page 97 Runwise Limited (UK)
www.runwisefx.com
Variable Description
Indi_SLTPobjFindLatest Used when chart objects from an indicator are
providing SL and/or TP. If true then will search
chart to find latest object that contains supplied
name. This is useful for indicators that show
multiple historical SL/TP, so need to look at
latest.
Indi_SLTPobjFindType Used when input Indi_SLTPobjFindLatest is set
to true to provide the type of object being
searched the latest of. The type is required so
this search can be done efficiently.
Color_* Colors for support, resistance and pivot lines
Style_* Style for pivot and support/resistance lines
Comms_App_Machine Computer name where our Windows
RunwiseFX App is located. If . then means
current computer. If blank then turns ff
communication with our app.
Comms_App_alertSendIfConnected If true then will send alerts to our Windows
RunwiseFX app if connected
Comms_App_alertEmailPushLocally If true then will still send alerts to email (if
configured) even when sending alerts to our
Windows RunwiseFX app
Comms_App_alertLocalIncBracketedDetails If true then will include extra information in
square brackets when raising alert locally on the
Terminal because Windows RunwiseFX app is
not connected
Comms_App_connectIfStrategyTesting If true then still connect to Windows RunwiseFX
app when running EA in MetaTrader’s Strategy
Tester. Will see account name/server as
‘Tester’.
Issue 3.3 Page 98 Runwise Limited (UK)
www.runwisefx.com
Variable Description
Comms_App_serverAdd Allows extra text to be added to server name
used in account selection in our Windows
RunwiseFX app. Useful if trying to connect two
MetaTrader terminals to our app but where they
are logged into same account. Set second
instance to (say) to 2 so will appear as two
separate accounts in the app.
Lots to be used when opening signalled trade. If
left blank then will be proportional to source
Signal_lotsToUse
account balance/leverage compared to your
own
Maximum slippage allowed from the original
Signal_maxSlippageFromSourcePips
source signal open price.
Issue 3.3 Page 99 Runwise Limited (UK)
www.runwisefx.com
15 USING OUR EA TO CONTROL
ANOTHER EA’s TRADES
It is possible for our EA to control trades opened by another EA. This allows the
hidden SL / TP of our EA to be used and configurable exit criteria. You’ll also need to
have to multiple charts open: One for our EA (per symbol wish to trade) and another
chart of the third party EA.
The magic numbers (Expert ID) of our EA and third party EA need to match, i.e. the
magic number our EA is configured with via EA input Important_magicNumberToUse
or via CONFIG | General Settings buttons must match trades open by third party.
You can tell what the magic number (also known as Expert ID) is by
hovering the mouse pointer over the trade and it will pop-up has a hint.
Some care is needed when controlling trades from another EA, as both
could be trying to update stop loss (say) e.g. if third party EA trails the
stop loss. Also, if the other EA is poorly coded then the other EA could
try to re-open a trade if our EA closes it. This could result in repeated
opening and closing.
Recommend testing thoroughly on a demo account.
When a trade is open you will get ‘orphan trade detected’ alert for our EA and it will
set the hidden stop loss and take profit based on the broker stop loss and take profit
of the trade detected. The close and scale-in button should appear on our EAs panel.
If this doesn’t happen then highly likely the magic number our EA is configured with
EA does not match that of the trade that has been opened by the third party EA.
Note, you can turn off the orphan detected alert by setting EA input
Main_alertOrphanTradeDetected to false.
Issue 3.3 Page 100 Runwise Limited (UK)
www.runwisefx.com
16 CONFIGURING FOR BINARY OPTIONS
BROKER
runwiseFX does not recommend Binary Options (BO) trading/brokers.
The risk reward ratio is always less than 1 which breaks a golden rule
of trading, i.e. you have to be right more times than you are wrong just
to break even. Secondly, BO brokers do not put any trades to the
market so if you win they lose. This creates a conflict of interest and
we’ve had lots of reports of brokers doing anything they can to get rid
of you if you start consistently withdrawing profits, e.g. making it
difficult to withdraw, platform disconnects/freezes, etc.
That being said it is possible to configure our EA for Binary Options:
The lots is used to notify the Binary Options broker of the amount you wish to risk.
The expiry can be set by Trade Order Comment, which is used to set the comment
on the ticket/trade. The format most Binary Options brokers use is:
BO exp:Expiry
Where Expiry is in seconds. Therefore, to configure the EA to place a Binary Options
that will expire in 5 minutes, set BO exp:300
To set the Trade Comment click CONFIG button | General Settings button and there
is a box for the Trade Comment.
Issue 3.3 Page 101 Runwise Limited (UK)
www.runwisefx.com
17 ADDITIONAL CAPABILITIES
17.1 Indicators Crossing Other Indicators
We support configuring an indicator that actually derives its trade
signal from the crossing of other indicators. Here are some examples:
Example 1: Capture TEMA custom indicator (a type of moving average) with two
different periods (fast and slow) and trade when those cross each other, i.e. buy
when fast crosses above slow and visa versa for sell. To achieve this we need to add
three indicator references. One to capture slow TEMA and a second to capture fast
TEMA and then a third to generate the trade signal with slow and fast cross each
other. Here is how we configure this:
Firstly, need to add new indicator reference (slowT) to capture slow TEMA, where
indicator input for the period is set to 20. Notice, Weighting box is set blank so this
doesn’t directly give buy/sell – just interested in recording its value. Also Capture
Mode set to DefaultValue to that end.
Secondly, in similar fashion, we need another indicator reference (fastT) to capture
fast TEMA with period input set to 8:
Finally, we are ready to add the indicator reference (crossT) that will look at these
two values and give the trade signal when they cross. Notice now the Weighting box
is set to 1, so contributes to trade signal, and the Color Index box is set to
i.slowT,i.fastT to reference the previous entries and Capture Mode is set to
CrossBuySell, as we need the trade signal based on the cross. Indicator Name is
blank as it’s not capturing an indicator itself but using the two values caputred with
reference IDs slowT and fastT:
Issue 3.3 Page 102 Runwise Limited (UK)
www.runwisefx.com
Example 2: Trade when price closes above moving average high for buy and closes
below moving average low for sell. Again, this achieved by first capturing the required
moving averages (based on high & low price) and then adding third indicator
reference to give trade signal based on close price, in relation to the moving
averages (MAs).
Firstly, lets add indicator capture for the moving average based on the high price.
We’ll use reference ID of maHi to label it. Notice, Capture Mode is set to
DefaultValue as just interested in moving average price and Weighting box is blank
so isn’t used directly into buy/sell determination:
Next, need to capture moving average again but getting moving average on low price
– notice in Indicator Inputs box when specified low in there. The reference ID of
maLo is uesd for this:
Issue 3.3 Page 103 Runwise Limited (UK)
www.runwisefx.com
Finally, just need third reference that will use both the moving average values and
signal trade when price close above maHi for buy and below maLo for sell. Notice,
using Caputre Mode of CrossBuySell to say interested in value crossing and Color
Index is set to what the cross is about. This is where we reference maHi and maLo
and -1, whitch means closed price (if shift 1). Note, in the screenshot the Color Index
box is set to i.maHi,i.maLo,-1. Also notice Weighting box is now set 1 which means
this indicator referecen will contribute to the buy/sell determination :
Top tip: If you specify -2 instead of -1 in Color Index box then will use Heiken-Ashi
close instead regular candle close.
Example 2b: Variation on example 2 where, instead of price, check that a third
moving average has crossed the high/low.
To achieve this you will need an additional entry in CONFIG | Indicator Values
capture similar to maHi but call it ma and set change high to close in the Indicator
Inputs box. This is capturing the moving average that needs to go beyond high/low.
Then modify priceMAx entry and set Color Index to i.maHi,i.maLow,i.ma
So, you’ve replaced price, represented by -1, with the value from the new ma
reference ID.
Top tip: If interested in reversal, i.e. buy when MA goes below low and sell when
goes above high then set Mid Point box to ! of the priceMAx entry.
Example 3: Trade when EMA has crossed upper Bollinger Band for sell and trade
buy when EMA cross lower Bollinger Band, i.e. reversal strategy
To achieve this need to configure the following four indicators, via CONFIG |
Indicator Values to Capture | New:
1) Reference ID: bbUp | Indicator Name: F:BollingerBand | Indicator Inputs:
20,1,0,close,upper | Capture Mode: DefaultValue | Weighting: (blank)
2) Reference ID: bbLo | Indicator Name: F:BollingerBand | Indicator Inputs:
20,1,0,close,lower | Capture Mode: DefaultValue | Weighting: (blank)
3) Reference ID: ema | Indicator Name: F:MovingAverage | Indicator Inputs:
6,0,ema,close | Capture Mode: DefaultValue | Weighting: (blank)
4) Reference ID: bbSig | Indicator Name: (blank) | Indicator Inputs: (blank) |
Capture Mode: CrossBuySell | Color Index: i.bbUp,i.bbLo,i.ema | Mid Point:
! | Weighting: 1
Issue 3.3 Page 104 Runwise Limited (UK)
www.runwisefx.com
Note, the reversal strategy comes from setting Mid Point to ! in indicator 4 (bbSig).
You can set Shift boxes to 0 if want live to work on current live value of Bollinger /
EMA, rather than closed values.
Example 4: Trade when Bollinger Band of faster 20 period crosses Bollinger Band of
slower 50 period. Only one of the Bollinger lines needs to have crossed for signal
To achieve this need to configure the following five indicators, via CONFIG | Indicator
Values to Capture | New:
1) Reference ID: bbSUp | Indicator Name: F:BollingerBand | Indicator Inputs:
50,1,0,close,upper | Capture Mode: DefaultValue | Weighting: (blank)
2) Reference ID: bbSLo | Indicator Name: F:BollingerBand | Indicator Inputs:
50,1,0,close,lower | Capture Mode: DefaultValue | Weighting: (blank)
3) Reference ID: bbFUp | Indicator Name: F:BollingerBand | Indicator Inputs:
20,1,0,close,upper | Capture Mode: DefaultValue | Weighting: (blank)
4) Reference ID: bbFLo | Indicator Name: F:BollingerBand | Indicator Inputs:
20,1,0,close,lower | Capture Mode: DefaultValue | Weighting: (blank)
5) Reference ID: bbSig | Indicator Name: (blank) | Indicator Inputs: (blank) |
Capture Mode: CrossBuySell | Color Index:
i.bbSLo,i.bbSUp,i.bbFUp,i.bbFLo | Mid Point: ^ | Weighting: 1
Note, if want reversal strategy then set Mid Point for bbSig to !^
Example 5: Trade when fast moving average (period 8) has crossed slower moving
average (period 24) and by certain number of pips, e.g. 5.
To achieve this need to configure the following three indicators, via CONFIG |
Indicator Values to Capture | New. Where need to capture fast moving average, slow
and then a third indicator to reference those two and signal when crossed by certain
number of pips:
1) Reference ID: maFast | Indicator Name: F:MovingAverage | Indicator
Inputs: 8,0,ema,close | Capture Mode: DefaultValue | Weighting: (blank)
2) Reference ID: maSlow | Indicator Name: F:MovingAverage | Indicator
Inputs: 24,0,ema,close | Capture Mode: DefaultValue | Weighting: (blank)
3) Reference ID: maX | Indicator Name: (blank) | Indicator Inputs: (blank) |
Capture Mode: CrossBuySell | Color Indexes: i.maSlow,i.maFast | Mid
Point: 5p | Weighting: 1
The Mid Point box of indicator reference ID maX gives the number of pips need to
have crossed by if you supply that value followed by lettter p.
Issue 3.3 Page 105 Runwise Limited (UK)
www.runwisefx.com
17.2 Having Separate Entry & Exit Indicators/Criteria
Example 1: Open sell trade when price closes above upper Bollinger Band and buy
when price closes below lower band. However, exit when price closes beyond middle
band.
To achieve this need to capture Bollinger Band for entry via the following, but notice
only ticked for Entry and Reset in the ‘Use Indicator For’ section. Also Mid Point is set
to ! as this is a reversal strategy:
Then need to capture Bolligner Band middle line by changing Indicator Inputs to
reference that. Notice that is ticked for Exit:
Issue 3.3 Page 106 Runwise Limited (UK)
www.runwisefx.com
Note, the Shift box setting of 1 means consider candle closed price. If interested in
price touching lines for either entry and/or exit then set Shift box to 0.
Note, for this strategy would recommend setting Reset Threshold to 0 in CONFIG |
General Settings, so that it resets for next alert/trade when price in the middle of the
two bands.
Example 2: An indicator provides entry & exit on color index 3, where it shows 1 for
buy, 2 for buy exit, -1 for sell and -2 for sell exit.
As in the previous example, this would be achieved by adding two entries via
CONFIG | Indicator Values to Capture | New – one for entry and one for exit.
For entry one: The Capture Mode would be set to DefaultBuySell, Color Index set to
3 and Mid Point box set to 1:-1 and the ‘Use Indicator For’ have Entry & Reset ticked
and Exit not ticked.
For exit one: The Capture Mode would be set to DefaultBuySell, Color Index set to 3
and Mid Point box set to -2:2 and the ‘Use Indicator For’ have just Exit ticked.
Note, Indicator Name would of course be set to the name of the custom indicator in
question.
Note, again it would be good idea to set Reset Threshold to 0 in CONFIG | General
Settings, so that it resets for next alert/trade when neither 1 or -1 are returned from
the indicator.
Issue 3.3 Page 107 Runwise Limited (UK)
www.runwisefx.com
18 WINDOWS & MOBILE APP
View & control our EA from your mobile with our new app! Plus see charts from your
desktop MetaTrader, including custom indicators. Also see account details, trades,
alerts and news. Multiple accounts are supported and you can set equity targets on
the accounts, etc.
Main page for app including download links: https://runwisefx.com/mobile/
Also features install video.
Windows & Mobile App Manual: https://runwisefx.com/runwiseFX_App.pdf
Screenshots from our Windows & Mobile App:
Issue 3.3 Page 108 Runwise Limited (UK)
www.runwisefx.com
19 FAQ
Q1) How do I have different configuration for different charts/symbols?
A1) This first method is use our ‘Changes Apply To’ option shown at the top of the
configuration pop-up forms, which allows you to have different values for the various
configuration fields/boxes depending on chart symbol, currency and/or chart period.
Note, this just covers changes to the fields, rather than adding new sections to the
configuration, e.g new indicators. So, in order to have different indicators for different
symbols then add all the indicators you need. Then change the Enabled tick box on a
per symbol/currency/period basis.
If that is insufficient, then the second method is where you have more than one
instance of MetaTrader, say for each strategy. This will give you a different data
folder and different configuration file for each instance. Note, if connected to same
account then change the magic number (via CONFIG | General Settings) so the
trades from the two instances don’t interfere with each other. Note, this may not be
possible if your broker has a FIFO rule in place.
Third method is where you want to keep to a single instance of MetaTrader but apply
different configuration (file) on a per chart basis. Here you can change EA input
Main_configFilename to tell the system to use a different configuration file to load
from or save to. If blank then will use runwiseFX_CSA_Supplied_Rules.txt file, but
could set to (say) strategy_1.txt, strategy_2.txt, etc. Note, the configuration is a single
text file located in the MQL4\files folder of your MetaTrader data folder, or MQL5\files
on MT5. You’re welcome to copy theses files around and make backup copies.
If you would like to learn more about the format/structure of the
configuration file then see section 2 of the following document:
https://www.runwisefx.com/runwiseFX_CSA_Rule_Writing_Guide.pdf
Q2) How do I copy EA’s configuration from one instance of MetaTrader to
another and get the same statistic results?
A2) You need to copy the EA’s configuration file
(runwiseFX_CSA_Supplied_Rules.txt) to the other instance of MetaTrader. The file
located in the MQL4\files folder of your MetaTrader data folder, or MQL5\files on
MetaTrader 5. Of course, also need to copy any indicators and make sure work okay
on all instances. If the stats doesn’t match between the two instances of MetaTrader
then it’s usually down to the chart data loaded inside MetaTrader. On MT4 you use
History Centre to download the latest chart data. Recommend doing on both
machines. On MT5 need to scroll back on the various charts. Finally, if stats still not
same then may need to delete MetaTrader history files, where chart data is stored.
This will trigger recapure of the data from MetaTrader server. To delete: On MT4
these are .hst files stored in the history folder (sub folder per broker server) that need
deleting. On MT5 it is .hcc files located in Bases folder, again with in sub folder per
sever and per symbol. Tip – can use Window file search function ot locate the files.
Restart MetaTrader after deleted.
Issue 3.3 Page 109 Runwise Limited (UK)
www.runwisefx.com
Q3) How can I limit the number of alerts/trades per candle?
A3) An alert/trade (depending on Auto Entry Mode) can only happen after ‘reset’ has
happened, i.e. reset for fresh alert/trade. Our ‘Tutorial: Thresholds, Indicator Priority
and Reset’ video in our video section (https://www.runwisefx.com/videos.htm)
explains the concept of reset. Therefore, need to limit reset happening just once per
candle at the most. This can be done by ticking ‘Only allow reset for next trade on
new candle’ in CONFIG | Options. And unticking ‘Auto reset for new alert/trade on
opposite signal’ in CONFIG | General Settings.
We also have some relevant rules in our library (https://www.runwisefx.com/library/)
that can also help on this. Filter rule quick load code f-mtg allows you to set the
minimum gap in candle between trades. We also have alternatives to our built-in
trade rule that will wait before exiting trades, e.g. wait certain number of candles
and/or certain risk reward ratio has been achieved. See rules bi-2 and bi-3. Note, our
built-in rule trades on configured indicators. It’s automatically added when you
configure indicators where you see ‘Entry on Indicators’ and ‘Exit on Indicators’
appear the bottom the panel. Finally, you can tick ‘Only allow exit on new candle’ in
CONFIG | Options, which won’t allow indicator based exit during candle – only when
it opens.
Q4) Can the EA trade different symbols from a single EA instance on one
chart?
A4) Our EA can only trade the symbol of the chart it is attached to. We really
recommend trading this way for the following reasons:
• EAs only process information when a tick comes in from the market for the
symbol of the chart they are attached to. Therefore, an EA could react slowly
if trading a different symbol to the chart, as ticks (price changes) could be
coming in at different times thus creating delay.
• In MetaTrader, each EA gets its own thread, i.e. is multi-threaded and
everything gets processed in parallel. If you have a single EA, and
consequently single thread doing all your trading, then that would be
potentially be overloaded and would respond slower for this reason as well.
Q5) Is it possible to speed up the statistics calculation?
A5) You can speed the stats up by the following ways:
• Enable high speed testing in CONFIG | Options
• Can disable Market Processing in CONFIG | Stats / Optimization whilst
configuring the system/testing, but remember to re-enable when ready to
resume trading
• Reduce the number of bars in your charts to what you are running stats for
via MetaTrader | Tools | Options | Charts tab | Max Bars in Chart (need to
restart MetaTrader after changed)
Issue 3.3 Page 110 Runwise Limited (UK)
www.runwisefx.com
• Switch from MT4 to MT5
• Laptops aren’t brilliant as can suffer from thermal throttling and tend not to
have as many cores as their desktop counterparts
Q6) Why doesn’t the stop loss line move when break even is activated?
A6) Our break even mechanism is like a secondary stop loss. The reason being is
that if you change your mind you can just untick the break even control on the panel.
However, if the stop loss was moved instead then would need to remember where it
was originally if wanted to change mind on the break even. Also, if our break even is
activated when trade is in loss then will close when trade recovers to the open price.
Finally, there is ‘break even profit pips’ box available in CONFIG | Take Profit that
allows a pip or so profit to be captured at break even level.
Q7) Why do the trades/statistics from the EA not match when EA run in
MetaTrader’s Strategy Tester?
A7) Here are few things for you to check to help with this:
• Use our Shift Helper Tool to make sure Shift setting is correct when capturing
indicators. See section 6
• Make sure spread setting in Strategy Tester matches StratBuild_spread EA
input. Note, spread setting is only on MT4 Strategy Tester. Remember on
MetraTrader such values are in points where in our EA they are in pips, e.g.
typically 0.5 pips is 5 points on a 5 digit broker. On MT5, spread comes from
chart data. You can set max spread for auto trade in CONFIG | Risk / Lots.
• If using trailing stop loss or looking at lower time frames than chart then set
Model Quality to ‘Max – per pip’ in CONFIG | Stats / Optimization.
• Look at some sample trades and compare between our stats and what
happens in MT Strategy Tester. You can use rule d-i, from the library, to
display what indicators are signalling and see where any discrepancy is
coming from. The cyan colored status text on the panel also says which
indicator/filter the trading logic is waiting for.
Q8) Why does the EA use all my margin when I’ve set risk % per trade?
A8) The risk % is based on account balance and stop loss size and is the amount of
account balance to risk per trade. The margin usage depends on the leverage that
your broker provides for the asset/symbol you are trading, so is separate. However,
you can ask EA to leave some margin free via EA input
Main_minMarginToKeepFreePrct - see section 14.
Issue 3.3 Page 111 Runwise Limited (UK)
www.runwisefx.com
Q9) I am using master/slave mode but the slave broker uses a different symbol
name to the master. How do I map the symbol names?
A8) You can set EA input Gen_brokerSymbolTranslate on the slave to translate the
symbol from the master to what the slaves uses. Format is comma separated paris
masterSymbol=slaveSymbol, e.g. DE30=GER30
Q10) Why did the EA enter late compared to what the indicators say on the
chart?
A10) Here are a few things too look at with regard to late entries, or entries that
appear late:
• Firstly, make sure the entry is actually late. With way we have to render our
color bar that the bottom of the chart, you have to look to the candle right of
the color change. Also remember everything is done on candle close. So
entry should be on the closure of the candle to the right of the color change.
For example:
The color transition appears midway through the candle with the
white vertial line but with the way MetaTrader renders color
changes between candles it’s the candle to the right that is the
signal candle. Then have to wait for candle close, i.e. close of the
signal candle, so entry arrow is correct.
Note, this also applies to indicators that signal buy/sell via color
changes to a line – need to look to the candle to right of the color
change for where the signal should be expected.
• Our cyan colored status text says what the EA is waiting for. We log changes
to this status which can be examined retrospectively via the procedure in
Appendix B of this manual.
• You can use our Shift Helper Tool (see 6) to check the Shift setting is correct.
This governs which candle is examined when reading buy/sell from the
indicator.
• If you’ve changed any of the inputs of the indicator on your chart that affects
the indicator calculation (when it signal buy/sell) then this must be set in the
Indicator Inputs box of CONFIG | Indicator Values to Capture. Otherwise, the
EA entries may not match what the indicator shows on the chart.
• Repainting indicators can also cause entries to appear late, i.e. where
indicator wasn’t signalling at the time but later repainted to appear that entry
should have happened earlier. Recommend running your setup in
MetaTrader’s Strategy Tester, in visual mode, to see what the indicator were
Issue 3.3 Page 112 Runwise Limited (UK)
www.runwisefx.com
saying at the time. TIP: If you save your chart in a template called Tester then
this will be automatically loaded when you run a test on the EA and you’ll see
all your indicators on the chart.
• The stop loss can also cause a delay if not ready. Calculation methods like
Parabolic SAR and Moving Average only provide a stop loss in the direction
the market is going in. If your indicator(s) signal earlier than the stop loss
does then that can use a delay if the stop loss is required to calculate risk per
trade, as the system is waiting for the stop loss to be ready.
• Finally, make sure late entry wasn’t a re-entry as a trade was already open in
the direction, e.g. late entry occurred after take profit was hit (say). Normally,
the system won’t re-enter like this but if set the system to reset on each new
candle in CONFIG | Options or loaded a rule from the library that resets on
take profit it then could see this kind of late entry as what re-entry to signal
that started earlier on.
Issue 3.3 Page 113 Runwise Limited (UK)
www.runwisefx.com
20 CONTACTS
Runwise Limited
Cambridge House
Henry Street
Bath
BA1 1BT
United Kingdom
Email: support@runwisefx.com
Web: www.runwisefx.com
APPENDICIES NOW FOLLOW WITH EXTRA INFORMATION
Issue 3.3 Page 114 Runwise Limited (UK)
www.runwisefx.com
Appendix A – Example Take Profit Settings
Here are examples of how to configure various take profit regimes, including adjust
stop loss/trailing and break even as targets are reached and even scale-in (adding to
your position).
Example 1) Single take profit of 35pips:
Simply select ‘pips’ instead of ‘rrr’ (risk reward ratio) and enter value
Example 2) Close 50% of trade at 1:1 risk reward ratio and total close at 2:
Here two targes have been confired. The first at 1:1 risk reward ratio will exit 50% of
the trade when reached. The second will close a 100% at 1:2 risk reward ratio. Note,
the exit percent is of the original trade (plus any scale-in).
Example 3) Set for break even and trail SL at when 25 pips profit reached:
Here the exit % is 0 which means won’t actually close any part of the trade but will
still set stop loss to start trailing and also set our break even. Note, our break even is
like a second stop loss, so doesn’t touch SL (in case change mind) but just monitors
Issue 3.3 Page 115 Runwise Limited (UK)
www.runwisefx.com
trade and does close when profit goes back to 0 – see Section 3.13.6. Note, if you
would rather move the stop loss then set SL box to RAISE and untick Break Even.
Example 4) Scale out of trade by 25% as each risk reward ratios of 1, 2 3 and 4
are reached and raise stop loss to previous target:
As mentioned before the Exit % is based on original trade (+ any scale-in) so to exit
25% on each target you need to specify exit % as shown. SL box set to RAISE will
raise SL to break even when target 1 is reached. Raise SL to target 1 when target 2
is reached and so on. Sometimes this is refered to a jumping stop loss. Note, the SL
RAISE on target 4 isn’t strictly necessary as will be closing remainder of trade.
Example 5) Set stop loss to 7 pips and trail when 30 pip take profit is reached:
If a value is placed in the SL box then the stop loss will be set to the number of pips
below current market price when target is reached. Other adjustments to SL are
possible, see section 5.6. For example, if set SL box to -50%% then will reduce stop
loss by 50% [Note, the double %% is not a typo, if set -50% then would reduce stop
loss by 50% of the average daily range instead].
Example 6) Scale-in (open additional ticket) to double position size when 0.5
risk reward ratio is reached and then close trade when risk reward ratio of 2 is
reached:
To achieve the scale-in use a negative value for the exit %, where -100 means
double pisition size. If -50 then would increase position by 50% of original trade, e.g.
if traded 1 lots then would open 0.5 lots when target 1 reached. Target 2 is set to exit
Issue 3.3 Page 116 Runwise Limited (UK)
www.runwisefx.com
100% which includes any scale-in.
Example 7) Scale-in at multiple levels if market moves against you & exit if
goes 10 pips for:
This uses negative pips (or can be negative risk reward ratio or negative amount) as
target, i.e. triggered as an SL would be, and negative exit % to scale-in, i.e. open
additional tickets to add to your position. In this example will scale-in 100% if trade
goes negative 10 pips and scale-in another 100% (total 200%) at 20 pips loss and
again at 30 pips loss. Finially, there is a take profit if goes back in your favour and
goes to 10 pips profit, i.e. 10 pips from open price and spread covered. Tip: You can
tick break even on target 1,2 or 3 and will then if trade goes back to break even it will
exit. Where break even is defined as going back to original open price + spread and
any ‘profit pips’ set in ‘Break Even Profit Pips’ box, also shown in pop-up.
Issue 3.3 Page 117 Runwise Limited (UK)
www.runwisefx.com
Example 8) Scale-in if trade goes into loss by 10 pips and close when goes
back to entry else exit 10 pips in profit
Target 1 has the -100 for Exit % which means scale-in 100% (double position) if
trade goes into loss by 10 pips (as given by -10 for target value). Target 1 will also
set for break even, which means trade will exit when goes back to entry price
(allowing for spread). This means origianl ticket will be at 0 profit but scale-in ticket
will be 10 pips in profit. Notice ‘Break Even Profit Pips’ box is set to 0. Alternatively, if
trade gets to 10 pips profit then will exit trade. If you would like the stop loss to be 20
pips, for example, then this can be set in CONFIG | Stop Loss | Fixed Pips of 20.
Note, of course for take profit targets can replace pips with risk reward ratio, etc.
Example 9) When 1:1 risk/reward target is reached then trial stop loss by low of
closed candle for buy and high of closed candle for sell
To achieve this, you first need to tick the following option in CONFIG | Stop Loss:
Then need to download the m-slhl rule from our library, which will set stop loss
based on closed candle high/low for sell/buy, respectively, when stop loss is in
‘RULE’ mode. Do this via CONFIG pop-up and enter m-slhl in the Code box and click
Download button.
Finally, in CONFIG | Take Profit, need set take profit target at 1:1 RRR which will
switch stop loss to RULE mode and set to trail:
Issue 3.3 Page 118 Runwise Limited (UK)
www.runwisefx.com
Example 10) Set 5 TP targets at 25, 50,75, 100 and 150pips. When 1st target
reached reduce SL by 50%, 2nd target set to beakeven, 3rd target close 70% and
set SL to target 1 price, 4th target to target 3 price and the 5th target should
close remaining trade.
Reducing SL by 50% can be achieved by setting the SL box to -50%%. Our system
supports raising SL to previous TP target by setting SL box to RAISE. So, would be
configured like this:
Note, the reason target 4 is the 50 pips one is because the RAISE works to set SL to
previous TP target. Note, our break even mechanism is separate to our SL and
works as a secondary stop loss.
Issue 3.3 Page 119 Runwise Limited (UK)
www.runwisefx.com
Appendix B – Using Experts Log in
MetaTrader
The Experts log is very useful for finding out why the EA didn’t take a trade at
particular time or alternatively why it closed trade if you didn’t expect that.
The log contains a running time stamped commentary of the status of EA and will say
why the EA didn’t take a trade, e.g. an indicator hadn’t lined up or spread too high
and will also contain any errors, e.g. errors returned from the Broker when the EA
tried to open the trade. It will also log the reason for closure, e.g. stop loss hit, break
even ticked or due to trade rule, e.g. configured indicators changed direction.
All log messages are in time in order and can be searched for a particular symbol.
Remember the log is in local time which may need to be offset (say) by a couple of
hours from server time, i.e. the time shown on the chart.
Log messages are in the format (example):
2016.08.15 14:44:54.949 runwiseFX_Strategy_Automator EURJPY,H1: TDI(B): red not
crossed yellow
2016.08.15 14:44:53.539 runwiseFX_Strategy_Automator EURJPY,H1: TDI(S): not crossed
50
Lines that contain (B) refer to buy situation and lines that contain (S) refer to the sell
situation. Therefore, if looking why didn’t take a buy at certain time then need to find
last log message marked with (B) just before that time. Note, a log message gets
added when the trade status (rule outcome) changes. All messages are designed to
be human readable, e.g. ‘ema not crossed’, ‘waiting for tdi’ etc.
To access the Experts log go to the Expert tab on MetaTrader in the
Terminal/Toolbox Panel. Right click and select View option. The following pop-up will
be shown:
Issue 3.3 Page 120 Runwise Limited (UK)
www.runwisefx.com
Enter the symbol in the box in the top left and enter the date range/time range of
interest and click Request. This will then show you messages for that time range.
Remember everything is local time so need to apply appropriate offset from server
time. Locate the last message just before where you think it should have traded (say)
and that will be what the rule was waiting for.
If EA is sometimes not opening trades when expected, e.g. when
indicators have lined up: The usual reason for this is due to allowed
slippage or maximum spread being exceed. The system will retry in
this case but only if market price hasn’t moved too much from where
the entry should been originally. This prevents the EA from opening a
trade at a terrible price. The following EA inputs control all of this – see
section 14 for more details: Main_maxSlippagePips,
Main_maxSpreadForAutoTradeOpen,
Main_tradeOpenRetryMaxMovePips and
Main_tradeOpenRetrySecs.
If EA is sometimes opening trades when it appears it shouldn’t have,
e.g. doesn’t look like indicators had lined-up when look back at chart:
The usual reason for this is that one or more of the indicators is
sometimes briefly repainting. You can use our Shift Helper Tool to
verify Shift the setting it correct and are using a stable shift value when
capturing the indicator value – see section 6.
Issue 3.3 Page 121 Runwise Limited (UK)
www.runwisefx.com
Appendix C – Adjust Text on SL/TP Lines
This can now be done more easily via by CONFIG | Display | SL/TP Text. However, if
wish to use our EA inputs for this then here are some examples settings for
Main_lineTextStopLoss and Main_lineTextTakeProfit EA inputs that can used to set
the text shown on the SL and TP lines, respectively. Note, if either input is left blank
then will show system default, i.e. pips from current / open price / pending price (if
set).
Example 1) SL line risk amount, pips and lots:
Main_lineTextStopLoss=Rsk={f.formatFixed({f.mathMulti({f.pipDiffAuto({t.openOrCurrent}
;{t.slPrice})});{t.amntPerPip})};2)} Lt={t.lots}
{f.pipDiffAuto({t.openOrCurrent};{t.slPrice})}p
Example 2) SL/TP showing profit they represent, where SL will be positive if been
trailed past the open price:
Main_lineTextStopLoss=Profit={f.formatFixed({f.mathMulti({f.pipDiffAuto({t.slPrice};{t
.openOrCurrent})});{t.amntPerPip})};2)}
Main_lineTextTakeProfit={f.mathMulti('{f.pipDiffAuto({t.tpPrice};{t.openOrCurrent2})}'
;{t.amntPerPip};2)}
Example 3) SL/TP showing profit and pips:
Main_lineTextStopLoss={f.pipDiffAuto({t.slPrice};{t.openOrCurrent})}p
({f.formatFixed({f.mathMulti({f.pipDiffAuto({t.slPrice};{t.openOrCurrent})});{t.amntPe
rPip})};2)})
Main_lineTextTakeProfit={f.mathAddInt({t.tpLevel};1)}:{f.pipDiffAuto({t.tpPrice};{t.op
enOrCurrent2})}p
{f.mathMulti('{f.pipDiffAuto({t.tpPrice};{t.openOrCurrent2})}';{t.amntPerPip};2)}
Issue 3.3 Page 122 Runwise Limited (UK)
www.runwisefx.com
Appendix D – Understanding Our Retry
Mechanism
Like many EAs our EA will retry a trade open if there is some temporary problem,
e.g. slippage or spread too high. As our product is professional grade, we do one
extra check during retry – that a retry isn’t attempted if market has moved from the
original open price to a worse price, as this would defeat the slippage & spread
checks. When this happens you will see the following alert:
This alert means the EA is waiting for price to improve before retrying trade open so
that your max spread & slippage requirements are not defeated.
You can increase the value in CONFIG | Advanced | ‘Max Market Move During Open
Retry’ to permit a worse price for the retry if you wish. Note, the time allowed for retry
is also limited to 1 bar/candle, by default. This can be set via EA input
Main_tradeOpenRetrySecs, which if negative gives number of bars/candles, else
number of seconds.
Issue 3.3 Page 123 Runwise Limited (UK)
www.runwisefx.com
Appendix E – Back Testing with Historical
News Events
It is possible to back test with user supplied historical news events in a CSV file. This
includes testing with MetaTrader’s Strategy Tester and our built-in stats. The CSV file
should be saved into MQL4\files (or MQL5\files on MT5) of your MetaTrader data
folder for use with or built-in stats or tester\files folder for use with MetaTrader
Strategy Tester. The file should be called news.csv
The CSV file can use semi-colon or comma to delimit the fields. Format needs to be:
Date;Time;Currency;Impact
e.g.
20061231;15:00:00;NZD;H
The time needs to in GMT/UTC. The system will automatically see what your broker
is offset by from GMT and apply that offset to news time. However, it does need the
market to be open to work this out. So, if back testing at the weekend or using
MetaTrader Strategy Tester then please set EA input
News_strategyTesterGMTOffsetHrs. So, if your broker is 2 hours ahead of GMT then
this should be set to 2.
Note, if EA input News_strategyTesterGMTNewYorkSummer is true (default) then it
assumes your broker operates on New York Daylight Saving, so will adjust offset
automatically for daylight saving based on when news event occurred. If false then
assumes European daylight saving.
The Impact should be H for high, M for medium, L or low. File can contain extra fields
and header row, which are currently ignored.
Note, if using our built-in stats then recommend setting Model Quality in CONFIG |
Stats/Optimization to High at least.
END OF DOCUMENT
Issue 3.3 Page 124 Runwise Limited (UK)
www.runwisefx.com