This is a Multiday Strategy on FTSE 100 cfd of Ig Market- Time Frame 1 Hour
Signals are taken from QQE indicator and Universal indicator participates as filter.
The Seasonal optimization is Reiner’s Idea, that work well which we know.
The position are followed by a trailing stop.
Test result are made with FTSE 100 1 € mini Spread 2
Time Frame 1 Hour
Since 16.07.2004 to 01.11.2016
The strategy needs also 3 technical indicators that are also attached at the bottom of the post. These technical indicators are original ones found on the site and modified for the strategy.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
// Definizione dei parametri del codice DEFPARAM CumulateOrders = false // Posizioni cumulate disattivate // define position and money management parameter ONCE positionSize = 1 ONCE maxPositionSizeLong = 10 ONCE maxPositionSizeShort = 10 // define saisonal position multiplier >0 - long ONCE Januaryl = 3 ONCE Februaryl = 1 ONCE Marchl = 3 ONCE Aprill = 3 ONCE Mayl = 1 ONCE Junel = 3 ONCE Julyl = 3 ONCE Augustl = 2 ONCE Septemberl = 1 ONCE Octoberl = 3 ONCE Novemberl = 3 ONCE Decemberl = 3 // saisonal pattern long position IF CurrentMonth = 1 THEN saisonalPatternMultiplierl = Januaryl ELSIF CurrentMonth = 2 THEN saisonalPatternMultiplierl = Februaryl ELSIF CurrentMonth = 3 THEN saisonalPatternMultiplierl = Marchl ELSIF CurrentMonth = 4 THEN saisonalPatternMultiplierl = Aprill ELSIF CurrentMonth = 5 THEN saisonalPatternMultiplierl = Mayl ELSIF CurrentMonth = 6 THEN saisonalPatternMultiplierl = Junel ELSIF CurrentMonth = 7 THEN saisonalPatternMultiplierl = Julyl ELSIF CurrentMonth = 8 THEN saisonalPatternMultiplierl = Augustl ELSIF CurrentMonth = 9 THEN saisonalPatternMultiplierl = Septemberl ELSIF CurrentMonth = 10 THEN saisonalPatternMultiplierl = Octoberl ELSIF CurrentMonth = 11 THEN saisonalPatternMultiplierl = Novemberl ELSIF CurrentMonth = 12 THEN saisonalPatternMultiplierl = Decemberl ENDIF // define saisonal position multiplier >0 short ONCE Januarys = 3 ONCE Februarys = 1 ONCE Marchs = 3 ONCE Aprils = 1 ONCE Mays = 3 ONCE Junes = 3 ONCE Julys = 3 ONCE Augusts = 1 ONCE Septembers = 1 ONCE Octobers = 1 ONCE Novembers = 3 ONCE Decembers = 3 // saisonal pattern short position IF CurrentMonth = 1 THEN saisonalPatternMultipliers = Januarys ELSIF CurrentMonth = 2 THEN saisonalPatternMultipliers = Februarys ELSIF CurrentMonth = 3 THEN saisonalPatternMultipliers = Marchs ELSIF CurrentMonth = 4 THEN saisonalPatternMultipliers = Aprils ELSIF CurrentMonth = 5 THEN saisonalPatternMultipliers = Mays ELSIF CurrentMonth = 6 THEN saisonalPatternMultipliers = Junes ELSIF CurrentMonth = 7 THEN saisonalPatternMultipliers = Julys ELSIF CurrentMonth = 8 THEN saisonalPatternMultipliers = Augusts ELSIF CurrentMonth = 9 THEN saisonalPatternMultipliers = Septembers ELSIF CurrentMonth = 10 THEN saisonalPatternMultipliers = Octobers ELSIF CurrentMonth = 11 THEN saisonalPatternMultipliers = Novembers ELSIF CurrentMonth = 12 THEN saisonalPatternMultipliers = Decembers ENDIF // Condizioni per entrare su posizioni long ignored, indicator1, ignored = CALL "QQE_QUFTSE1HBUY" c1 = (indicator1 CROSSES OVER 50) indicator2, ignored = CALL "UNIV_QUFTSE1H_LOW" c2 = (indicator2 <= 0) c3=(indicator1>66) c4=(indicator1<35) // Condizioni per entrare su posizioni short ignored, indicator3, ignored = CALL "QQE_QUFTSE1HSELL" c5 = (indicator3 CROSSES UNDER 50) c6 = (indicator2 >= 0) C7 = (INDICATOR3<35) C8=(INDICATOR3>56) IF c1 AND c2 THEN IF saisonalPatternMultiplierl > 0 THEN // check saisonal booster setup and max position size IF (COUNTOFPOSITION + (positionSize * saisonalPatternMultiplierl)) <= maxPositionSizeLong THEN BUY positionSize * saisonalPatternMultiplierl CONTRACT AT MARKET ENDIF ELSIF saisonalPatternMultiplierl <> 0 THEN IF (COUNTOFPOSITION + positionSize) <= maxPositionSizeLong THEN BUY positionSize CONTRACT AT MARKET ENDIF endif ENDIF IF C3 OR C4 THEN SELL AT MARKET ENDIF IF not shortonmarket and c5 AND c6 THEN IF saisonalPatternMultipliers > 0 THEN // check saisonal booster setup and max position size IF (COUNTOFPOSITION + (positionSize * ABS(saisonalPatternMultipliers))) <= maxPositionSizeShort THEN SELLSHORT positionSize * ABS(saisonalPatternMultipliers) CONTRACT AT MARKET ENDIF ELSIF saisonalPatternMultipliers <> 0 THEN IF (COUNTOFPOSITION + positionSize) <= maxPositionSizeLong THEN SELLSHORT positionSize CONTRACT AT MARKET ENDIF ENDIF ENDIF IF C7 OR C8 THEN EXITSHORT AT MARKET ENDIF // TRAILING STOP LOGIK TGL =100 TGS= 100 if not onmarket then MAXPRICE = 0 MINPRICE = close PREZZOUSCITA = 0 ENDIF if longonmarket then MAXPRICE = MAX(MAXPRICE,close) if MAXPRICE-tradeprice(1)>=TGL*pointsize then PREZZOUSCITA = MAXPRICE-TGL*pointsize ENDIF ENDIF if shortonmarket then MINPRICE = MIN(MINPRICE,close) if tradeprice(1)-MINPRICE>=TGS*pointsize then PREZZOUSCITA = MINPRICE+TGS*pointsize ENDIF ENDIF if onmarket and PREZZOUSCITA>0 then EXITSHORT AT PREZZOUSCITA STOP SELL AT PREZZOUSCITA STOP ENDIF ONCE maxCandlesShortWithoutProfit =85// limit short loss latest after 85 candles // stop and profit management posProfit = (((close - positionprice) * pointvalue) * countofposition) / pipsize ms = posProfit < 0 AND (BarIndex - TradeIndex) >= maxCandlesShortWithoutProfit IF SHORTONMARKET AND ms THEN EXITSHORT AT MARKET ENDIF set stop ploss 500 set target pprofit 250 |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
It looks very good Ale. Thank you for charing this strategy.
regards,
Patrick
Thanks ALE, very good work . The results are looking impressive. Did you run it on a real account as well?
Maybe Nicolas can backtest it also with the new 10.3 and the Tick/tick version.
RGDS,
Clemens
Hello Guys,I’ve started using it Monday, I hope It work !some beta versions have already been working on demo account.
@DonDollar
Instead of the FTSE100 1euro you can also put the backtest on the normal FTSE100. In that case there is much more history awailable at IG. This actualy also works often with other backtests when there is not as much data available as with the original index or cfd. If you put it on the normal FTSE100 you see that you have data from August 10th. 2010 with more or less the same profitfactor. After that you can put it back to the 1 euro FTSE.
Seems that i do not have permission to upload files (?) otherwise i would have shown you the results. Don’t know why it is not working.
Regards,
Patrick
I’ll try!
some parts of the code are not necessary, update the ITF file in the coming days. however, the result does not change
@DonDollar
It looks like i replied to the wrong message. Please disregard my reply.
Regards,
Hello Ale
Good job. Could you please post the codes of your indicators (and not just the itf). I have some problem with my platform and need the code to create them. Thanks a lot
Ok , as soon as possible!
//PRC_QQE | indicator
//11.10.2016
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
// QQE_QUFTSE1HBUY
//--- parameters
RSIPeriod = 40
SF = 40
QQE=4.236
//---
WildersPeriod = RSIPeriod * 2 - 1
if barindex>WildersPeriod then
MyRsi = rsi[RSIPeriod](close)
RsiMa = exponentialaverage[SF](MyRsi)
AtrRsi = abs(RsiMa[1] - RsiMa)
MaAtrRsi = exponentialaverage[WildersPeriod](AtrRsi)
dar = exponentialaverage[WildersPeriod](MaAtrRsi) * QQE
trr=TrLevelSlow[1]
dv = trr
if RsiMA[0]<trr then
trr = RsiMA[0] + dar
if(RsiMA[1]<dv) then
if(trr>dv) then
trr=dv
endif
endif
elsif RsiMA[0]>trr then
trr = RsiMA[0] - dar
if(RsiMA[1]>dv) then
if(trr<dv) then
trr=dv
endif
endif
endif
TrLevelSlow=trr
endif
RETURN trr coloured(0,0,0) as \"QQE\" , RsiMA coloured(0,10,0) as \"RsiSA\", 50 as \"level 50\"
//PRC_QQE | indicator
//11.10.2016
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
// QQE_QUFTSE1HSEE
//--- parameters
RSIPeriod = 50
SF = 50
QQE=4.236
//---
WildersPeriod = RSIPeriod * 2 - 1
if barindex>WildersPeriod then
MyRsi = rsi[RSIPeriod](close)
RsiMa = exponentialaverage[SF](MyRsi)
AtrRsi = abs(RsiMa[1] - RsiMa)
MaAtrRsi = exponentialaverage[WildersPeriod](AtrRsi)
dar = exponentialaverage[WildersPeriod](MaAtrRsi) * QQE
trr=TrLevelSlow[1]
dv = trr
if RsiMA[0]<trr then
trr = RsiMA[0] + dar
if(RsiMA[1]<dv) then
if(trr>dv) then
trr=dv
endif
endif
elsif RsiMA[0]>trr then
trr = RsiMA[0] - dar
if(RsiMA[1]>dv) then
if(trr<dv) then
trr=dv
endif
endif
endif
TrLevelSlow=trr
endif
RETURN trr coloured(0,0,0) as \"QQE\" , RsiMA coloured(200,10,0) as \"RsiSA\", 50 as \"level 50\"
//-------------------------------------------------------------------------
// UNIVERSAL POSTED BY NICOLAS
//-------------------------------------------------------------------------
//UNIV_QUFTSE1H_LOW
bandedge=70
whitenoise= (Close - Close[65])
if barindex>bandedge then
// super smoother filter
a1= Exp(-1.414 * 3.14159 / bandedge)
b1= 2*a1 * Cos(1.414*180 /bandedge)
c2= b1
c3= -a1 * a1
c1= 1 - c2 - c3
filt= c1 * (whitenoise + whitenoise[1])/2+ c2*filt[1] + c3*filt[1]
filt1 = filt
if ABS(filt1)>pk[1] then
pk = ABS(filt1)
else
pk = 0.991* pk[1]
endif
if pk=0 then
denom = -1
else
denom = pk
endif
if denom = -1 then
result = result[1]
else
result = filt1/pk
endif
endif
RETURN result COLOURED(200,0,255) as \"PRICE ACTION\", 0 as \"0\"
Surely not a problem, you have certainly reached the maximum allowed codes of your account. Go Premium!
Thanks a lot.
Thanks for sharing Ale. Can I clarify something. You have:
ONCE maxPositionSizeLong = 10
ONCE maxPositionSizeShort = 10
Surely, the max position variable can not come in to play with DEFPARAM CumulateOrders = false
It will only take a maximum position size of 3, or 6 for reversing, based on the seasonal multiplier.
Unless I am missing something, you don’t need this bit of code unless DEFPARAM CumulateOrders = true
Could you also let us know what variables are optimised?
Good work, cheers.
–
Hi Cosmic,
thanks for your attention, as I’ve mentionad above, there are a misprint in the code above, now I post the correct version.
// Definizione dei parametri del codice
DEFPARAM CumulateOrders = false // Posizioni cumulate disattivate
// define position and money management parameter
ONCE positionSize = 1
// define saisonal position multiplier >0 - long
ONCE Januaryl = 3
ONCE Februaryl = 1
ONCE Marchl = 3
ONCE Aprill = 3
ONCE Mayl = 1
ONCE Junel = 3
ONCE Julyl = 3
ONCE Augustl = 2
ONCE Septemberl = 1
ONCE Octoberl = 3
ONCE Novemberl = 3
ONCE Decemberl = 3
// saisonal pattern long position
IF CurrentMonth = 1 THEN
saisonalPatternMultiplierl = Januaryl
ELSIF CurrentMonth = 2 THEN
saisonalPatternMultiplierl = Februaryl
ELSIF CurrentMonth = 3 THEN
saisonalPatternMultiplierl = Marchl
ELSIF CurrentMonth = 4 THEN
saisonalPatternMultiplierl = Aprill
ELSIF CurrentMonth = 5 THEN
saisonalPatternMultiplierl = Mayl
ELSIF CurrentMonth = 6 THEN
saisonalPatternMultiplierl = Junel
ELSIF CurrentMonth = 7 THEN
saisonalPatternMultiplierl = Julyl
ELSIF CurrentMonth = 8 THEN
saisonalPatternMultiplierl = Augustl
ELSIF CurrentMonth = 9 THEN
saisonalPatternMultiplierl = Septemberl
ELSIF CurrentMonth = 10 THEN
saisonalPatternMultiplierl = Octoberl
ELSIF CurrentMonth = 11 THEN
saisonalPatternMultiplierl = Novemberl
ELSIF CurrentMonth = 12 THEN
saisonalPatternMultiplierl = Decemberl
ENDIF
// define saisonal position multiplier >0 short
ONCE Januarys = 3
ONCE Februarys = 1
ONCE Marchs = 3
ONCE Aprils = 1
ONCE Mays = 3
ONCE Junes = 3
ONCE Julys = 3
ONCE Augusts = 1
ONCE Septembers = 1
ONCE Octobers = 1
ONCE Novembers = 3
ONCE Decembers = 3
// saisonal pattern short position
IF CurrentMonth = 1 THEN
saisonalPatternMultipliers = Januarys
ELSIF CurrentMonth = 2 THEN
saisonalPatternMultipliers = Februarys
ELSIF CurrentMonth = 3 THEN
saisonalPatternMultipliers = Marchs
ELSIF CurrentMonth = 4 THEN
saisonalPatternMultipliers = Aprils
ELSIF CurrentMonth = 5 THEN
saisonalPatternMultipliers = Mays
ELSIF CurrentMonth = 6 THEN
saisonalPatternMultipliers = Junes
ELSIF CurrentMonth = 7 THEN
saisonalPatternMultipliers = Julys
ELSIF CurrentMonth = 8 THEN
saisonalPatternMultipliers = Augusts
ELSIF CurrentMonth = 9 THEN
saisonalPatternMultipliers = Septembers
ELSIF CurrentMonth = 10 THEN
saisonalPatternMultipliers = Octobers
ELSIF CurrentMonth = 11 THEN
saisonalPatternMultipliers = Novembers
ELSIF CurrentMonth = 12 THEN
saisonalPatternMultipliers = Decembers
ENDIF
// Condizioni per entrare su posizioni long
ignored, indicator1, ignored = CALL \"QQE_QUFTSE1HBUY\"
ignored, indicator3, ignored = CALL \"QQE_QUFTSE1HSELL\"
indicator2, ignored = CALL \"UNIV_QUFTSE1H_LOW\"
c1 = (indicator1 CROSSES OVER 50)
c2 = (indicator2 <= 0)
c3=(indicator1>66)
c4=(indicator1<35)
// Condizioni per entrare su posizioni short
c5 = (indicator3 CROSSES UNDER 50)
c6 = (indicator2 >= 0)
C7 = (INDICATOR3<35)
C8=(INDICATOR3>56)
IF c1 AND c2 THEN
IF saisonalPatternMultiplierl > 0 THEN // check saisonal booster setup and max position size
BUY positionSize * saisonalPatternMultiplierl CONTRACT AT MARKET
ENDIF
IF C3 OR C4 THEN
SELL AT MARKET
ENDIF
ELSIF c5 AND c6 THEN
IF saisonalPatternMultipliers > 0 THEN // check saisonal booster setup and max position size
SELLSHORT positionSize * saisonalPatternMultipliers CONTRACT AT MARKET
ENDIF
ENDIF
IF C7 OR C8 THEN
EXITSHORT AT MARKET
ENDIF
// TRAILING STOP LOGIK
TGL =100
TGS= 100
if not onmarket then
MAXPRICE = 0
MINPRICE = close
PREZZOUSCITA = 0
ENDIF
if longonmarket then
MAXPRICE = MAX(MAXPRICE,close)
if MAXPRICE-tradeprice(1)>=TGL*pointsize then
PREZZOUSCITA = MAXPRICE-TGL*pointsize
ENDIF
ENDIF
if shortonmarket then
MINPRICE = MIN(MINPRICE,close)
if tradeprice(1)-MINPRICE>=TGS*pointsize then
PREZZOUSCITA = MINPRICE+TGS*pointsize
ENDIF
ENDIF
if onmarket and PREZZOUSCITA>0 then
EXITSHORT AT PREZZOUSCITA STOP
SELL AT PREZZOUSCITA STOP
ENDIF
ONCE maxCandlesShortWithoutProfit =85// limit short loss latest after 85 candles
// stop and profit management
posProfit = (((close - positionprice) * pointvalue) * countofposition) / pipsize
ms = posProfit < 0 AND (BarIndex - TradeIndex) >= maxCandlesShortWithoutProfit
IF SHORTONMARKET AND ms THEN
EXITSHORT AT MARKET
ENDIF
set stop ploss 500
set target pprofit 250
The first thing that I’d ask you is to test the strategy without optimization of the number of position x season, to define the real average gain point.
The variables optimized to run the strategy on FTSE 100 with 1h time frame are:
INDICATORS:QQE – Rsi period – Exponential average period
UNIVERSAL – Bandedge – Whitenoise
SELL :
Overbought indicator position
EXITSHORT:
Oversold indicator position
TRAILING STOP:
Distance
STOP – TAKE PROFIT:
Distance
Thanks Ale, I will spend some time later looking at the indicators. Did you try on the other indices yet?
Ho cosmic
yes I’m going to share Dax (1€ mini cfd) 1 H Times frame.
Thanks
DAX was my thought as well. Did you optimise the compete history or use an IN/OUT sample or another way to avoid curve fitting?
DAX Only test complete history (10y), and y/y
Grande ALE!
It will be interesting to see your DAX version and compare that to Pathfinder DAX as I have noticed some similarities of trades between Pathfinder FTSE version and this strategy. Would you optimise just until 2014 for example to avoid curve fitting? Confidence can then be a lot higher of success going forward. Good work Ale.
Dax is in pending review..
Hi cosmic,
Which reason think of to optimise just untill 2014? It’s import to know which variebles to move.
Hi Ale, Jan 2014 is around 2/3 of the history I have with IG, 200,000 units on spreadbet. I have just used that sample period and optimised C3, C4, C7, C8, TGL, TGS, Stop and Take Profit and the good news is that the optimised results for that period (although slightly different) makes barley any difference using those variables on the whole sample compared to your version. I will throw some more at it soon but looks good so far and in my opinion not curve fitted.
Thanks Cosmic .. This is beautiful news!
Hi Ale,
Have you used this live yet?
Hi jake yes since 11 november
Hi Ale
could you be more specific about the results of this strategy you are using live ?
Reb
Yes Next month I’ve only one position
How is this system performing live guys? Has anyone been running it?
Hi Ale, can you please share your live results and updated version with us? Was this strategy as good as the back test?
Hello ellejoe,since 1th november 2016,I can confirm probacktest results, I cant run it in live account, but I’ve results of demo account since 5 december 2016 : open long 6-dic-2016 -18.00.01 at 6790,6 close position 12-dic-2016 – 00.09.18 at 7.040,6I haven’t an update version
I’m new to PRT, and yet I know I need to take away the ‘human emotion’ from my trading – so PRT is going to be an interesting option. Although I feel that ‘working’ the charts and taking the max profits may prove optimal (as I have enjoyed good profits since April), I know that the human in me holds on to losses too – hence checking out PRT. I’ve used this strategy (thanks ALE) – and tweaked the following (time = 2 mins, TGL & TGS = 10, pprofit = 20) and this backtested looks unreal! I’m going to run my variation now for a few days on demo account, but if this gives any sign of profitable outcome, I’ll definitely spend more time tweaking further… ALE, salutations to you!