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.
-
-
11/10/2020 at 9:29 AM #149987
This version is DJI 1H and 24H.
The graph is good, but it can’t run in live.
The stop notice said negative or zero parameter and attached.
Anyone can help?
Thanks.
1 user thanked author for this post.
11/10/2020 at 10:42 AM #15000011/10/2020 at 7:53 PM #15006211/10/2020 at 9:02 PM #150068I integrate the ML code and open this error… Paul
It’s not an error, you just have to define those variables.
11/10/2020 at 10:40 PM #15007511/11/2020 at 4:39 AM #150088Fran55, better use the code posted in the Machine Learning topic on page one for one variable and see how that works.
https://www.prorealcode.com/topic/machine-learning-in-proorder/#post-121059
11/24/2020 at 4:09 PM #15144111/25/2020 at 10:05 AM #151490Hi, All
Recently the result is not good in DAX, DJI market 🙁
how about you?
I’m still testing it in demo but the results in DJ are very good last 10 days
11/25/2020 at 10:10 AM #15149412/14/2020 at 11:09 PM #153772Hello guys,
Lets’ make this discussion active again! 😀
As I now have 1M candles available for the backtest I’ve optimised it and changes few settings and here is where I am currently.
I am trying to get the curve as clean as possible since mid-june 2016 as it is (in my opinion) enough to optimise and represents well enough the market conditions with the volumes that we have nowadays.
Here is the code where it stand at the moment, could you test it on your side and tell me what you think that could be change / improve / optimise? I ran out of idea and I’ve worked quite a long time on it so I need an exterior opinion I guess 😉
Feel free to tell what you think and what’s you have in mind! It could be a good path to explore! 😀
PS. I am working on another code that I’ll released when it’ll be ready in my opinion based on ichimoku quite only 😉
THANKS GUYS! 😀
DJI Tanou V13123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293//-------------------------------------------------------------------------// Code principal : DJI Tanou V13//-------------------------------------------------------------------------DEFPARAM CumulateOrders = falseDEFPARAM Preloadbars = 50000//--------------------------------------------------------------------------------------------------------------------------------------------------//Money Managementpositionsize=1//--------------------------------------------------------------------------------------------------------------------------------------------------//HORAIRES DE TRADINGCtime = time >= 153000 and time < 220000//--------------------------------------------------------------------------------------------------------------------------------------------------//STRATEGIE//VECTEUR = CALCUL DE L'ANGLE//i1 = HistoricVolatility[10](close)//c1 = (i1 >= 0.06)ONCE PeriodeA = 3ONCE nbChandelierA= 30MMA = Exponentialaverage[PeriodeA](close)ADJASUROPPO = (MMA-MMA[nbchandelierA]) / nbChandelierAANGLE = (ATAN(ADJASUROPPO)) //FONCTION ARC TANGENTECB1 = ANGLE >= 37CS1 = ANGLE <= - 47//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.4)CS2 = (pente CROSSES UNDER trigger) AND (pente > -0.9)mx = average[41,0](close)CB3 = mx > mx[1]mx2 = average[58,0](close)CS3 = mx2 < mx2[1]// ichimoku//Tenkan = (highest[9](high)+lowest[9](low))/2Kijun = (highest[26](high)+lowest[26](low))/2SSpanB = (highest[52](high[26])+lowest[52](low[26]))/2////chikou=closeIf Kijun[1] = Kijun thenCondichi2 = 0ElseCondichi2 = 1Endif//--------------------------------------------------------------------------------------------------------------------------------------------------//ENTREES EN POSITIONVarDistIchiBuy = 14VarDistIchiSell = 1DistIchiSSB = Open - SSpanBIf DistIchiSSB >= VarDistIchiBuy thenCondDistIchil = 1ElseCondDistIchil = 0EndifIf DistIchiSSB <= VarDistIchiSell thenCondDistIchis = 1ElseCondDistIchis = 0Endif//RSI Dynamic//RSIDyna1 = RSI[14](close)//RSIDyna2 = DynamicZoneRSIUp[14,20](close)//RSIDyna3 = DynamicZoneRSIDown[14,20](close)//RSIDL1 = RSIDyna1 <= 61.5//RSIDL2 = RSIDyna2 <=58//RSIDL3 = RSIDyna3 <= 53.8//RSIDL4 = RSIDyna1>RSIDyna2//RSIDL5 = RSIDyna2>RSIDyna3//RSIDL = RSIDL3//RSIDS1 = RSIDyna1 <= 30.15//RSIDS2 = RSIDyna2 >=49//RSIDS3 = RSIDyna3 >= 38//RSIDS4 = RSIDyna2>RSIDyna3//RSIDS5 = RSIDyna3>RSIDyna1//RSIDS = RSIDS4 and RSIDS5CONDBUY = CB1 and CB2 and CB3 and CTime and CondDistIchil and condichi2CONDSELL = CS1 and CS2 and CS3 and Ctime and CondDistIchis and condichi2//--------------------------------------------------------------------------------------------------------------------------------------------------//Entrée en position//POSITION LONGUEIF CONDBUY THENbuy positionsize contract at marketSET STOP %LOSS 2.4ENDIF//POSITION COURTEIF CONDSELL THENSellshort positionsize contract at marketSET STOP %LOSS 0.8ENDIF//--------------------------------------------------------------------------------------------------------------------------------------------------//SET TARGET %PROFIT 2//Break evenbreakevenPercent = 0.19PointsToKeep = 4startBreakeven = 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 = 3 // 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 marketendifendifendif5 users thanked author for this post.
12/14/2020 at 11:37 PM #153774Is that with walk forward testing?
I feel having distance variables on top of angle and slope variables(which are already prone to cruve fitting) are too many entry variables.
12/15/2020 at 12:09 AM #15377612/15/2020 at 1:11 AM #153782If you look at most of the trades they dont follow the immediate direction of the entries, esp since this is a short time frame.
Having a wide stoploss in an upward trending market you could potentially enter anywhere with the same exit strategy and seem profitable on a backtest.
Maybe using volume couldhelp to catch those short term direction movements?
I thank balmora for the angle code. I know its very useful but i just dont know yet how to use it!
12/15/2020 at 8:40 AM #153793I’ve worked quite a long time on it
Nice one Tanou, thank you for sharing!
I’ve set your version going on Demo Forward Test.
I will report back with any improvements.
Nice one re your Dashboard layout! 🙂
I’m going to try out your layout in place of mine as yours looks easier / quicker to adapt from the standard PRT PreDefined settings.
12/15/2020 at 10:00 AM #153804hi Tanou thnx for sharing.
Maybe there is some gain to be made when the breakeven is never triggered. Because then, the market could reverse and hit a big stoploss. It’s something i’am testing. Maybe channels.
There’s an unbalance for long & short trades, as long is hit more that short.
I”ve mentioned it before somewhere,
1CB2 = (pente > trigger) AND (pente < 0.4)replaced with, similar as to short,
1CB2 = (pente crosses over trigger) AND (pente < 0.4)winratio goes over 90%(100k) but total results go down a bit, equitycurve looks sweet 500k bars.
-
AuthorPosts
Find exclusive trading pro-tools on