15m DJ simple breakout strategy

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #142985 quote
    VinzentVegaVinzentVega
    Participant
    Veteran

    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

    DEFPARAM CumulateOrders = true // Kumulieren von Positionen deaktiviert
    
    // referenzzeit
    refstartzeit=153000
    refendzeit = 154500
    offset=15
    entry= 154500
    lastentry=160000
    feierabend=2200000
    takeprofit=1000
    stoploss=175
    pos=1
    
    if time = refstartzeit then
    reflow = Low
    lowlimit = reflow - offset
    refhigh = High
    highlimit = refhigh + offset
    inmarket = 0
    c1 = 0
    c2 = 0
    endif
    
    
    if time > refstartzeit and time <= refendzeit then
    if reflow > Low[0] then
    reflow = Low
    lowlimit = reflow - offset
    endif
    if refhigh < High[0] then
    refhigh = High[0]
    highlimit = refhigh + offset
    endif
    endif
    
    
    //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 Uhrzeit
    timeEnterBefore = time >= entry
    
    // Verhindert das Platzieren von neuen Ordern zum Markteintritt oder Vergrößern von Positionen nach einer bestimmten Uhrzeit
    timeEnterAfter = time <= lastentry
    
    // Verhindert das Trading an bestimmten Wochentagen
    daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0
    
    
    if inmarket = 0 AND timeEnterBefore AND timeEnterAfter AND not daysForbiddenEntry then
    
    if high > highlimit then
    c1 = high
    endif
    IF c1 <> 0  THEN
    BUY pos CONTRACT AT MARKET
    inmarket = 1
    ENDIF
    
    if  low < lowlimit then
    c2 = low
    endif
    IF c2 and inmarket = 0 THEN
    SELLSHORT pos CONTRACT AT MARKET
    inmarket = 1
    ENDIF
    
    if inmarket = 1 then
    // Stops und Targets
    SET STOP pLOSS stoploss
    SET TARGET pPROFIT takeprofit
    endif
    
    elsif time >= feierabend then
    sell at market
    exitshort at market
    endif
    

    Sry for my simple school-english. 🙂

    Nicolas, patel_kaushik, Eric and Kovit thanked this post
    DOW.png DOW.png
    #143032 quote
    verygrubbyverygrubby
    Participant
    Master

    Thanks for the strategy!

    I think you have too many zeros in line 9: feierabend=2200000…

    #143163 quote
    PaulPaul
    Participant
    Master

    Hi

    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.

    VinzentVega thanked this post
    Screenshot-2020-09-02-at-01.59.30.jpg Screenshot-2020-09-02-at-01.59.30.jpg
    #143165 quote
    PaulPaul
    Participant
    Master
    #143168 quote
    VinzentVegaVinzentVega
    Participant
    Veteran

    Hi 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.

    #143175 quote
    GraHalGraHal
    Participant
    Master

    & long/short pic + code

    Weird … I don’t get any short trades over 100k bars??

    Vinz.jpg Vinz.jpg Vinz-2.jpg Vinz-2.jpg
    #143183 quote
    PaulPaul
    Participant
    Master

    that’s probably because tradetype=2 and need to be set to 1

    GraHal thanked this post
    #143228 quote
    EricEric
    Participant
    Master

    Why this big take profit 1 000 points (almost 4%)?

    Cant be often that happens “in hours”?

    #143236 quote
    PaulPaul
    Participant
    Master

    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.

    // display days in market
    once displaydim   =1  // displays the number of days in market (activated graph)
    once maxdim       =999 // maximum days in market
    if displaydim then
    if not onmarket then
    dim=0
    else
    if onmarket and not onmarket[1] or (longonmarket and shortonmarket[1]) or (shortonmarket and longonmarket[1]) then
    dim=1
    endif
    endif
    if not opendayofweek=0 then
    if onmarket then
    if openday <> openday[1] then
    dim = dim + 1
    endif
    endif
    endif
    if onmarket and dim>=maxdim then
    sell at market
    exitshort at market
    endif
    graph dim // display days in market
    endif
    #143281 quote
    VinzentVegaVinzentVega
    Participant
    Veteran

    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.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

15m DJ simple breakout strategy


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 9 replies,
has 5 voices, and was last updated by VinzentVegaVinzentVega
6 years ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 08/30/2020
Status: Active
Attachments: 6 files
ProRealCode ProRealCode
Loading...