COG (Non-Repainting) trading strategy

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #137672 quote
    Zigo
    Participant
    Master
    // Definitie van code parameters
    DEFPARAM CumulateOrders = False // Opstapelen posities gedeactiveerd
    Defparam flatbefore = 000000
    Defparam flatafter = 000000
    HL=(high+low)/2
    
    Sum=(summation[4](HL))/4
    a0=TriangularAverage[21](sum)
    
    // Condities om long posities te openen
    
    c1 = (hL>= a0)
    IF c1 THEN
    BUY 0.2 CONTRACT AT MARKET
    ENDIF
    
    // Condities om long posities te sluiten
    
    c2 = HL < a0
    IF c2 THEN
    SELL AT MARKET
    ENDIF
    
    // Condities om short posities te openen
    c3=HL<a0
    
    IF c3 THEN
    SELLSHORT 0.2 CONTRACT AT MARKET
    ENDIF
    
    // Condities om short posities te sluiten
    
    c4 =HL >a0
    
    IF c4 THEN
    EXITSHORT AT MARKET
    ENDIF
    set stop ptrailing 45

    Run the backtest (see attachement) it gives good results. But in automatic running it doesn’t.

    Dow-76-min.png Dow-76-min.png
    #137682 quote

    If you use the demo with Contartto 0.2 it does not work …. it has many chisure with 0 bars you cannot use tick by tick mode it is not possible to know if the gain is real …

    Zigo thanked this post
    #137686 quote
    Zigo
    Participant
    Master

    @ Mauro, thank you I have changed it to 1 contract it.

    #137778 quote
    Zigo
    Participant
    Master

    Its not looking good! But I don’t know what to change?

    Is anybody know?

    Knipsel-Auto-syst..png Knipsel-Auto-syst..png
    #137794 quote
    Paul
    Participant
    Master

    ptrailing doesn’t work correct. Maybe switch to a trailing stop from the library & add a stoploss.

    Zigo thanked this post
    #137811 quote

    In the photo there are two operations closed in the negative ….. if in the Backtest it is different it is because they are not given with tick by tick ….. then as Paul told you you should change the ptrailing that does not work ….

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

COG (Non-Repainting) trading strategy


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Zigo @zigo Participant
Summary

This topic contains 5 replies,
has 3 voices, and was last updated by Mauro T. “Algorithm System”
5 years, 8 months ago.

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