Expert Advisor Testing Honest Predictor

Buy Testing Honest Predictor Expert Advisor in the store selling algo trading systems

This sim­ple Test­ing Hon­est Pre­dic­tor (THP) Expert Advi­sor was cre­at­ed in order to eas­i­ly and mean­ing­ful­ly test the Hon­est Pre­dic­tor indi­ca­tor (iHP) per­for­mances, with­in the MT4 Strat­e­gy Tester.

Giv­en an asset and a time­frame, THP selects a part of the posi­tions dis­played by iHP and prints on the jour­nal (screen­shot #2) the per­cent­age of win­ning posi­tions as if they were exe­cut­ed by a user.

It accepts only posi­tions for which iHP sug­gests a reli­a­bil­i­ty lev­el notUNRELIABLE” and a prob­a­bil­i­ty high­er than a giv­en Min­i­mum Accu­ra­cy.

From the tests done, the Hon­est Pre­dic­tor indi­ca­tor seems to avoid “nat­u­ral­ly” unfa­vor­able mar­ket con­di­tions, although a mul­ti-asset approach is need­ed to com­pen­sate for the low fre­quen­cy of posi­tions (note that the indi­ca­tor payed ver­sion can be attached on as many charts as you want, at the same time).

THP Usage

Input Para­me­ters:

  • Dura­tion of Back­test­ing in days: the dura­tion of the back­test­ing used by iHP to eval­u­ate accu­ra­cy (=per­cent­age of win­ning posi­tions) and reli­a­bil­i­ty lev­el
  • Indi­ca­tor Thresh­old: the lim­it above which iHP gen­er­ates a posi­tion.
  • Expiry Time in bars: the expi­ra­tion (in bars) for the posi­tions gen­er­at­ed by iHP.
  • Min­i­mum Accu­ra­cy: min­i­mum thresh­old of the back­test­ing iHP accu­ra­cy above which THP accepts the posi­tions gen­er­at­ed by iHP.
  • Ver­bosi­ty Lev­el: if =1 it also lists all the accept­ed posi­tion.

The first 3 para­me­ters are just passed to the indi­ca­tor (see here for a full descrip­tion).

Set the test­ing peri­od in the Strat­e­gy Tester, press Start (Open Price mode can be used) and THP will print on the jour­nal (screen­shot #2) the per­cent­age of win­ning posi­tions that you would have obtained by exe­cut­ing the indi­ca­tor posi­tions when its esti­mat­ed accu­ra­cy is above theMin­i­mum Accu­ra­cy and when the UNRELIABLE con­di­tion does not hold.

No trad­ing orders are per­formed.

Interfacing iHP to an EA

For users who want to embed the iHP with­in an Expert Advi­sor, I report below a code exam­ple.

His­to­ry­Days, Thresh­old and Expi­ra­tion con­tain the 3 para­me­ters val­ues that have to be passed to the indi­ca­tor.

Giv­en a bar shift (> 0 and < HistoryDays*1440/Period()), the first 4 buffers can be read to check if iHP found a posi­tion at that bar or not:

string IndiName = "HistoryPredictor.ex4"; //name of the available iHP executable
double UpWon=iCustom(NULL,0,IndiName,HistoryDays,Threshold,Expiration,0,shift);
double DownWon=iCustom(NULL,0,IndiName,HistoryDays,Threshold,Expiration,1,shift);
double UpFail=iCustom(NULL,0,IndiName,HistoryDays,Threshold,Expiration,2,shift);
double DownFail=iCustom(NULL,0,IndiName,HistoryDays,Threshold,Expiration,3,shift);

They refer to: win­ning CALL posi­tions (0), win­ning PUT posi­tions (1), los­er CALL posi­tions (2) and los­er PUT posi­tions (3).

EMPTY_VALUE is returned if there is no posi­tion of that type at that shift.

Please note that the posi­tion out­come is known only if shift > Expi­ra­tion, i.e. if it expired and the bar entered the back­test­ing peri­od. Oth­er­wise, while the out­come remains unknown, the posi­tion is record­ed only in buffers 0 or 1.

WARNING: if you plan to use your EA in the Strat­e­gy Tester at shift=1, then intra-bar mod­el­ing is need­ed and Every tick mode must be set! This is because iHP gen­er­ates posi­tions on var­i­ous ticks after the clos­ing time of the bar at shift=1.

To obtain sta­tis­ti­cal infor­ma­tion, both the total num­ber of posi­tions (6th buffer) and that of the win­ning ones (7th buffer) that were found with­in the iHP His­to­ry­Days-long back­test­ing peri­od can be read as:

int TotalHistoryPos = int( iCustom(NULL,0,IndiName,HistoryDays,Threshold,Expiration,5,shift ) );
int TotalHistoryWon = int( iCustom(NULL,0,IndiName,HistoryDays,Threshold,Expiration,6,shift ) );

For exam­ple, one could eval­u­ate the accu­ra­cy and ignore the last indi­ca­tor pre­dict­ed posi­tion when this accu­ra­cy is unknown or below 70%:

if (TotalHistoryPos == 0 || double(TotalHistoryWon)/double(TotalHistoryPos) < 0.7) return;

More­over, the p-val­ue can be read from the 8th buffer, for instance to exclude UNRELIABLE con­di­tions:

double pvalue = iCustom(NULL,0,IndiName,HistoryDays,Threshold,Expiration,7,shift);
if (pvalue >= 0.1) return;

Testing Honest Predictor

Relat­ed Posts
Expert Advisor Guard SL TP
Each of us has a devel­oped trad­ing tech­nique, and the key points of every tech­nique are Stop Loss and Take Prof­it lev­els. This sim­ple EA is designed to keep an eye …
READ MORE
Expert Advisor CamelAverageLevel
Camel series con­tains three scripts: CamelAv­er­ageLev­el, CamelMod­i­fy and Camel­Su­per­Pips­Buy. CamelAv­er­ageLev­el is a non-trad­ing EA dis­play­ing a breakeven lev­el on the sym­bol it is attached to. The only para­me­ter is Add­Point — …
READ MORE
Expert Advisor MY TRADES MT4 FREE
This prod­uct helps per­form­ing FullScreen Trad­ing. The big­ger the chart size, the more minute changes we can notice. With this prod­uct, you do not need to open Ter­mi­nal win­dow to mon­i­tor …
READ MORE
Expert Advisor SmartTrailing
The Expert Advi­sor mod­i­fies Sto­pLoss orders. The trad­ing robot can be applied to any sym­bol win­dow. It tracks all open posi­tions and works with each of them.  If nec­es­sary, infor­ma­tion about the …
READ MORE
Expert Advisor CloneIt4 Demo Trade Copier
Imag­ine the pow­er of Meta­Trad­er 5 in your Meta­Trad­er 4 account Now you can do that with CloneIt4 and CloneIt5. CloneIt4 will copy the great trades you per­form in your Meta­Trad­er 5 account …
READ MORE
Expert Advisor Shmendridge 1000
Fea­tures No mar­tin­gale or oth­er suspicious/dangerous MM. No sus­pi­cious drawdowns. Stan­dard bro­ker stop-loss placed on all orders. No hard-cod­ed tricks. Set your own risk to reward. Very sim­ple and safe mon­ey man­age­ment. Good set­tings will work across mul­ti­ple …
READ MORE
Expert Advisor EXECUTOR FREE
EXECUTOR FREE is a sim­ple and effec­tive strat­e­gy. The EA uses WPR indi­ca­tor. Fea­tures EURJPY, GBPJPY only. Inter­val — H1 rec­om­mend­ed. Work­ing with 4 and 5‑digit bro­kers. Long posi­tions only. Input Para­me­ters Para­me­ter — para­me­ter for opti­miz­ing …
READ MORE
Expert Advisor Show Trades
This indi­ca­tor will show all your his­tor­i­cal trades on the chart. Buy trades have a blue frame.  Sell trades have a red frame. Prof­itable trades are green fill.  Loss trades are gray …
READ MORE
Expert Advisor PZ Whale EA
Are you a trend fol­low­er? The Pz Whale EA helps you to nav­i­gate the mar­kets just like hedge funds do. Since 1970’s and ear­li­er, sim­ple trend fol­low­ing sys­tems have demon­strat­ed …
READ MORE
Expert Advisor PZ Goldfinch Scalper EA
The PZ Goldfinch Expert Advi­sor is a pure math­e­mat­i­cal scalper that trades tick data aggres­sive­ly. It imple­ments a sim­ple and uni­ver­sal trad­ing strat­e­gy which can be applied to any instru­ment. How­ev­er, it …
READ MORE
Expert Advi­sor Guard SL TP
Expert Advi­sor CamelAv­er­ageLev­el
Expert Advi­sor MY TRADES MT4
Expert Advi­sor Smart­Trail­ing
Expert Advi­sor CloneIt4 Demo Trade Copi­er
Expert Advi­sor Shmen­dridge 1000
Expert Advi­sor EXECUTOR FREE
Expert Advi­sor Show Trades
Expert Advi­sor PZ Whale EA
Expert Advi­sor PZ Goldfinch Scalper EA

Leave a Reply

 

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.