Hang seng 200K bars

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #67349 quote
    Francesco78
    Participant
    Master

    Guys, I have an apparently nice strategy on Hang seng that is purely driven by time bias.

    Since I am not very confident with the instrument itself, I would be extremely grateful if someone could backtest it with 200K bars and see how the OOS behave.

    The code is the following

    Defparam cumulateorders = false
    
    golong =1
    goshort = 1
    
    timegolong  = 110000
    timeexitlong  = 60000
    filterdaylong = dayofweek = 1 or dayofweek = 2 or dayofweek = 3
    filterpricelong = close < (Dhigh(1)+dlow(2))/2
    
    timegoshort = 30000
    timeexitshort = 80000
    filterdayshort = dayofweek = 2  or dayofweek = 4
    filterpriceshort = close> (Dhigh(1)+dlow(2))/2
    
    
    if goshort then
    
    if time = timegoshort and filterpriceshort and filterdayshort   then
    sellshort 1 contract at market
    endif
    
    if time = timeexitshort then
    exitshort  at market
    endif
    endif
    
    if golong then
    
    if time= timegolong  and filterdaylong  and filterpricelong  then
    buy 1 contract at market
    endif
    if time = timeexitlong then
    sell  at market
    endif
    endif
    
    set target pprofit 600
    set stop ploss 700
    

     

    I attach the equity curve.

     

    Thanks a lot in advance.

    Francesco

    Nicolas thanked this post
    hang_seng.png hang_seng.png
    #67352 quote
    Henrik
    Participant
    Veteran

    Hi!

    Here is 200k bars.

    Regards Henrik

    Francesco78 thanked this post
    2018-04-05-1.png 2018-04-05-1.png
    #67356 quote
    Vonasi
    Moderator
    Master

    Well ALE it looks like you have written a strategy that is a very good advert for getting PRT Premium with 200K bars!

    Time based strategies are not worth pursuing in my experience but I have to admit that you’d have been very happy to have traded this one over the last 100k bars. The equity curve is beautiful!

    Francesco78 thanked this post
    #67358 quote
    Francesco78
    Participant
    Master

    Ok thank you. How about this one on eurusd?

    Defparam cumulateorders = false
    
    golong =1
    goshort = 1
    
    timegolong  = 140000
    timeexitlong  = 70000
    filterdaylong =  dayofweek = 1 or dayofweek = 2 or dayofweek = 3
    filterpricelong = close < Dhigh(1)//(Dhigh(1)+dlow(2))/2
    
    timegoshort = 70000
    timeexitshort = 140000
    filterdayshort = dayofweek <>0
    filterpriceshort = 1//close>Dlow(1)
    
    
    if goshort then
    
    if time = timegoshort and filterpriceshort and filterdayshort   then
    sellshort 1 contract at market
    endif
    
    if time = timeexitshort then
    exitshort  at market
    endif
    endif
    
    if golong then
    
    if time= timegolong  and filterdaylong  and filterpricelong  then
    buy 1 contract at market
    endif
    if time = timeexitlong then
    sell  at market
    endif
    endif
    
    eurusd.png eurusd.png
    #67364 quote
    Vonasi
    Moderator
    Master

    Well ALE

    Oooops – sorry Francesco78. I shouldn’t reply after a couple of  glasses of wine!

    #67365 quote
    Vonasi
    Moderator
    Master

    Here is the 200K with no spread.

    Screenshot_1-1.png Screenshot_1-1.png
    #67367 quote
    Vonasi
    Moderator
    Master

    I can’t see a reason why you would need tick by tick on for that strategy so here is the result without tick by tick. First image is with no spread and second is with spread of just 1 (I had to change the start capital to 100k to get through the drawdown).

    The interesting thing is that around 2005 it suddenly becomes a winning strategy. Around 2004 automated trading and HFT started to come online so that may be a link to the sudden improvement in performance?

    Screenshot_2-1.png Screenshot_2-1.png Screenshot_3-1.png Screenshot_3-1.png
    #67372 quote
    Vonasi
    Moderator
    Master

    Your strategy if only used since beginning of 2005. Walk Forward 70/50 x 5.

    Personally I think that the drawdown is a bit big for the gain/loss ratio but at least the right side of the equity curve is much higher than the left!

    Screenshot_4-1.png Screenshot_4-1.png
    #67382 quote
    Nicolas
    Keymaster
    Master

    I shouldn’t reply after a couple of  glasses of wine!

    What is the alcohol level allowed to drive a boat? 😆

    #67383 quote
    Vonasi
    Moderator
    Master

    What is the alcohol level allowed to drive a boat?

    We don’t drive – we sail!

    The level is unlimited – it is called the freedom of the sea – the only restriction is that you have to wait until the sun is under the yardarm. Most sailors have height adjustable yardarms to deal with this issue. Anyway at the moment I am house sitting for friends in the hills overlooking Kalamata bay so there is definitely no restrictions on intake!

    #67444 quote
    Francesco78
    Participant
    Master

    I can’t see a reason why you would need tick by tick on for that strategy so here is the result without tick by tick. First image is with no spread and second is with spread of just 1 (I had to change the start capital to 100k to get through the drawdown). The interesting thing is that around 2005 it suddenly becomes a winning strategy. Around 2004 automated trading and HFT started to come online so that may be a link to the sudden improv

    without tick to tick the results are much worst? That is puzzling. I guess the more realistic one are the 1 with tick to tick.

    #67448 quote
    Vonasi
    Moderator
    Master

    without tick to tick the results are much worst? That is puzzling

    That is very puzzling as you only trade at the close of a candle/open of the next candle so tick by tick should make no difference at all.

    #67459 quote
    Vonasi
    Moderator
    Master

    It just occurred to me that I may be on a different time zone to you so my tests may not be the same as yours. I am trading on UTC+1 British Summertime.

    #67463 quote
    Francesco78
    Participant
    Master

    It just occurred to me that I may be on a different time zone to you so my tests may not be the same as yours. I am trading on UTC+1 British Summertime.

    Yep I am in UTC + 2 any way this strategy perform quite well, 10 year OOS. Should be taken in consideration, what do you think?

    #67478 quote
    Vonasi
    Moderator
    Master

    what do you think?

    My main concern is that I don’t understand why it should work. You are basically shorting the EURUSD every day during the European session and going long during the US and Asian sessions on pull backs but only on Monday, Tuesday and Wednesday. I cannot think why that should always work. Also you have to factor in that you are holding overnight for up to three days a week so there will be overnight fees to cut into the already quite small gain/loss ratio.

    I have not tested it on your time zone yet but will try to later today as I have rather a lot on this morning.

    Francesco78 thanked this post
Viewing 15 posts - 1 through 15 (of 18 total)
  • You must be logged in to reply to this topic.

Hang seng 200K bars


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 17 replies,
has 4 voices, and was last updated by Vonasi
7 years, 11 months ago.

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