código con el RSI LAGUERRE

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #124102 quote
    lluis06
    Participant
    Junior

    Hola buenas tardes,

    Estoy intentando realizar un código con el RSL LAGUERRE. He encontrado uno en la Libreria, sin embargo mi capacidad tiene un limite muy estrecho y no logro desarrollarlo. Solo quiero decirle que compre al cruzar linea hacia arriba de 0,2 y que venda al cruzar  la linea 0,8.

    No se si es posible. ¿Alguien puede darle un vistazo para ayudarme?

    Saludos y muchas gracias

    Luis

     

    // --- settings
    //nFE=13 //length for Fractal Energy calculation
    // --- end of settings
    
    // Calculations
    if barindex>nFE then
     o = (open + close[1]) / 2
     hh = Max(high, close[1])
     ll = Min(low, close[1])
     c = (o + hh + ll + close) / 4
     gamma = Log(Summation[nFE](Max(high, close[1]) - Min(low, close[1])) / (Highest[nFE](high) - Lowest[nFE](low)))/ Log(nFE)
    
     L0 = (1 - gamma) * c + gamma * L0[1]
     L1 = -gamma * L0 + L0[1] + gamma * L1[1]
     L2 = -gamma * L1 + L1[1] + gamma * L2[1]
     L3 = -gamma * L2 + L2[1] + gamma * L3[1]
     if L0 >= L1 then
      CU1 = L0 - L1
      CD1 = 0
     else
      CD1 = L1 - L0
      CU1 = 0
     endif
    
     if L1 >= L2 then
      CU2 = CU1 + L1 - L2
      CD2 = CD1
     else
      CD2 = CD1 + L2 - L1
      CU2 = CU1
     endif
    
     if L2 >= L3 then
      CU = CU2 + L2 - L3
      CD = CD2
     else
      CU = CU2
      CD = CD2 + L3 - L2
     endif
     
     if CU + CD <> 0 then
      lagRSI = CU / (CU + CD)
     else
      lagRSI=0
     endif
    endif
    
    RETURN gamma coloured(200,200,0) as "gamma", lagRSI coloured(0,128,255) style(line,2) as "Laguerre RSI self adjusting", 0.2 style(dottedline,1) as "oversold level", 0.8 style(dottedline,1) as "overbought level"
    #129677 quote
    robertogozzi
    Moderator
    Master

    No agregue sus mensajes a otros temas no relacionados.

    Necesitas comenzar un nuevo tema. Gracias 🙂

    #129788 quote
    Nicolas
    Keymaster
    Master

    Con una estrategia tan simple, tomaría aproximadamente 2 minutos hacerlo con la herramienta de creación asistida, ¿por qué no la usa? ¡¡Gracias!!

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

código con el RSI LAGUERRE


ProOrder: Trading Automático y Backtesting

New Reply
Author
author-avatar
lluis06 @lluis06 Participant
Summary

This topic contains 2 replies,
has 3 voices, and was last updated by Nicolas
5 years, 10 months ago.

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