backtest indicadores – salir a 'x' días

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #26815 quote
    vitatrader35vitatrader35
    Participant
    Average

    Hola a todos,

    Estoy intentando probar la eficacia de algunos de los indicadores más típicos.

    Para esto, me gustaría entrar cuando el indicador en cuestión de una señal (esto es fácil) y poder salir de la posición  cuando haya pasado un número de días en concreto desde que se abrió la posición (sin que ningún STOPLOSS o STOP PROFFIT deshaga la posición). ¿A alguien se le ocurre cómo se puede hacer esto?

    Muchas gracias

    #27033 quote
    vitatrader35vitatrader35
    Participant
    Average

    Soy despistadillo, pero por si hay algún otro como yo leyendo:

    TRADEINDEX

    
    if onmarket and BARINDEX-TRADEINDEX(1)>=5 then 
      SELL AT MARKET 
      EXITSHORT AT MARKET 
    endif

    Cierra las posiciones long y short, y a mí me sirve a la perfección. El 5 se podría tratar como una variable.

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

backtest indicadores – salir a 'x' días


ProOrder: Trading Automático y Backtesting

New Reply
Author
Summary

This topic contains 1 reply,
has 1 voice, and was last updated by vitatrader35vitatrader35
9 years, 7 months ago.

Topic Details
Forum: ProOrder: Trading Automático y Backtesting
Language: Spanish
Started: 03/01/2017
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...