número máximo de velas por posición

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #203693 quote
    Javi Piñero
    Participant
    New

    Hola, me gustaría que me ayudaran:

    • Si abro una posición a las hh:mm  y a los 10 minutos mi sistema NO está en ganancias, quiero cerrar la posición.

    Por ejemplo, trabajo con velas de 1 minuto y compro 1 contrato a las 15:30:00 horas. Si a las 15:40:00 horas mi sistema NO está ne ganancias, quiero CERRAR la posición.

    ¿Cual es el código que tengo que poner?

    Gracias 😉

    #208734 quote
    robertogozzi
    Moderator
    Master

    Ahi esta:

    IF MyLongConditions THEN
       BUY 1 CONTRACT AT MARKET
       Tally = 0
    ENDIF
    IF OnMarket THEN
       Tally = Tally + 1
       IF Tally >= 10 THEN         //salir después de 10 velas
          IF PositionPerf<= 0 THEN
             SELL AT MARKET
          ENDIF
       ENDIF
    ENDIF
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

número máximo de velas por posición


ProOrder: Trading Automático y Backtesting

New Reply
Author
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzi
3 years, 1 month ago.

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