relative strenght by value

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #250179 quote
    Bert Lamoree
    Participant
    New
    I have tried to write the underlying code (Pinescript from TradingView) in Prorealcode but i do not succeed.
    The problem seems the way you have to have to call the S&P.
    The code works like this:
    It plots the difference between the asset in the chart corrected by an adaptable factor and the S&P.
    Could you adapt this code for Prorealtime?
    Regards
    Bert Lamoree
    //@version=5
    indicator(‘Relative Strength’, shorttitle=’RS’, timeframe=”)
    comparativeTickerId = input.symbol(‘SPX’, title=’Comparative Symbol’)
    factor = input.int(10, minval=1, title=’Period’)
    showMA = input(defval=false, title=’Show Moving Average’)
    lenghtMA = input.int(10, minval=1, title=’Moving Average Period’)
    baseSymbol = request.security(syminfo.tickerid, timeframe.period, close)
    comparativeSymbol = request.security(comparativeTickerId, timeframe.period, close)
    hline(0, color=color.black, linestyle=hline.style_dotted)

     

    res=baseSymbol*factor-comparativeSymbol
    plot(res, title=’RS’, color=color.new(#1155CC, 0))
    sma_1 = ta.sma(res, lenghtMA)
    plot(showMA ? sma_1 : na, color=color.new(color.gray, 0))
    #250185 quote
    Iván González
    Moderator
    Master

    Hi. In indicators and backtester, you can’t reference other assets.
    Anyway, the indicator you’re trying to program is similar to the Relative Strength (Comparison) and the RscMansfield. Both are included among the platform’s predefined indicators.

    #250203 quote
    Bert Lamoree
    Participant
    New

    Hi Ivan,

     

    Thank you for your reply.

    Just because the Relative Strength (Comparison) and the RscMansfield are available, i thought it should be possible to see the codes that are used to access other assets in the codes ;

    these indicators do use other assets. So i do not understand why it is blocked.

    Bert

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

relative strenght by value


ProBuilder: Indicators & Custom Tools

New Reply
Author
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Bert Lamoree
5 months, 1 week ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 08/28/2025
Status: Active
Attachments: 1 files
Logo Logo
Loading...