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

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;
    Paul H.NinjaTrader Customer Service

    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
          Paul H.NinjaTrader Customer Service

          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:	94
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]

                    Paul H.NinjaTrader Customer Service

                    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/
                        Paul H.NinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by SantoshXX, Today, 03:09 AM
                        0 responses
                        11 views
                        0 likes
                        Last Post SantoshXX  
                        Started by DanielTynera, Today, 01:14 AM
                        0 responses
                        2 views
                        0 likes
                        Last Post DanielTynera  
                        Started by yertle, 04-18-2024, 08:38 AM
                        9 responses
                        41 views
                        0 likes
                        Last Post yertle
                        by yertle
                         
                        Started by techgetgame, Yesterday, 11:42 PM
                        0 responses
                        12 views
                        0 likes
                        Last Post techgetgame  
                        Started by sephichapdson, Yesterday, 11:36 PM
                        0 responses
                        2 views
                        0 likes
                        Last Post sephichapdson  
                        Working...
                        X