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 jclose, Today, 09:37 PM
    0 responses
    4 views
    0 likes
    Last Post jclose
    by jclose
     
    Started by WeyldFalcon, 08-07-2020, 06:13 AM
    10 responses
    1,413 views
    0 likes
    Last Post Traderontheroad  
    Started by firefoxforum12, Today, 08:53 PM
    0 responses
    10 views
    0 likes
    Last Post firefoxforum12  
    Started by stafe, Today, 08:34 PM
    0 responses
    10 views
    0 likes
    Last Post stafe
    by stafe
     
    Started by sastrades, 01-31-2024, 10:19 PM
    11 responses
    169 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Working...
    X