Acumulacion de ordenes ACTIVADA

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #6599 quote
    Carlos GC
    Participant
    Average

    Hola,

    He activado (TRUE) la acumulación de ordenes (DEFPARAM CumulateOrders = true ) pero me gustaría poner un limite hasta 5 posiciones. Es decir que cuando llegue a 5 posiciones compradas la 6 orden se cierren las anteriores.

    COMO PUEDO LIMITARLO?

    GRACIAS

    #6607 quote
    Adolfo
    Participant
    Senior

    ¡Hola!

    Creo que debes usar el comando “CountOfLongShares” ó “CountOfShortShares“.

    Sería algo parecido a ésto:

    IF LongOnMarket AND CountOfLongShares >= 5 THEN
    SELL AT MARKET 
    ENDIF
    
    IF ShortOnMarket AND CountOfShortShares >= 5 THEN
    EXITSHORT AT MARKET
    ENDIF

    Espero que te sirva.

    Saludos

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

Acumulacion de ordenes ACTIVADA


ProOrder: Trading Automático y Backtesting

New Reply
Author
author-avatar
Carlos GC @carlos_gc Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Adolfo
9 years, 9 months ago.

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