SEGUIR DENTRO DEL TRADE AÚN HABIENDOSE CUMPLIDO LA HORA

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #229617 quote
    josemijosemi
    Participant
    Average

    Hola a todos comunidad, me gustaría saber cómo poder seguir dentro de una posición abierta, por ejemplo a las 10:55 h., aunque la hora de cierre del sistema sea por ejemplo a las 11:00h. No sé si me he explicado bien…gracias

    #229645 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    No tienes que hacer nada, todas las estrategias continúan automáticamente hasta que las detengas y cada operación abierta permanece abierta hasta que la cierras (por ejemplo, usando Stop Loss o Take Profit).

    #229661 quote
    josemijosemi
    Participant
    Average

    Hola Robert, creo que no me he explicado bien..quiero decir que el sistema tiene un margen para operar (de 10:00pm a 11:00pm), y abre una posición a las 10:55, cómo tengo que escribir para que no se cierre la posición a las 11:00h?

    Porque ahora mismo me está pasando eso, el sistema cierra las posiciones a las 11:00, y yo lo que quiero es que si tengo alguna posición abierta me la cierre con sus condiciones no a las 11:00.

    #229675 quote
    Iván GonzálezIván González
    Moderator
    Legend

    Hola.
    Supongo que usas la línea de código defparam flatafter = 110000.
    Tendrías que sustituir esto por código que discretice entre entradas realizadas antes de la hora xxx y entradas realizadas después de dicha hora.
    De esta forma podrías mantener las posiciones abiertas que se hayan generado después del xxx.

    #229704 quote
    josemijosemi
    Participant
    Average

    Pero no sé escribirlo….

    #229712 quote
    phoentzsphoentzs
    Participant
    Master

    Creo que este código debería ayudarte.

    If time>=220000 and time<=230000 then 
    
    Buy…
    
    Sell…
    
    Endif 
    josemi thanked this post
Viewing 6 posts - 1 through 6 (of 6 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

SEGUIR DENTRO DEL TRADE AÚN HABIENDOSE CUMPLIDO LA HORA


ProOrder: Trading Automático y Backtesting

New Reply
Author
author-avatar
josemi @josemi Participant
Summary

This topic contains 5 replies,
has 4 voices, and was last updated by phoentzsphoentzs
2 years, 6 months ago.

Topic Details
Forum: ProOrder: Trading Automático y Backtesting
Language: Spanish
Started: 03/11/2024
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...