RscMansfield versión v12 da problemas

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #259788 quote
    lokbuscas
    Participant
    Average

    Hola, en la versión v12 este código da problemas, he intentado solucionarlo pero no doy con la tecla el error que pone es se espera una campo entero positivo con close[i] GRACIAS

    CountR = 0

    i=51


    R = Close[i] / 5580.94

    CountR = CountR + R

    i=i-1

    R = Close[i] / 5074.08

    CountR = CountR + R

    i=i-1

    R = Close[i] / 5363.36

    CountR = CountR + R

    i=i-1

    R = Close[i] / 5282.7

    CountR = CountR + R

    i=i-1

    R = Close[i] / 5525.21

    CountR = CountR + R

    i=i-1

    R = Close[i] / 5686.67

    CountR = CountR + R

    i=i-1

    R = Close[i] / 5659.91

    CountR = CountR + R

    i=i-1

    R = Close[i] / 5958.38

    CountR = CountR + R

    i=i-1

    R = Close[i] / 5802.82

    CountR = CountR + R

    i=i-1

    R = Close[i] / 5911.69

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6000.36

    CountR = CountR + R

    i=i-1

    R = Close[i] / 5976.97

    CountR = CountR + R

    i=i-1

    R = Close[i] / 5967.84

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6173.07

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6279.35

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6259.75

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6296.79

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6388.64

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6238.01

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6389.45

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6449.80

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6466.91

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6460.26

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6481.50

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6584.29

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6664.36

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6643.70

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6715.79

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6552.51

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6664.01

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6791.69

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6840.2

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6728.80

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6734.11

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6602.99

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6849.09

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6870.40

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6827.41

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6834.50

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6929.94

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6858.47

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6966.28

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6940.01

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6915.61

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6939.03

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6932.30

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6836.17

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6909.51

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6878.88

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6740.02

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6632.19

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6506.48

    CountR = CountR + R

    i=i-1

    R = Close[i] / 6368.85

    CountR = CountR + R

    //i=i-1


    BasePrice = CountR / 52

    FR = ((R / BasePrice) – 1) * 10


    RETURN 0 AS “CERO”, FR AS “FR”

    #259793 quote
    robertogozzi
    Moderator
    Master

    En la segunda línea escribe:

    i=52  // no 51
    
    Iván González thanked this post
    #259796 quote
    lokbuscas
    Participant
    Average

    joer y yo dándole vueltas a todo


    Gracias Roberto

    robertogozzi thanked this post
    #259799 quote
    Iván González
    Moderator
    Master

    Me pica la curiosidad… Para qué utilizas este código? si es para el screener puedes hacer usando equityframe y así no tienes que estar cada semana actualizando…

    // RSC Mansfield — Screener
    mult = 10
    prd = 52
    EQUITYFRAME("Índ. - S&P","SP500")
    CloseInd = Close
    EQUITYFRAME(default)
    CloseVal = Close
    // Ratio de fuerza relativa
    Ratio = CloseVal / CloseInd
    // Media x periodos del ratio
    SMA = average[prd](Ratio)
    // Fórmula Mansfield: ((Ratio / SMA) - 1) * mult
    RSCMansfield = (Ratio / SMA - 1) * mult
    
    SCREENER(RSCMansfield AS "RSC Mansfield")
    


    robertogozzi thanked this post
    #259864 quote
    lokbuscas
    Participant
    Average

    Hola Iván,


    lo uso para actualizar el indicador cada semana en gráfico


    Gracias

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

RscMansfield versión v12 da problemas


ProBuilder: Indicadores y Herramientas

New Reply
Author
author-avatar
lokbuscas @lokbuscas Participant
Summary

This topic contains 4 replies,
has 3 voices, and was last updated by lokbuscas
18 hours, 8 minutes ago.

Topic Details
Forum: ProBuilder: Indicadores y Herramientas
Language: Spanish
Started: 04/02/2026
Status: Active
Attachments: No files
Logo Logo
Loading...