Defparam flatbefore or flatafter multiples en un backtest

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #195381 quote
    QuicoQuico
    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
    robertogozzirobertogozzi
    Moderator
    Legend

    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
    QuicoQuico
    Participant
    New

    Gracias Roberto, un saludo

    #196080 quote
    GraHalGraHal
    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.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

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 GraHalGraHal
4 years, 3 months ago.

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