Activar cortos, si previamente se ha cumplido unas condiciones

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

    Si tengo estas variables

    A,B,C,D

    Mi codigo es para ponerse corto una vez que se pone A mayor que 90, si previamente viene de A,B,C y D menor que 10 (entre las dos condiciones se desconoce cuanto tiempo pasa)

    He probado algo asi y no me funciona

    Activado=0

    IF A<10 AND B<10 AND C<10 AND D<10 THEN

    Activado=1

    ENDIF

    IF Activado=1 AND A>80 THEN

    SELLSHORT

    ENDIF

     

     

    #54804 quote
    franichi
    Participant
    New

    hola, prueba esto:

    IF A<10 AND B<10 AND C<10 AND D<10 THEN

           IF  A>80 THEN

           sellshort 1 contract at market

           ENDIF

    ENDIF

    #56141 quote
    ALGAR
    Participant
    New
    Al final me funciono con esto IF A<10 AND B<10 AND C<10 AND D<10 THEN Activado=1 ENDIF IF Activado=1 AND A>80 THEN Activado=2 SELLSHORT 1 contract at market ENDIF     Muchas gracias   Mucgas gracias.
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Activar cortos, si previamente se ha cumplido unas condiciones


ProOrder: Trading Automático y Backtesting

New Reply
Author
author-avatar
ALGAR @algar Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by ALGAR
8 years, 2 months ago.

Topic Details
Forum: ProOrder: Trading Automático y Backtesting
Language: Spanish
Started: 12/05/2017
Status: Active
Attachments: No files
Logo Logo
Loading...