Defparam flatbefore or flatafter multiples en un backtest

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #195381 quote
    Quico
    Participant
    New

    Buenos días,

    Necesitaría saber si hay alguna programación que en un mismo backtest permita que el programa elija el mejor horario de negociación. Mi planteamiento , que no se puede ejecutar, seria poniendo horario como variable a elegir:

    If Horario =1 then

    DEFPARAM FLATBEFORE = 080000 and DEFPARAM FLATAFTER = 171500

    endif

    if horario=2 then

    DEFPARAM FLATBEFORE = 010000 and DEFPARAM FLATAFTER = 221500

    endif

    Gracias y un saludo

    #195393 quote
    robertogozzi
    Moderator
    Master

    No, no puede usar DEFPARAM dentro de un bloque IF…ENDIF, pero puede duplicarlos, intercambiando líneas comentadas, por lo que solo usará las correctas en cualquier momento:

    //DEFPARAM FLATBEFORE = 080000
    //DEFPARAM FLATAFTER  = 171500
    DEFPARAM FLATBEFORE   = 010000
    DEFPARAM FLATAFTER    = 221500
    #195804 quote
    Quico
    Participant
    New

    Gracias Roberto, un saludo

    #196080 quote
    GraHal
    Participant
    Master

    El mismo backtest permite que el programa elija las mejores horas de negociación.

    ¿Quizás te refieres a… optimizar para obtener las mejores horas de negociación

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

Defparam flatbefore or flatafter multiples en un backtest


ProOrder: Trading Automático y Backtesting

New Reply
Author
author-avatar
Quico @quico Participant
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by GraHal
3 years, 8 months ago.

Topic Details
Forum: ProOrder: Trading Automático y Backtesting
Language: Spanish
Started: 06/16/2022
Status: Active
Attachments: No files
Logo Logo
Loading...