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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #203693 quote
    Javi PiñeroJavi 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
    robertogozzirobertogozzi
    Moderator
    Legend

    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.
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

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 robertogozzirobertogozzi
3 years, 8 months ago.

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