Cierre de todas las operaciones cuando llegue a la ganancia deseada

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #64366 quote
    David230979
    Participant
    New

    se puede hacer con la plataforma que cuando lleves unas determinada ganancia cierre todas las operaciones que haya abiertas ? Muchísimas gracias

    #64373 quote
    Juan Salas
    Participant
    Master

    Hola David,

    Yo creo que te puede servir esto. Determina la ganancia o perdida diaria que tendrías pensado soportar. Cuando llegue a tu beneficio o perdida determinada se cierran todas las operaciones y ya no opera más durante el día.

    // STRATEGYPROFIT per DAY //////////////////////////////////////////////////////////////////////////////
    // It resets the variable each new day
    IF INTRADAYBARINDEX = 0 THEN
    stratprofit = STRATEGYPROFIT //saves the previous day Profit
    nomoretrading = 0
    ENDIF
    
    // Finishing DAILY operations when reaching target profit/loss
    IF (STRATEGYPROFIT-stratprofit)>=40 THEN //current day's profit
    SELL AT MARKET
    EXITSHORT AT MARKET
    nomoretrading=1
    ENDIF
    
    IF (STRATEGYPROFIT-stratprofit)<=-40 THEN //current day's loss
    SELL AT MARKET
    EXITSHORT AT MARKET
    nomoretrading=1
    ENDIF
    

    En este caso, cuando hayas ganado 40$ o 40€, depende en la moneda que estés se cierra, e igualmente si los pierdes. No cuenta pips sino dinero.

    Cuando lances la operaciones, tienes por supuesto que poner algo del estilo

    IF tuscondiciones AND nomoretrading=0 THEN
    BUY 1 CONTRACT AT MARKET
    ENDIF

    Espero que te sirva,

    Saludos

    Nicolas thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Cierre de todas las operaciones cuando llegue a la ganancia deseada


ProOrder: Trading Automático y Backtesting

New Reply
Author
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Juan Salas
8 years ago.

Topic Details
Forum: ProOrder: Trading Automático y Backtesting
Language: Spanish
Started: 03/04/2018
Status: Active
Attachments: No files
Logo Logo
Loading...