Restringir días de negociación

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #6285 quote
    javimtjavimt
    Participant
    New

    Hola buenas, estaría interesado en restringir los fines de semana de mi sistema de trading.

    He visto que se pueden discriminar horarios de negociación, pero no encuentro cómo hacerlo para que el sistema no funcione el fin de semana.

    Un saludo y gracias.

    #6371 quote
    NicolasNicolas
    Keymaster
    Legend

    Hola, puede utilizar la instrucción dayofweek a unallow días de negociación. Al igual que este ejemplo de código:

    IF buycondition AND dayofweek<>7 THEN 
      BUY 1 SHARE AT MARKET 
    ENDIF
    

    O bien, puede establecer varios días no comerciales como este, en una condición externa:

    notrading = dayofweek=7 OR dayofweek=1
    
    IF buycondition AND NOT notrading THEN 
     BUY 1 SHARE AT MARKET 
    ENDIF
    
    #6404 quote
    javimtjavimt
    Participant
    New

    Perfecto, gracias,

Viewing 3 posts - 1 through 3 (of 3 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

Restringir días de negociación


ProOrder: Trading Automático y Backtesting

New Reply
Author
author-avatar
javimt @javimt Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by javimtjavimt
10 years, 5 months ago.

Topic Details
Forum: ProOrder: Trading Automático y Backtesting
Language: Spanish
Started: 05/01/2016
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...