Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Adv/decl

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Adv/decl

    Hi,

    I'm using Kinetick and I want to display IIGA_Z and IIGD_Z as either a ratio or percentage - has anyone done this already / know the relevant min/max values to compute from?

    Thanks

    #2
    Hello starman85,

    Thanks for your post.

    You could add separate ^ADV and ^DECL data series in an indicator and then once you find the difference you could consider tracking min/max from a certain look back period. once you calculate the min/max, you can use those values to normalize it to a percentage range of 0-100. If you have ^ADD already, you an loop through all historical bars in State.DataLoaded to get the min/max to get your normalization coefficients.

    I.E.

    Code:
    else if (State == State.DataLoaded)
    {
        double max = double.MinValue;
        double min = double.MaxValue;
        for (int i = 0; i < BarsArray[0].Count; i++)
        {
            max = Math.Max(max, High.GetValueAt(i));
            min = Math.Min(min, High.GetValueAt(i));
        }
    }
    An example indicator that estimates ^ADD from ^ADV and ^DECL can be found below.

    NYSE Advancing Issues/Declining Issues Uses historical tick data to calculate the ^ADV index minus the ^DECL index to give a simulation of the ^ADD index. Requires a data feed that supports indexes and provides data for the ^ADV (NYSE Advancing Issues) and ^DECL (NYSE Declining Issues). Update June 16th, 2020 &#8211; Corrected stroke attributes to [&#8230;]


    The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.

    A publicly available resource on normalizing values in C# can be found below.

    https://stackoverflow.com/questions/...-to-3/51161208

    We look forward to assisting.
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by fx.practic, 10-15-2013, 12:53 AM
    5 responses
    5,404 views
    0 likes
    Last Post Bidder
    by Bidder
     
    Started by Shai Samuel, 07-02-2022, 02:46 PM
    4 responses
    95 views
    0 likes
    Last Post Bidder
    by Bidder
     
    Started by DJ888, Yesterday, 10:57 PM
    0 responses
    8 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by MacDad, 02-25-2024, 11:48 PM
    7 responses
    160 views
    0 likes
    Last Post loganjarosz123  
    Started by Belfortbucks, Yesterday, 09:29 PM
    0 responses
    9 views
    0 likes
    Last Post Belfortbucks  
    Working...
    X