Honest Predictor for Binary Options
Honest Predictor indicator (iHP) predicts trend direction at a given "expiry time" making it particularly suitable for traders operating with Binary Options. Its main features are:
- "Honest" statistical information provided about the level of reliability of the trend predictions.
- No redrawing, no recalculation performed. The indicator is stable and calculated only on closed bars (not on ticks).
- Positions outcome evaluated on actual closing prices.
- Based on the RSI technical indicator within a multi-timeframe confirmation strategy.
The indicator is optimized for H1 timeframe giving best results with an expiry time from 1 to 3 bars (that is, from 1 to 3 hours).
- Duration of backtesting in days: history duration (in days) on the chart for the purposes of the evaluation of indicator accuracy (=percentage of successful positions), statistical reliability level and visual analysis.
- Indicator threshold: minimum threshold of the indicator for generating an alert.
- Expiry Time in bars: assumed expiration for the binary options suggested by the indicator.
The default value of the duration of the backtesting is 30 days, so that positions are numerous enough to make the accuracy statistically significant. However, the user should also try to reduce it, so as to get indications on a more recent statistics paying attention to avoid too small number of positions that could lead to "POORLY RELIABLE" or "UNRELIABLE" conditions (see below). In the latter case, no alert is provided by the indicator. These negative conditions could also be due to an accuracy that is too close to the "random" 50% value.
To get high accuracy, the user should try to adjust both the Indicator Threshold (between 0 and 10) and the Expiry Time in bars (typically from 1 to 4).
Try the demo version before purchasing! Test it on the assets and with the parameters listed in the following Table (timeframe: H1, 30 days backtesting).
|Asset||Indicator Threshold||Expiry Time (bars)|
On the chart (see the screenshots) and within the backtesting duration (delimited by two vertical lines), down (red) and up (green) arrows indicate the predicted PUT or CALL positions, respectively, that were successful at the given expiry time (in-the-money positions), while yellow arrows represent failed predictions (out-of-the-money). Of course, very recent positions cannot be checked until they enter the backtesting period, when their expiry time passed.
On the upper-left corner, both the estimated accuracy and the p-value are reported and constantly updated.
WARNING: because of the multi-timeframe strategy, alerts are displayed with a certain delay after the closing time of the last formed bar.
Always pay attention to both the emission and expiration times of a position in the alert message!
Some Statistics Background
A binary option can either success or fail thus, from a statistical point of view, it can be considered a Binomial random variable. This allows us to define a statistical level of reliability of the indicator in predicting the right sign of the asset price variation at the given expiry time. The reliability can be quantified by the so-called p-value. This number is equal to the probability that the same accuracy could be achieved just by chance. The less the p-value, the more reliable and significant the indicator predictions.
In general, if p>0.1, the predictions should be totally ignored (fully unreliable); if 0.05 < p < 0.1, it is considered "poorly reliable" (it could be accepted but with relatively high risk), while only when p < 0.05 the prediction is said to be moderately reliable and when p < 0.01 it is reliable.
Apart from accuracy estimated on the historical data period specified by the user (backtesting), iHP also provides the p-value as a measure of the reliability level of this accuracy.
In this way, a user is better aware of the "risk level", so as to take the right decision to believe the indicator or not.
If the special "keywords" $TI, $ET, $SY, $TF and $SP are included within the customized alert messages, they will be automatically replaced by the execution time, the expiry time, the symbol name, the timeframe and the strike price, respectively.
For example, if the 'PUT/DOWN Alert Message Text' input field is set as
"Make a PUT on $SY,$TF at $TI with exp. at $ET, price= $SP"
then the alert message for a put position would be something like:
"Make a PUT on EURUSD,M15 at 16:30 with exp. at 17:00, price= 1.10620"
Remember that the strike price represents the Ask or Bid price at the execution time of a Call or Put position, respectively.
Starting from this version, the "Helping Honest Predictor" script is no longer compatible with this indicator.
- Added the display of required and available number of bars when they are not enough to perform backtesting.
This "self-optimizer" makes the use of the "Helping Honest Predictor" script no longer necessary (though ver. 1.4 can still be used, e.g. to maximize profit instead of accuracy).
As regards this self-optimizer the following parameters were added:
- 'Self-Optimization Enabled' flag to enable/disable the built-in optimizer.
- 'Self-Optimization Frequency in HOURS' specifying how often the self-optimizer is automatically re-launched during iHP execution (note: if the last self-optimization failed then this interval is halved).
- 'Max Expiry Time in Self-Optimization' which represents the maximum expiry time the self-optimizer will test (the minimum value being always 1 bar).
- 'Minimum Accuracy in Self-Optimization': the self-optimizer will ignore the values of the optimized parameters that give an accuracy below this lower limit.
- The 'Minimum Reliability for Alerts and Optimization' parameter, apart from being the lower limit of the reliability level of the backtesting signals below which alerts are not displayed, now it also represents the minimum reliability the optimized parameters have to produce so as to be considered "good enough" by the self-optimizer.
If the self-optimizer does not find any parameters value satisfying these conditions, an on-chart text informs the user about that and the parameters are left unchanged.
- Added a group of four parameters (below the comment line "On-chart text settings") that regulate the position (X and Y pixel distance from the upper-left chart corner) and colors of the text informing about parameters and statistics.
- A set of parameters and flags were added to implement a "Time Management" system. Thanks to 5 flags setting it is now possible to allow/forbid alerts to be displayed on the corresponding week day (from Monday to Friday), while the 'Alert Time Slots' string allows the user to specify a variable number of "time slots" in which alerts can be displayed.
Any slot must be set as a "from, to" pair of comma-separated times (both must be expressed in the hh:mm format) and all the slots must also be comma-separated.
For example, "10:00,15:00,22:30,24:00" means that alerts will be displayed only from 10 a.m. to 3 p.m. and from 10:30 p.m. to midnight (warning: server time is used!), while "00:00,24:00" means anytime (default setting).
Notice that the time management also affects backtesting signals and the corresponding statistics.
- Minor bug fixed in the positions outcome evaluation when a non-zero spread is set.
Long-term optimization and backtesting can be done with the "Testing Honest Predictor" EA, ver. 1.9 (presently under development).
- Indicator code has been optimized to a faster execution.
- Minor bug fixed in the positions journaling: latest positions were not considered and printed. Moreover, their expiry time is now printed.
- Alert messages are now "customizable"
This version can be optimized by the "Helping Honest Predictor" script ver.1.4.
It is advisable to do long-term optimization and backtesting with the "Testing Honest Predictor" EA, ver. 1.8.
Now the trend prediction mode is fixed by the user by setting the former parameter and cannot change any longer during the indicator execution.
This improves the indicator stability and redrawing can never occur.
- Marginal bug fixed: position times printed in the journal take now correctly into account the "Time Offset" set by the user.
- The indicator name that appears on the chart has been updated (the Spread and the Trend Prediction Mode are also shown in the name).
This version can be optimized by the "Helping Honest Predictor" script ver.1.4, which now optimizes the "Trend Prediction Mode" too.
Similarly, long-term optimization and backtesting can be done with the "Testing Honest Predictor" EA, ver. 1.7.
- Added "Spread" (in pips) input parameter (broker dependent). This value will be added to the CALL/UP position bar closing price to calculate its 'strike price' and to the PUT/DOWN position expiry bar closing price to get its 'expiry price'.
If a negative value is given then the spread is set as equal to the Ask-Bid difference at the moment of the indicator loading.
Please note that this is only an approximation of what normally happens in a real account, where the spread is variable in time.
Also, bear in mind that the spread is an important parameter that could heavily affect the indicator accuracy on a real account, especially on short timeframes.
At this respect, the user should avoid brokers that are not sufficiently
clear and "transparent" about their spread policy!
- Added "History on Journal" flag which enables the log printing of the outcomes of all the positions that are displayed on the alert messages, as well as the corresponding statistics.
This allows the user to do a full backtesting on times much longer than those involved in the indicator internal backtesting.
That can be done also with the DEMO version within the Strategy Tester just by selecting "Indicator" instead of "Expert Advisor" in the "Setting" tab, and "HonestPredictor" as an indicator to test. The user can then set the parameters to test by clicking the "Indicator properties" button, choosing the time interval to test, the symbol, the timeframe, etc. Then, after starting the Tester, the indicator will print on the journal the outcomes of all alerted positions in addition to the "evolving" accuracy.
This is important for the user to evaluate the goodness of the given parameters in leading to a high enough accuracy, in a way similar to what is normally done with Expert Advisors for forex trading.
Parameters long-term optimization can be done by using the ver. 1.6 of "Testing Honest Predictor" EA.
- Added "Minimum Reliability for Alert" that allows the user to set the minimum reliability threshold for an alert to be given (this also affects the positions printed on the journal).
This version is compatible with the "Helping Honest Predictor" optimizer script v.1.3.
- IMPORTANT BUG correction: the position and expiry time reported in the Alert messages are NOT in GMT as erroneously stated in previous versions. They are in Server time (some servers use GMT, some do not).
Depending on the user convenience, she/he can now set the above-described "Time Offset" parameter, as an amount of hours to add (or subtract if negative) to the Server time to give position and expiry time in the alerts.
This version is compatible with the "Helping Honest Predictor" optimizer script v.1.2.
- Alerts are now displayed only when the backtesting statistics is at least MODERATELY RELIABLE.
- Chart time gaps (e.g. weekends) are excluded from backtesting.
This version is compatible with the "Helping Honest Predictor" optimizer script v.1.2.
- Added "Trend Prediction Mode Reversible" option: if enabled, the trend prediction mode (either "trend continuation" or "trend reversal") can change at any time, as soon as the backtesting accuracy drops below 50%.
When this happens, the indicator restarts and all positions are recalculated.
If disabled, the trend prediction mode is fixed since the beginning and cannot change any longer.
The option is forcedly enabled while testing.
The currently adopted mode is reported in the comment, as well as in the journal when it changes.
- Minor bugs corrected.
- small bug corrected in the trend searching logic
Please, read the comment #7 I made on 2015.04.28