Discussing the strategy VECTORIAL DAX (M5)
Forums › ProRealTime English forum › ProOrder support › Discussing the strategy VECTORIAL DAX (M5)
- This topic has 1,260 replies, 124 voices, and was last updated 1 month ago by Greger2346.
-
-
10/23/2020 at 9:28 AM #14815310/23/2020 at 1:38 PM #148231
which parameters would you then optimise?
There are many parameters, but with walk forward I focussed on the rsi stochastic, only 2 parameters, 10-50k bars, unlinked with 3 repeats. Whatever you try, likely the last week will be neutral to very bad.
@ichimoku18 yes your right that was the intend, changing it would make it worse, so I leave it at current & previous bar and removed the last part. It could be better written too.
2 users thanked author for this post.
10/23/2020 at 1:41 PM #14823310/23/2020 at 1:49 PM #148235Hi,
only the first 2. Having said that i’am just a bit experimenting.
1234lengthrsi = 2 // rsi periodlengthstoch = 6 // stochastic periodsmoothk = 4 // smooth signal of stochastic asmoothd = 8 // smooth signal of smoothed stochasticdax 10s today. I know it’s not realistic with the stops etc and a lot would needs to be changed, but still.
10/23/2020 at 2:09 PM #14824210/23/2020 at 2:15 PM #148244I use Stoch/RSI a lot, it’s one of my favourite indicators, but I find that you really have to optimise all the variables as each one reacts to other changes. With most indicators you usually have a reasonable expectation that if a value of 14 is good, then 12 or 16 will be a bit better or a bit worse. With Stoch/RSI values of 12, 14, 8, 2 could look good one minute then suddenly something like 8,6,8,4 is miles better – impossible to predict the optimal result. Default values are 14,14,10,3 as a theoretical starting point.
I usually run it with variations of 4 to 16 by 2 for the first 3, and 2 to 5 by 1 for smoothd (must be >1). Unfortunately that makes +1000 permutations so it’s time consuming, but almost always worth it – can massively improve almost any algo if you get it right.
1 user thanked author for this post.
10/23/2020 at 2:32 PM #148245@Volpiemanuele, I tried to implement it on DJ 3 minutes and no orders showed up… Any ideas why?
10/23/2020 at 2:51 PM #148247@tanou: The last entry was this morning at 5am and still in progress … my live account
10/23/2020 at 2:56 PM #14824810/23/2020 at 3:33 PM #14825310/23/2020 at 6:34 PM #14826910/23/2020 at 6:44 PM #148270Do not hesitate to give me your feedback. I’ve worked on this, I haven’t fully optimize it for now, just had a look at the mistakes it was doing and try to eliminate them with a simple Ichimoku.
@Nonetheless & @Paul, hope you see something interesting, I think it is123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291// VECTORIAL MM - DJ 3m - Tanou v10DEFPARAM CumulateOrders = falseDEFPARAM Preloadbars = 50000//--------------------------------------------------------------------------------------------------------------------------------------------------//Money Managementpositionsize=1//--------------------------------------------------------------------------------------------------------------------------------------------------//HORAIRES DE TRADINGCtime = time >= 153000 and time < 210000//--------------------------------------------------------------------------------------------------------------------------------------------------//STRATEGIE//VECTEUR = CALCUL DE L'ANGLEi1 = HistoricVolatility[10](close)c1 = (i1 >= 0.06)ONCE PeriodeA = 4ONCE nbChandelierA= 30MMA = Exponentialaverage[PeriodeA](close)ADJASUROPPO = (MMA-MMA[nbchandelierA]) / nbChandelierAANGLE = (ATAN(ADJASUROPPO)) //FONCTION ARC TANGENTECB1 = ANGLE >= 34CS1 = ANGLE <= - 48//VECTEUR = CALCUL DE LA PENTE ET SA MOYENNE MOBILEONCE PeriodeB = 30ONCE nbChandelierB= 35lag = 0MMB = Exponentialaverage[PeriodeB](close)pente = (MMB-MMB[nbchandelierB]) / nbchandelierBtrigger = Exponentialaverage[PeriodeB+lag](pente)CB2 = (pente > trigger) AND (pente < 0)CS2 = (pente CROSSES UNDER trigger) AND (pente > - 0.5)mx = average[67,0](close)CB3 = mx > mx[1]mx2 = average[21,0](close)CS3 = mx2 < mx2[1]// ichimokuTenkan = (highest[9](high)+lowest[9](low))/2Kijun = (highest[26](high)+lowest[26](low))/2SSpanA = (tenkan[26]+kijun[26])/2SSpanB = (highest[52](high[26])+lowest[52](low[26]))/2////chikou=close//If SSpanA>SSpanB then//IntervalS=SSpanA-SSpanB//Elsif SSpanB>SSpanA then//IntervalS=SSpanB-SSpanA//endifIf SSpanA>SSpanB thenif open<SSpanA and open>SSpanB or close<SSpanA and close>SSpanB thenCondIchi = 0ElseCondIchi = 1endifendifIf SSpanB>SSpanA thenif open>SSpanA and open<SSpanB or close>SSpanA and close<SSpanB thenCondIchi = 0ElseCondIchi = 1endifendif//--------------------------------------------------------------------------------------------------------------------------------------------------//ENTREES EN POSITIONCONDBUY = CB1 and CB2 and CB3 and CTime and c1 and CondIchiCONDSELL = CS1 and CS2 and CS3 and Ctime and c1 and CondIchiVarDistIchiBuy = 6VarDistIchiSell = 21If CONDBUY thenDistIchiSSA = Open - SSpanADistIchiSSB = Open - SSpanBCondDistIchi = DistIchiSSA >= VarDistIchiBuy AND DistIchiSSB >= VarDistIchiBuyEndifIf CONDSELL thenDistIchiSSA = SSpanA - OpenDistIchiSSB = SSpanB - OpenCondDistIchi = DistIchiSSA >= VarDistIchiSell AND DistIchiSSB >= VarDistIchiSellEndifCONDBUY = CONDBUY and CondDistIchiCONDSELL = CONDSELL and CondDistIchi//--------------------------------------------------------------------------------------------------------------------------------------------------//Entrée en position//POSITION LONGUEIF CONDBUY THENbuy positionsize contract at marketSET STOP %LOSS 2.6ENDIF//POSITION COURTEIF CONDSELL THENSellshort positionsize contract at marketSET STOP %LOSS 0.6ENDIF//--------------------------------------------------------------------------------------------------------------------------------------------------//SET TARGET %PROFIT 2//Break evenbreakevenPercent = 0.13PointsToKeep = 1startBreakeven = tradeprice(1)*(breakevenpercent/100)once breakeven = 1//1 on - 0 off//reset the breakevenLevel when no trade are on marketif breakeven>0 thenIF NOT ONMARKET THENbreakevenLevel=0ENDIF// --- BUY SIDE ---//test if the price have moved favourably of "startBreakeven" points alreadyIF LONGONMARKET AND close-tradeprice(1)>=startBreakeven THEN//calculate the breakevenLevelbreakevenLevel = tradeprice(1)+PointsToKeepENDIF//place the new stop orders on market at breakevenLevelIF breakevenLevel>0 THENSELL AT breakevenLevel STOPENDIF// --- end of BUY SIDE ---IF SHORTONMARKET AND tradeprice(1)-close>startBreakeven THEN//calculate the breakevenLevelbreakevenLevel = tradeprice(1)-PointsToKeepENDIF//place the new stop orders on market at breakevenLevelIF breakevenLevel>0 THENEXITSHORT AT breakevenLevel STOPENDIFendif//--------------------------------------------------------------------------------------------------------------------------------------------------//SL above 0 if more than X hours and positive//if longonmarket and barindex-tradeindex>60 then//if close-tradeprice(1)>=2 then//sell at tradeprice(1) STOP//endif//endif////if shortonmarket and barindex-tradeindex>40 then//if tradeprice(1)-close>=2 then//EXITSHORT at tradeprice(1) STOP//endif//endif//--------------------------------------------------------------------------------------------------------------------------------------------------// trailing atr stoponce trailingstoptype = 1 // trailing stop - 0 off, 1 ononce tsincrements = 0.19 // set to 0 to ignore tsincrementsonce tsminatrdist = 5once tsatrperiod = 14 // ts atr parameteronce tsminstop = 12 // ts minimum stop distanceonce tssensitivity = 1 // [0]close;[1]high/lowif trailingstoptype thenif barindex=tradeindex thentrailingstoplong = 6 // ts atr distancetrailingstopshort = 3 // ts atr distanceelseif longonmarket thenif tsnewsl>0 thenif trailingstoplong>tsminatrdist thenif tsnewsl>tsnewsl[1] thentrailingstoplong=trailingstoplongelsetrailingstoplong=trailingstoplong-tsincrementsendifelsetrailingstoplong=tsminatrdistendifendifendifif shortonmarket thenif tsnewsl>0 thenif trailingstopshort>tsminatrdist thenif tsnewsl<tsnewsl[1] thentrailingstopshort=trailingstopshortelsetrailingstopshort=trailingstopshort-tsincrementsendifelsetrailingstopshort=tsminatrdistendifendifendifendiftsatr=averagetruerange[tsatrperiod]((close/10))/1000//tsatr=averagetruerange[tsatrperiod]((close/1)) // (forex)tgl=round(tsatr*trailingstoplong)tgs=round(tsatr*trailingstopshort)if not onmarket or ((longonmarket and shortonmarket[1]) or (longonmarket[1] and shortonmarket)) thentsmaxprice=0tsminprice=closetsnewsl=0endifif tssensitivity thentssensitivitylong=hightssensitivityshort=lowelsetssensitivitylong=closetssensitivityshort=closeendifif longonmarket thentsmaxprice=max(tsmaxprice,tssensitivitylong)if tsmaxprice-tradeprice(1)>=tgl*pointsize thenif tsmaxprice-tradeprice(1)>=tsminstop thentsnewsl=tsmaxprice-tgl*pointsizeelsetsnewsl=tsmaxprice-tsminstop*pointsizeendifendifendifif shortonmarket thentsminprice=min(tsminprice,tssensitivityshort)if tradeprice(1)-tsminprice>=tgs*pointsize thenif tradeprice(1)-tsminprice>=tsminstop thentsnewsl=tsminprice+tgs*pointsizeelsetsnewsl=tsminprice+tsminstop*pointsizeendifendifendifif longonmarket thenif tsnewsl>0 thensell at tsnewsl stopendifif tsnewsl>0 thenif low crosses under tsnewsl thensell at market // when stop is rejectedendifendifendifif shortonmarket thenif tsnewsl>0 thenexitshort at tsnewsl stopendifif tsnewsl>0 thenif high crosses over tsnewsl thenexitshort at market // when stop is rejectedendifendifendifendifif onmarket thenif dayofweek=0 and (hour=0 and minute>=57) and abs(dopen(0)-dclose(1))>50 and positionperf(0)>0 thenif shortonmarket and close>dopen(0) thenexitshort at marketendifif longonmarket and close<dopen(0) thensell at marketendifendifendifgoing live for me
4 users thanked author for this post.
10/23/2020 at 6:53 PM #148272Nice. But the profit is in direct comparison to the V5 very low.
10/23/2020 at 6:58 PM #14827410/23/2020 at 7:15 PM #148278I’ve worked on the entry on p5 version, it was copy & past to see what cumulative orders would do in your strategy. What’s strange is that for the short no cumulative orders happen, only for long. I haven’t put in a limit on them. (ts 0.5% for both long & short)
edit; to make it work, I removed the breakeven & atr trailingstop and put in the % trailingstop for cumulative positions.
-
AuthorPosts
Find exclusive trading pro-tools on