Highesthigh on RIC

Optuma Forums Optuma Scripting Highesthigh on RIC

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #68769
    Louis
    • Topics: 38
    • Replies: 65
    • Posts: 103

    Hi,

    I have a chart with weekly price bars and a ShowPlot tool. The script for the ShowPlot tool is:
    HIGHESTHIGH(BARS=52)

    The script is showing the high looking back 52 bars. I tried to add the same ShowPlot tool and script to a RIC tool. Something is not right. Please see the picture attached. I want to plot the highest high on the RIC tool looking back 52 bars the same way as on the price bars.

    I did try a more detailed script on the RIC which did not work:

    As a note: the same ShowPlot tool and highesthigh script worked as planned on a volume tool, but I ran into the same issue on an rsi and macd as with the RIC.

    thank you so much!

    #68775
    Darren
    • Topics: 71
    • Replies: 880
    • Posts: 951

    Hi Louis,

    As the RIC is on the chart of AAPL there’s no need to use the GetData function – that’s only needed when you you are referencing a different dataset. Because the RIC() function outputs Open, High, Low, and Close values the HighestHigh will use the high value by default, creating the gap in the Show Plot.

    Use this for the closing RIC value:

    Capture

    #68783
    Thomas
    • Topics: 130
    • Replies: 176
    • Posts: 306

    Hi Louis,

    a small change to your script would solve the problem. In the RIC setting set the Normalization to “None” (DATESEL=None), this setting could be better.

    For the last script line you can also use the following:

    Best wishes,
    Thomas

    • This reply was modified 2 months ago by Thomas.
    #68809
    Louis
    • Topics: 38
    • Replies: 65
    • Posts: 103

    Hi Darren. Thank you. This confirms that I have been incorrectly calculating a few things using Optuma.

    All I want to do is plot the current position of a tool, be it the RIC or ADL, in its 52-week range. I tried a stochastic of the RIC, however, as you pointed out the RIC only plots “closes,” so the stochastic tool did not work when applied to the RIC tool.

    Here is the script I wrote to place the RIC into a stochastic formula. Please let me know if there is a more efficient or easier way to do this. I plan on doing this with a few tools and them manipulating the results in large watchlists. Perhaps even average a few of the results. Thank you.

    #68821
    Darren
    • Topics: 71
    • Replies: 880
    • Posts: 951

    Hi Louis,

    You can use the same STOCH() formula as this one:

    https://forum.optuma.com/topic/normalizing-formula-results-in-a-watchlist/#post-67893

    On a weekly chart, change Bar1 to 52 for the yearly range. As of Thursday’s close AAPL is at 99.5% of the yearly RIC range (shaded in yellow):

    Capture

    #68839
    Louis
    • Topics: 38
    • Replies: 65
    • Posts: 103

    Perfect. Thank you for all of your help Darren.

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

Pin It on Pinterest