Acumulacion de ordenes ACTIVADA

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #6599 quote
    Carlos GCCarlos 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
    AdolfoAdolfo
    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.
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

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 AdolfoAdolfo
10 years, 4 months ago.

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