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 NullPointStrategies, Yesterday, 05:17 AM
            0 responses
            56 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            133 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            73 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            45 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            49 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X