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 junkone, Today, 11:37 AM
    0 responses
    0 views
    0 likes
    Last Post junkone
    by junkone
     
    Started by quantismo, 04-17-2024, 05:13 PM
    5 responses
    32 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by proptrade13, Today, 11:06 AM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Started by love2code2trade, 04-17-2024, 01:45 PM
    4 responses
    34 views
    0 likes
    Last Post love2code2trade  
    Started by cls71, Today, 04:45 AM
    2 responses
    10 views
    0 likes
    Last Post eDanny
    by eDanny
     
    Working...
    X