Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trying to migrate to NT8

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

    #16
    Hello reedstickets,

    Thanks for your reply.

    If I may suggest, use the Ninjascript wizard to create the indicator shell and make sure you specify your plot (with a name other than Plot) when the wizard requests it. The wizard will create all of the structures needed for you (which includes the public output). Then in the onBarUpdate() you would only need to use the name of the plot with the barsago index of [0], for example: myPlotname[0] = myValue;

    Comment


      #17
      Got it and it worked. Hopefully I can update the final 3 I need now.

      Thank you

      Comment


        #18
        I got most of them converted but this one compiled but is giving incorrect data. This is to estimate what the closing volume for a stock would be, o On Pace Volume

        MyPlot1[0] = (SMA(Volume, Bars.BarsSinceNewTradingDay + 1)[0]);

        Do you see anything that would cause different data in NT from NT7?

        TIA

        Comment


          #19
          Hello reedstickets,

          Thanks for your reply.

          Glad to hear of your progress.

          It looks like you are creating a daily changing moving average and using that to average the volume per bar for that day?. I recommend adding print statements to compare the actual data being analyzed. You may need to create the same in NT7 to best compare.

          Reference: https://ninjatrader.com/support/help...-us/?print.htm

          Here is a link to our debugging tips (that reference Print): https://ninjatrader.com/support/help...script_cod.htm

          Comment


            #20
            Yes, pretty much. The script was to take the total average of volume so far in the trading session and then estimate where it will end for th day based on the volume traded so far. But so far it is showing less volume then has already been traded. So a stock that was already at 15 million halfway through the session would be on pace for 30 million at close but the at the 15 million point the indicator is showing less volume then has already been traded.

            It actually seems like it is dividing the volume and not multiplying it by time left in the trading session or something.

            Comment


              #21
              Nevermind, been so long I forget what I created. It is the average for the bars. So if I want stocks that will trade over 10 million by close the average on a 30 minute time frame needs to be above 769230 ( 13 x 768230 = 10 million).

              So one more to go, and it involves an indicator so I will have a question or two for you and then should be close to set.

              Thanks for the help,

              Comment


                #22
                How does this change with nt8? This is something I used a lot:

                {
                Plot0.Set(1);
                }

                else
                {
                Plot0.Set(0);
                }

                Does this look correct:

                {
                MyPlot[0] = (1);
                }

                else
                {
                MyPlot[0] = (0);
                }
                Last edited by reedstickets; 05-09-2019, 03:39 PM.

                Comment


                  #23
                  Okay, feel very close for this final one but getting a "No Overload Method for TSSuperTrend Requires 5 arguments"

                  if (CurrentBar < 1)
                  return;

                  if(TSSuperTrend(SuperTrendMode.ATR,14,2.618,Moving AverageType.HMA,14).UpTrend[0] == TSSuperTrend(SuperTrendMode.ATR,14,2.618,MovingAve rageType.HMA,14).UpTrend[1])

                  {
                  MyPlot[0] = (1);
                  }

                  else
                  {
                  MyPlot[0] = (0);
                  }

                  Comment


                    #24
                    Hello reedstickets,

                    Thanks for your reply.

                    When you type in the Ninjascript editor, it will show what method overloads are needed. Please see the attached.

                    Click image for larger version

Name:	reedstickets-1.PNG
Views:	118
Size:	13.5 KB
ID:	1056910

                    Based on that I would suggest TSSuperTrend(SuperTrendMode.ATR,14,2.618,Moving AverageType.HMA,14, false, false, false).UpTrend[0]

                    Comment


                      #25
                      Thanks Paul,

                      That old one worked in NT7 without the false Bool stuff. Is that something different in NT8? Hopefully that works, seems like it should.

                      Comment


                        #26
                        Hello reedstickets,

                        Just for clarification, the TSSuperTrend does not come with NinjaTrader it is an add-on, just as it was in NT7. There may be more than one TSSuperTrend and the use of the parameters would depend on how it was coded. Here is a link to the one I referenced: https://ninjatraderecosystem.com/use.../tssupertrend/

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                        0 responses
                        571 views
                        0 likes
                        Last Post Geovanny Suaza  
                        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                        0 responses
                        330 views
                        1 like
                        Last Post Geovanny Suaza  
                        Started by Mindset, 02-09-2026, 11:44 AM
                        0 responses
                        101 views
                        0 likes
                        Last Post Mindset
                        by Mindset
                         
                        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                        0 responses
                        548 views
                        1 like
                        Last Post Geovanny Suaza  
                        Started by RFrosty, 01-28-2026, 06:49 PM
                        0 responses
                        548 views
                        1 like
                        Last Post RFrosty
                        by RFrosty
                         
                        Working...
                        X