Price Zone Breakout DAX 1M

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #57026 quote
    GraHal
    Participant
    Master

    Thank you to andy6t6 for use of ‘Time Period Hi / Lo’ idea.

    Thank you to Nicolas for use of  ‘MFE Trailing Stop’.

    I have ‘squeezed more out of it’, but I de-optimised somewhat.

    If you can improve, add to or change for the better then let us all know please?

    Cheers
    GraHal

    //Time Standard UCT + 0 (GMT)
    DEFPARAM CUMULATEORDERS = False
    DEFPARAM PRELOADBARS = 2000
    
    //TIME PERIOD Hi / Lo
    begintime=070000
    endtime=083500
    
    If barindex=tradeindex or time=begintime then
    trading=0
    endif
    
    If time=endtime then
    trading=1
    endif
    
    If time=begintime or(time > begintime and time[1]<begintime) then
    myhigh=high[1]
    mylow=low[1]
    elsif time > begintime and time <= endtime then
    myhigh=max(high,myhigh)
    mylow=min(low,mylow)
    endif
    
    //GO LONG
    If not longonmarket and trading and Close > ExponentialAverage[1250](close) then
    buy 1 share at myhigh - 2*pointsize stop
    endif
    
    //EXIT LONG
    If longonmarket then
    SET STOP PLOSS 70
    Trailingstop = 40
    endif
    
    //GO SHORT
    If not shortonmarket and trading and Close < ExponentialAverage[1250](close) then
    sellshort 1 share at myLow - 2*pointsize stop
    endif
    
    If shortonmarket then
    SET STOP PLOSS 30
    Trailingstop = 50
    endif
    
    //MFE TRAILING STOP FUNCTION
    
    //resetting variables when no trades are on market
    if not onmarket then
    MAXPRICE = 0
    MINPRICE = close
    priceexit = 0
    endif
    
    //case - LONG order
    if longonmarket then
    MAXPRICE = MAX(MAXPRICE,close) //saving the MFE of the current trade
    if MAXPRICE-tradeprice(1)>=trailingstop*pointsize then //if the MFE is higher than the trailingstop then
    priceexit = MAXPRICE-(trailingstop*pointsize)*0.2 //set the exit price at the MFE - trailing stop price level
    endif
    Endif
     
    //case - SHORT order
    if shortonmarket then
    MINPRICE = MIN(MINPRICE,close) //saving the MFE of the current trade
    if tradeprice(1)-MINPRICE>=trailingstop*pointsize then //if the MFE is higher than the trailingstop then
    priceexit = MINPRICE+(trailingstop*pointsize)*0.2
    //set the exit price at the MFE + trailing stop price level
    endif
    Endif
      
    //Exit at Trailing Stop Max / Min Price Levels
    if onmarket and priceexit>0 then
    SELL AT priceexit STOP
    EXITSHORT AT priceexit STOP
    endif
    
    manel thanked this post
    GH-ZoneBO-HiLo-DAX-1M.jpg GH-ZoneBO-HiLo-DAX-1M.jpg ZoneBO-HiLo-DAX-1M.itf
    #57071 quote
    Vonasi
    Moderator
    Master

    Hello GraHal.

    My first instant thoughts are that with such differences in the stoploss and trailing stop variables between long and short positions that it might be rather over fitted. Walk forward with a dummy variable seems to confirm this (for what walk forward testing is worth on such short periods and short time frames). I guess only true real life forward testing will tell us whether it is or not.

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

Price Zone Breakout DAX 1M


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Vonasi
8 years, 2 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 01/01/2018
Status: Active
Attachments: 2 files
Logo Logo
Loading...