15m DJ simple breakout strategy
08/30/2020 at 6:46 PM #142985
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€ pipsize1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980DEFPARAM 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 thenreflow = Lowlowlimit = reflow - offsetendifif refhigh < High thenrefhigh = Highhighlimit = 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 marketendif
Sry for my simple school-english. 🙂08/31/2020 at 9:50 AM #14303209/02/2020 at 1:13 AM #143163
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.09/02/2020 at 6:44 AM #14316509/02/2020 at 8:02 AM #14316809/02/2020 at 8:55 AM #14317509/02/2020 at 9:19 AM #14318309/02/2020 at 6:09 PM #14322809/02/2020 at 7:04 PM #143236
I 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 or (longonmarket and shortonmarket) or (shortonmarket and longonmarket) thendim=1endifendifif not opendayofweek=0 thenif onmarket thenif openday <> openday thendim = dim + 1endifendifendifif onmarket and dim>=maxdim thensell at marketexitshort at marketendifgraph dim // display days in marketendif09/03/2020 at 11:19 AM #143281
Why 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.