Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Indicators

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

    Strategy Indicators

    Is it possible to load a strategy that also creates an indicator panel containing 3 user-defined series?

    apolgies just found this

    https://ninjatrader.com/support/foru...or-in-strategy

    and imported HeikenAshiIndicatorStrategyExample.zip but what I'm trying to do is to get the strategy to create an indicator panel. Something simple like SMA whose data I can modify.
    Last edited by dibDab; 02-10-2023, 09:05 AM.

    #2
    Hello dibDab,

    Yes, you can add an indictor to a chart with AddChartIndicator() and set the panel it will appear in.
    Below is a link to an example.
    https://ninjatrader.com/support/foru...592#post788592


    However, a series is a collection that has one slot for every bar on the chart.
    A user is not able to define a series when they run the script.

    Are you certain you are looking for a user-defined series object and not another type of input control like a double, and enum, or a bool?
    Are you trying to allow the user to select the calculations for the plot (such as selecting a source indicator)?
    https://ninjatrader.com/support/help...ned_parame.htm
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      looking at

      StrategyPlotPanelSelectIndicator from StrategyPlotPanelSelectExample_NT8.zip

      Is there any documentation on StrategyPlotPanelSelectIndicator?


      Comment


        #4
        Hello dibDab,

        There is not documentation on this, or any other, example script on the forum. These are just made as quick examples to demonstrate a tool or concept in response to someone's inquiry.

        There is documentation on the ChartIndicators collection.
        https://ninjatrader.com/support/help...indicators.htm

        Indicators and plots, and the Values collection of plot series.
        https://ninjatrader.com/support/help.../indicator.htm


        And the Strategy.
        https://ninjatrader.com/support/help...8/strategy.htm
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          ok thanks, was on the wrong track but not any more,

          one last question: if myIndicator has 2 plots
          Code:
          AddPlot(Brushes.Blue, "Plot0");
          AddPlot(Brushes.Orange, "Plot1");
          and I want to set these values in my strategy do I need to have get & set in my myIndicator properties? if so how do I do that?

          Code:
          [Browsable(false)]
          [XmlIgnore()]
          public Series<double> Plot0
          {
          get { return Values[0]; }
          set ?
          }​​
          ​
          [Browsable(false)]
          [XmlIgnore()]
          public Series<double> Plot1
          {
          get { return Values[1]; }
          set ?
          }

          in myStrategy:

          myIndicator.Value[0][0] = Low[0] - 5 * TickSize;
          myIndicator.Value[1][0] = Low[0] - 5 * TickSize;


          Last edited by dibDab; 02-20-2023, 06:57 AM.

          Comment


            #6
            Hello dibDab,

            You will need the getter to return the plot series. No setter is necessary.
            I'm trying to expose my variables to the strategy builder so everyone can have better use of the WaveTrend indicator (it has a lot of code). Explain this to me like I am 5 because this isnt the first time I've tried to figure it out and hit a wall. What is Series? I know its like an array that stores bars. Why not just call it
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Mindset, 04-21-2026, 06:46 AM
            0 responses
            88 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by M4ndoo, 04-20-2026, 05:21 PM
            0 responses
            134 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by M4ndoo, 04-19-2026, 05:54 PM
            0 responses
            68 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by cmoran13, 04-16-2026, 01:02 PM
            0 responses
            119 views
            0 likes
            Last Post cmoran13  
            Started by PaulMohn, 04-10-2026, 11:11 AM
            0 responses
            69 views
            0 likes
            Last Post PaulMohn  
            Working...
            X