Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

new column Market Analyzer

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

    new column Market Analyzer

    Hello, as i add new columns to MA based on indicator data ie the plot values. is there any feature request to display the 'bars ago' value. Ie so is not just the current bar value be it on bar close or on every tick etc ? i could create an indicator to offset the value if i want to see X bars ago and supply a parameter i guess and then set in the plot value for the 0 ie current value ?
    It seems to me this would be useful to know given this exists in strategy builder comparing offsets or bars ago values?
    thanks

    #2
    Hello explorer101,

    You are wanting to display the value from a previous bar by setting a Bars ago property for an Indicator added to the Market Analyzer, is this correct?

    I am not seeing there is an existing feature request for this, but I am happy to submit one on your behalf.
    Once I have a tracking ID I'll post in this thread for future reference.

    You could alter an indicator and use two series. The first series would have the actual stored value saved as the bar updates, the second series (which can be a plot) would be set to the value of n bars ago of the first series.

    In the scope of the class
    Code:
    private Series<double> calculatedValues;
    
    [XmlIgnore()]
    public Series<double> MyPlot
    {
        get { return Values[0]; }
    }
    
    [NinjaScriptProperty]
    public int BarsAgo
    { get; set; }
    In OnStateChange():
    Code:
    if (State == State.SetDefaults)
    {
        AddPlot(Brushes.Blue, "MyPlot");
        BarsAgo = 3;
    }
    else if (State == State.DataLoaded)
    {
        calculatedValues = new Series<double>(this);
    }
    In OnBarUpdate():
    Code:
    calculatedValues[0] = High[0] - Low[0];
    MyPlot[0] = calculatedValues[BarsAgo];
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks chelsea - that was my idea to alter the indicator or have another version for MA. I wonder still if it would be useful if possible for users who dont know ninjascript to have this bars ago offset option (as in strategy builder) without needing to code this. That is if this is possible ?
      In the meantime ill follow your suggestion which is what i was thinking on, just wondered if something was in the works

      Comment


        #4
        Hello explorer101,

        I've received tracking ID# SFT-4472 for this request to use bars ago with indicator columns in the Market analyzer.

        As with all feature requests, interest is tracked before implementation is considered, so we cannot offer an ETA or promise of fulfillment. If implemented, it will be noted in the Release Notes page of the Help Guide.

        Release Notes — https://ninjatrader.com/support/help...ease_notes.htm
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Jon17, Today, 04:33 PM
        0 responses
        1 view
        0 likes
        Last Post Jon17
        by Jon17
         
        Started by Javierw.ok, Today, 04:12 PM
        0 responses
        6 views
        0 likes
        Last Post Javierw.ok  
        Started by timmbbo, Today, 08:59 AM
        2 responses
        10 views
        0 likes
        Last Post bltdavid  
        Started by alifarahani, Today, 09:40 AM
        6 responses
        41 views
        0 likes
        Last Post alifarahani  
        Started by Waxavi, Today, 02:10 AM
        1 response
        21 views
        0 likes
        Last Post NinjaTrader_LuisH  
        Working...
        X