15m DJ simple breakout strategy
Forums › ProRealTime English forum › ProOrder support › 15m DJ simple breakout strategy
- This topic has 9 replies, 5 voices, and was last updated 3 years ago by VinzentVega.
-
-
08/30/2020 at 6:46 PM #142985
Hi,
attached a simple DOW breakout strategy. It works fine in the last 2 years. But i think it would be more profitable to add one or 2 variables into ist. But i don´t want to over-fitting this strategy, i want to keep it simple. Only the lots of loosers in a row are negetive. It needs a 2nd variable. New ideas are welcome. 🙂TF 15m / 1€ pipsize
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980DEFPARAM CumulateOrders = true // Kumulieren von Positionen deaktiviert// referenzzeitrefstartzeit=153000refendzeit = 154500offset=15entry= 154500lastentry=160000feierabend=2200000takeprofit=1000stoploss=175pos=1if time = refstartzeit thenreflow = Lowlowlimit = reflow - offsetrefhigh = Highhighlimit = refhigh + offsetinmarket = 0c1 = 0c2 = 0endifif time > refstartzeit and time <= refendzeit thenif reflow > Low[0] thenreflow = Lowlowlimit = reflow - offsetendifif refhigh < High[0] thenrefhigh = High[0]highlimit = refhigh + offsetendifendif//graph refhigh as "ref hoch"//graph reflow as "ref tief"//graph highlimit as "trigger long"//graph lowlimit as "trigger short"// graph c1 as "entrylong"// graph c2 as "entryshort"// Verhindert das Platzieren von neuen Ordern zum Markteintritt oder Vergrößern von Positionen vor einer bestimmten UhrzeittimeEnterBefore = time >= entry// Verhindert das Platzieren von neuen Ordern zum Markteintritt oder Vergrößern von Positionen nach einer bestimmten UhrzeittimeEnterAfter = time <= lastentry// Verhindert das Trading an bestimmten WochentagendaysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0if inmarket = 0 AND timeEnterBefore AND timeEnterAfter AND not daysForbiddenEntry thenif high > highlimit thenc1 = highendifIF c1 <> 0 THENBUY pos CONTRACT AT MARKETinmarket = 1ENDIFif low < lowlimit thenc2 = lowendifIF c2 and inmarket = 0 THENSELLSHORT pos CONTRACT AT MARKETinmarket = 1ENDIFif inmarket = 1 then// Stops und TargetsSET STOP pLOSS stoplossSET TARGET pPROFIT takeprofitendifelsif time >= feierabend thensell at marketexitshort at marketendifSry for my simple school-english. 🙂
4 users thanked author for this post.
08/31/2020 at 9:50 AM #143032Thanks for the strategy!
I think you have too many zeros in line 9: feierabend=2200000…
09/02/2020 at 1:13 AM #143163Hi
I’ve adjusted your code into my layout. The results break completely if I use reentry as a basic test. Have to look into that a bit more, maybe bugged? So it’s off.
btw I wondered if the short criteria is handled well for c2 because c2 is untested. I used % (in pic 1% stoploss)
Anyway got some reasonable results with this for 100k, not for 200k bars. Here’s a pic. I will post the code later.
1 user thanked author for this post.
09/02/2020 at 6:44 AM #14316509/02/2020 at 8:02 AM #143168Hi Paul,
thx for your advise. In 200k looks realy not so good, maybe its possible to pimp it a little bit. The basic code was very simple.
09/02/2020 at 8:55 AM #143175& long/short pic + code
Weird … I don’t get any short trades over 100k bars??
09/02/2020 at 9:19 AM #14318309/02/2020 at 6:09 PM #14322809/02/2020 at 7:04 PM #143236I prefer percentage instead of points, especially when markets once were much higher or lower.
if using cumulate orders = false and you copy this below (made little change) you see how many days a position is in market.
123456789101112131415161718192021222324// display days in marketonce displaydim =1 // displays the number of days in market (activated graph)once maxdim =999 // maximum days in marketif displaydim thenif not onmarket thendim=0elseif onmarket and not onmarket[1] or (longonmarket and shortonmarket[1]) or (shortonmarket and longonmarket[1]) thendim=1endifendifif not opendayofweek=0 thenif onmarket thenif openday <> openday[1] thendim = dim + 1endifendifendifif onmarket and dim>=maxdim thensell at marketexitshort at marketendifgraph dim // display days in marketendif09/03/2020 at 11:19 AM #143281Why this big take profit 1 000 points (almost 4%)?
Cant be often that happens “in hours”?
The idea behind this stragedy was, to let the trend run. And the best profit in the last 2 years was 1000 points, 11 times in 2020. The actual entry of 9/1 is now 640 points in front.
-
AuthorPosts
Find exclusive trading pro-tools on