Estrategia por mejorar en Tf 5 minutos , testedo en indice aleman

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #70854 quote
    Antuan
    Participant
    Senior
    // Definición de los parámetros del código
    DEFPARAM CumulateOrders = False // Acumulación de posiciones desactivada
    // El sistema anulará todas las órdenes pendientes y cerrará todas las posiciones a las 0:00. No se permitirá ninguna nueva orden ni posición después de la hora "FLATBEFORE".
    DEFPARAM FLATBEFORE = 080000
    // Anular todas las órdenes pendientes y cerrar todas las posiciones a la hora "FLATAFTER"
    DEFPARAM FLATAFTER = 220000
    
    // Impide al sistema operar en días precisos de la semana
    daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0
    
    // Condiciones para entrada de posiciones largas
    indicator1 = CCI[29]
    c1 = (indicator1 > 0)
    indicator2 = DPO[15](close)
    c2 = (indicator2 < 0)
    
    IF (c1 AND c2) AND not daysForbiddenEntry THEN
    BUY 1 CONTRACT AT MARKET
    ENDIF
    
    // Condiciones de salida de posiciones largas
    indicator3 = CCI[29]
    c3 = (indicator3 CROSSES OVER 100)
    
    IF c3 THEN
    SELL AT MARKET
    ENDIF
    
    // Condiciones de entrada de posiciones cortas
    indicator4 = CCI[29]
    c4 = (indicator4 < 0)
    indicator5 = DPO[15](close)
    c5 = (indicator5 > 0)
    
    IF (c4 AND c5) AND not daysForbiddenEntry THEN
    SELLSHORT 1 CONTRACT AT MARKET
    ENDIF
    
    // Condiciones de salida de posiciones cortas
    indicator6 = CCI[29]
    c6 = (indicator6 CROSSES UNDER 180)
    
    IF c6 THEN
    EXITSHORT AT MARKET
    ENDIF
    
    // Stops y objetivos
    SET STOP pLOSS 20
    SET TARGET pPROFIT 20
    
    estadistica-15267202264p8lc.png estadistica-15267202264p8lc.png
    #70909 quote
    Inertia
    Participant
    Master

    Hi osupero,

    It seems that DPO is not accepted with proorder…Would be nice to replace it with its equivalent if it exists.

    #71192 quote
    Inertia
    Participant
    Master

    Hi,

    I let your strategy running on demo today on several instruments from 8:00 to 16:40.

    I then backtest them all for the day of day to double check the results.

    It is not at all the same…

    DPO might be part of the repaint indicators I suppose…

    // Definición de los parámetros del código
    DEFPARAM CumulateOrders = false
    DEFPARAM FLATBEFORE = 080000
    DEFPARAM FLATAFTER = 220000
     
    // Impide al sistema operar en días precisos de la semana
    daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0
    x  = 4
    IF BarIndex - TradeIndex = x Then
    Sell at Market
    endif
    
    IF BarIndex - TradeIndex = x Then
    exitshort at Market
    endif
    
    // Condiciones para entrada de posiciones largas
    indicator1 = CCI[30]//30
    c1 = (indicator1 > 0)
    indicator2 = DPO[15](close)//15
    c2 = (indicator2 < 0)
     
    IF (c1 AND c2) AND not daysForbiddenEntry THEN
    BUY 1 CONTRACT AT MARKET
    ENDIF
     
    // Condiciones de salida de posiciones largas
    indicator3 = CCI[30]//30
    c3 = (indicator3 CROSSES OVER 100)//100
     
    IF c3 THEN
    SELL AT MARKET
    ENDIF
     
    // Condiciones de entrada de posiciones cortas
    indicator4 = CCI[30]//30
    c4 = (indicator4 < 0)
    indicator5 = DPO[15](close)//15
    c5 = (indicator5 > 0)
     
    IF (c4 AND c5) AND not daysForbiddenEntry THEN
    SELLSHORT 1 CONTRACT AT MARKET
    ENDIF
     
    // Condiciones de salida de posiciones cortas
    indicator6 = CCI[30]//30
    c6 = (indicator6 CROSSES UNDER 150)//180
     
    IF c6 THEN
    EXITSHORT AT MARKET
    ENDIF
     
    // Stops y objetivos
    SET STOP %LOSS 0.2
    SET TARGET %PROFIT 0.2
    
    Live-Demo-23-05-2018.png Live-Demo-23-05-2018.png Backtest-at-16-42_23-05-2018.png Backtest-at-16-42_23-05-2018.png
    #73133 quote
    Antuan
    Participant
    Senior

    El problema es que repinta el backtesting.   y coloca las mejores posiciones una vez actualizado al dia siguiente o simplemente cuando le haces de nuevo el backtesting .. no se porque repinta el indicador DPO

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

Estrategia por mejorar en Tf 5 minutos , testedo en indice aleman


ProOrder: Trading Automático y Backtesting

New Reply
Author
author-avatar
Antuan @osupero Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by Antuan
7 years, 9 months ago.

Topic Details
Forum: ProOrder: Trading Automático y Backtesting
Language: Spanish
Started: 05/19/2018
Status: Active
Attachments: 3 files
Logo Logo
Loading...