Problema en probacktest con summation

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #98003 quote
    AntusAntus
    Participant
    Junior

    Hola,

    En probacktest, un robot que funcionaba sin errores, hoy ha dejado de comprar y vender y sale el gráfico de liquidez plano.

    Chequeando el código he visto que el problema está en la siguiente linea de código:

    if summation[48*2]((DClose(1)-DOpen(1))/DOpen(1)<-0.95/100)>=1 then

     

    porque si la cambio a:

    if summation[1]((DClose(1)-DOpen(1))/DOpen(1)<-0.95/100)>=1 then

    entonces si que ya hay operaciones y el gráfico de liquidez deja de ser plano.

    También me pasa si intento usar la función graph, con

    graph Summation[2]((DClose(1)-DOpen(1))/DOpen(1)<-0.95/100) as "Suma"

    PRT no grafica ningún curva y , sin embargo con

    graph Summation[1]((DClose(1)-DOpen(1))/DOpen(1)<-0.95/100) as "Suma"

    sí que funciona.

    Teniendo en cuenta que hasta hace unos días funcionaba perfectamente ¿que creéis que puede haber pasado?¿que me recomendáis?

    Gracias y saludos

    #98158 quote
    NicolasNicolas
    Keymaster
    Legend

    ¿Probó con un "DEFPARAM PRELOADBARS = 1000" por ejemplo, al principio del código?

    #98205 quote
    AntusAntus
    Participant
    Junior

    Hola Nicolas,

    Gracias por contestar.

    Sí, el robot ya tenía esa instrucción.

    He desinstalado e instalado de nuevo PRT. También he probado a lanzarlo con otro navegador pero sigue igual.

    #98311 quote
    NicolasNicolas
    Keymaster
    Legend

    Otra posible solución, intente incrustar esa condición en:

    if barindex>2 then 
     ...
    endif

    o con:

     if dopen (1)> 0 then 
     ..
    endif
Viewing 4 posts - 1 through 4 (of 4 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

Problema en probacktest con summation


ProOrder: Trading Automático y Backtesting

New Reply
Author
author-avatar
Antus @antus Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by NicolasNicolas
7 years, 4 months ago.

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