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.

    https://ninjatraderecosystem.com/use...vance-decline/

    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 sidlercom80, Today, 02:40 AM
    0 responses
    2 views
    0 likes
    Last Post sidlercom80  
    Started by b16_aln, Today, 01:52 AM
    0 responses
    7 views
    0 likes
    Last Post b16_aln
    by b16_aln
     
    Started by junkone, Yesterday, 08:55 PM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Jason  
    Started by adaeiqendqw, 01-16-2021, 02:56 AM
    1 response
    15 views
    0 likes
    Last Post NinjaTrader_Jason  
    Started by [email protected], Yesterday, 06:10 PM
    5 responses
    16 views
    0 likes
    Last Post NinjaTrader_ChrisSch  
    Working...
    X