runwiseFX

groundbreaking functionality for MetaTrader & TradingView

TUTORIAL: Setting Indicator Inputs

Our products allow indicator inputs to be supplied when capturing values from custom indicators. The inputs can change the way the indicator is calculated, turn off alerts, hide chart panels, control how far back the indicator calculates, etc. The inputs should be supplied comma separated up to and including the one you need to change. However, care is needed depending on type of input, which is discussed in this tutorial, along with examples.

Numerical Inputs

The following MT4 icons are using for numerical values: And on MT5:
For these inputs simply supply the value in the comma separated list. If you put blank then will be regarded as supplying 0. Note, be careful with in MT4 as that is also shown for selection lists, as discussed below.

Boolean (True/False) Inputs

These are indicated by , for MT4 and MT5 respectively, where you should put 0 for false and 1 for true, i.e. still use a numerical value. If you leave blank then will be regarded as 0, i.e. false.

String/Text Inputs

These are indicated by , for MT4 and MT5 respectively, or where no icon, i.e. heading. With string inputs, you need to use double quotes around the string. It's very important you don't miss the double quotes out, else will be supplied to the indicator as a numeric and will cause the indicator to continually load and unload and use up massive CPU. Many string inputs are just comments so can just put "X" or can even just put ". However, an example of where can't just supply " is if used to provide time frame for indicator to calculate for, e.g "Current", or (say) some kind of license key/email.

Selection Lists Inputs

Selection lists are indicated by , for MT4 and MT5 respectively, and you can tell it's a selection list as the value is a drop-down selection list.

Care is needed with selection lists, as need supply the numerical value that represents the selected item. Usually, they are have values 0 upwards, as you go down the list. So, for the first item in the list you would supply 0 and for the second 1 and so on. However, it's possible for the developer to allocate different values. Therefore, if not getting the expected results then recommend saving a Set file, via Save button in the Inputs tab, and open that in a text editor, e.g. Notepad. This is human readable file and will show you the inputs and the numerical value required, in a input=value format. This will give you the correct numerical value that represents the selection list item you require. For example, if you had a selection list that went Current,M1,M5,M15,M30,H1,H4 then the Set file might show that 15 should be used for M15, even though it is just the 4th item in the list.

Color & Date/Time Inputs

These are still numerical inputs and don't need double quotes. Similar to Selection List Inputs, best to save a Set file and open that to see what the equivalent numerical value is and supply that. See above on how to do that.

Example 1 - Turning Off An Indicator's Information Panel & Alerts

Here we want to turn off boolean inputs 'Show Info', 'Show Level Text' and 'Enable Pop-Up Alerts:


The indicator inputs would need to be set to:
"X",7,1000,"X",0,0,7,"X",0,0,0,0,0,0,0,0,"X",0
As you see it was only necessary to give inputs up to and including 'Enable Pop-Up Alerts'. The inputs 'Show Info' and 'Show Level Text' where set 0, i.e. false, as that won't affect value captured but will reduce processor load/unnecessary items displayed. And 0 was supplied to turn off alerts. We maintained other value where necessary but didn't need to worry about text inputs as they are just comments, or colors as just used for display. Note, if wanted to make the supplied inputs as short as possible then could supply:
",7,1000,",,,7,",,,,,,,,,",

Finally, you'll notice this indicator has a 'Maximum History Bars' input that says how far back the indicator will calculate. If you were using our real-time stats system then this would need to be set to how many bars back you were running stats for. However, you could set to {a.tb} where the system will automatically substitute {a.tb} for the number of bars under test. So, specifying the following would be perfect:
",7,{a.tb},",,,7,",,,,,,,,,",

Example 2 - Taking Care With Text/String Inputs

Here we want to turn off alerts, but this is an example of how we need to take care with string inputs:


The first string input is not a comment but is used by the indicator to know what time frame to calculate for. Therefore, it's important to supply the required value "Current", rather than "X" or just ". 'AlertsOn' input is set to 0, i.e. false, which will be sufficient to turn alerts off. So, the inputs would be:
"Current",56,0,2.7,100,0,5000,5,3,3,6,14,14,14,5,7,14,17,0

Again, this indicator as a 'MaxBarsBack' input that says how far back the indicator should calculate for. If using our stats then recommend replacing this with {a.tb}, so if doing that and making inputs as short as possible by replacing 0 with blank, you would get:
"Current",56,,2.7,100,,{a.tb},5,3,3,6,14,14,14,5,7,14,17,

Example 3 - Selection Lists

Here we want to turn off alerts but need to handle selection list inputs:


The indicator input properties to turn alert off would be:
"X",7,1,1000,"X",1,"X",1,"X",0
Here there are a couple of drop-down selection lists for 'Filters' and 'Color Scheme' inputs. Filters is set to 1 because '6 (Confirmed + Average Lag)' is second item down in drop-down list and the same for Color Scheme. Although, Color Scheme would not affect indicator value captured, so could just put 0 and wouldn't affect the buy/sell signal. The string inputs are just comments, so don't need to be supplied if full.

Yet again, this indicator has a 'Maximum History Bars' input, so ideal inputs would be:
",7,1,{a.tb},",1,",1,",