timebased series Dax

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #111141 quote
    JohnScher
    Participant
    Veteran

    Based on a different behavior of buyers and sellers on monday morning compared to friday evening as a basic approach in a “timebased series”, there is a long positioning on tuesday evening in the Dax.

    Below you will find the code for a simple trading system that follows this approach. Similarly, this can already be found in the library as an advertisement for the vtad.

    Here, however, it was stated that “buy tuesday evening, sell thursday morning” can be a positive approach, especially if it is underlaid with only 2 simple filters, 1x an EMA filter, 1x a CCI filter.

    The result seems impressive.

    I wanted to ask if someone could check the code for correctness and if so if someone could check the strategy for a longer distance than the offered 100.000 units.

     

    //-------------------------------------------------------------------------
    // Main code : D2 18 1H Long H33
    // created and coded by JohnScher
    //-------------------------------------------------------------------------
    
    defparam cumulateorders = true
    
    
    TradingDay  = opendayofweek = 2
    TradingTime = time = 180000
    
    
    c1 = close < ExponentialAverage [30] (close)
    c2 = cci [24] (close) > -140
    
    
    Tradebuy = TradingDay and TradingTime and c1 and c2
    
    IF Tradebuy  THEN
    buy at market
    ENDIF
    
    IF onmarket and barindex-tradeindex = 33 then // = D4 040000 notice the asian session
    sell at market
    Endif
    
    Set Stop %Loss 5
    Set Target %Profit 2.5
    
    Screenshot_1.png Screenshot_1.png
    #111161 quote
    Nicolas
    Keymaster
    Master

    Thanks John for sharing the idea.

    Here is the backtest on 200.000 units with 2 points spread. The robustness test on the 100k out of sample period is a proof of over fitting. You might have made too much optimization of your indicators settings?

    JohnScher thanked this post
    DAX-automated-trading.png DAX-automated-trading.png
    #111184 quote
    GraHal
    Participant
    Master

    Hope you din’t mind John, I couldn’t help wondering what results would look if not Sell after 33 hours (top curve).  Food for thought maybe??

    What does the version below look like on 200k bars anybody please?

    //https://www.prorealcode.com/topic/timebased-series-dax/
    //-------------------------------------------------------------------------
    // Main code : D2 18 1H Long H33
    // created and coded by JohnScher
    //-------------------------------------------------------------------------
     
    defparam cumulateorders = False
     
     
    TradingDay  = opendayofweek = 2
    TradingTime = time = 170000
    //
     
    c1 = close < ExponentialAverage [30] (close)
    c2 = cci [24] (close) > -150 //-140
     
     
    Tradebuy =  c1 and c2 and TradingDay and TradingTime
     
    IF Tradebuy  THEN
    buy at market
    SET STOP PLOSS 350
    SET TARGET PPROFIT 425
    ENDIF
     
    //IF onmarket and barindex-tradeindex = 33 then // = D4 040000 notice the asian session
    //sell at market
    //Endif
     
    //Set Stop %Loss 5
    //Set Target %Profit 2.5
    
    JohnScher thanked this post
    JScher.png JScher.png JScher-2.png JScher-2.png
    #111247 quote

    Here’s with 200,000,
    A drawdown from a heart attack …..

    JohnScher thanked this post
    DAX-1-Ora.png DAX-1-Ora.png Cattura-2.jpg Cattura-2.jpg
    #111255 quote
    GraHal
    Participant
    Master

    Thank You @Mauro for the 200k results.

    Weird that your equity curve shows losses / reducing equity for most of 2018 whereas my equity curve during 2018 showed small gains?

    JohnScher thanked this post
    #111320 quote
    JohnScher
    Participant
    Veteran

    Hello and a big thanks!

    The topic that concerns me are the time-based trades due to the different behavior of the investors. If I determine this behavior I try to improve the result with simple filters. Overoptimization is to be avoided.
    Unfortunately the mentioned 200.000 K are missing to check my theory.
    So once again a big thank you to you.

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

timebased series Dax


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
JohnScher @johnscher Participant
Summary

This topic contains 5 replies,
has 4 voices, and was last updated by JohnScher
6 years, 4 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 10/25/2019
Status: Active
Attachments: 6 files
Logo Logo
Loading...