Shinoara Ratio Indicator

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #134405 quote
    Loop
    Participant
    Senior

    Dear All,

    I found this indicator (Shinoara Ratio) for Tradingview and I was wondering if you could transform it in prt code:

    https://www.tradingview.com/script/WqDQjQmB/

    Thanks a lot in advance

    Loop

    // @version=2
    study("Shinohara Ratio")
    len = input(title="Length", type=integer, defval=14)
    line1 = input(title="Line 1", type=integer, defval=50)
    line2 = input(title="Line 2", type=integer, defval=100)
    line3 = input(title="Line 3", type=integer, defval=150)
    line4 = input(title="Line 4", type=integer, defval=80)
    line5 = input(title="Line 5", type=integer, defval=120)
    
    A_bull = sum(high, len) - sum(open, len)
    A_bear = sum(open, len) - sum(low, len)
    
    B_bull = sum(high, len) - sum(close[1], len)
    B_bear = sum(close[1], len) - sum(low, len)
    
    A_ratio = 100 * A_bull/A_bear
    B_ratio = 100 * B_bull/B_bear
    
    plot(A_ratio, color=blue, title="A Ratio")
    plot(B_ratio, color=red, title="B Ratio")
    hline(line1, color=red, linestyle=solid)
    hline(line2, color=black, linestyle=solid)
    hline(line3, color=blue, linestyle=solid)
    hline(line4, color=green, linestyle=solid)
    hline(line5, color=green, linestyle=solid)
    Shinoara-1.jpg Shinoara-1.jpg
    #134425 quote
    Nicolas
    Keymaster
    Master

    4th times you asked for a code conversion and you still don’t follow the rules to ask for it. Please add a description and provide some screenshots.

    #134440 quote
    Loop
    Participant
    Senior

    Dear Nicolas,
    sorry for messing up the rules of the forum, which is always excellent thanks to your hard work.
    I try to remedy here. This indicator description from google is the following: “Shinohara Intensity Ratio indicator can be used to analyze between the strength of the stock of strong ratio and popularity of weak ratio. The strong ratio means that Strong Energy Level Ratio and weak ratio means that Strong Energy Level, Weak Popularity Ratio. However, this is a lesser-known study and should be used only with a combination of other technical indicators.” To be honest I don’t finf this explanation very meaningful.

    I found this indicator interesting because it reminds me something already published on prorealcode website which I used with some success:

    Trend Force

    I attached also a screenshot of the indicator from Yahoo Finance website, in which the indicator was set on 50 periods.
    Apologies again

    Best regards

    Loop

    Shinoara.jpg Shinoara.jpg
    #134521 quote
    Nicolas
    Keymaster
    Master

    Here is the code translated with the formula you posted, but it doesn’t seem to be the same being used in the screenshot you provided.

    len = 50 //length
    
    Abull = summation[len](high) - summation[len](open)
    Abear = summation[len](open) - summation[len](low)
    
    Bbull = summation[len](high) - summation[len](close[1])
    Bbear = summation[len](close[1]) - summation[len](low)
    
    Aratio = 100 * Abull/Abear
    Bratio = 100 * Bbull/Bbear
    
    return Aratio coloured(0,0,255), Bratio coloured(255,0,0)
    #134724 quote
    Loop
    Participant
    Senior

    Thank you Nicolas for your prompt reply.

    Indeed it looks very different from the outcome of the attached picture.

    Even doing some Google search I can’t find the code. I think it’s a bit strange since this indicator is among the pre-defined indicators of Yahoo Finance therefore it shouldn’t be too exotic.

    Never mind, if anyone in the community has ever heard about it please feel free to add some comments.

    Thanks again

    Cheers

    Loop

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

Shinoara Ratio Indicator


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Loop @loop Participant
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by Loop
5 years, 8 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 06/03/2020
Status: Active
Attachments: 2 files
Logo Logo
Loading...