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

Compile error when passing a flag from njt7 to njt8 help please

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

    #16
    Hello senderz,

    I submitted a feature request with the suggestion this be changed.

    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment


      #17
      Historical volatility

      Hello Alan P. I would like to know if you have any new code that I sent to be passed to NT8.

      Comment


        #18
        Hello castapio7,

        If you are referring to the indicator you posted, I do not. If this is not what you are referring to please provide more information.
        Alan P.NinjaTrader Customer Service

        Comment


          #19
          Hi, here is a good NT8 code that will help you to make big progress

          protected override void OnBarUpdate()
          {
          // Only allow this to run in a minute type period.
          if (CurrentBar < period+1 ||
          (Bars.BarsPeriod.BarsPeriodType == BarsPeriodType.Tick)
          ||(Bars.BarsPeriod.BarsPeriodType == BarsPeriodType.Range)
          ||(Bars.BarsPeriod.BarsPeriodType == BarsPeriodType.Second)
          ||(Bars.BarsPeriod.BarsPeriodType == BarsPeriodType.Volume)
          ||(Bars.BarsPeriod.BarsPeriodType == BarsPeriodType.Year))

          Comment


            #20
            If you can help me with the last. I throw this error as we can solve it. And thanks for the suggestion of the previous comment
            Attached Files

            Comment


              #21
              check you have the following block of code or similar

              #region Properties
              [Browsable(false)] // this line prevents the data series from being displayed in the indicator properties dialog, do not remove
              [XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
              public Series<double> Value
              {
              get { return Values[0]; }
              }

              [NinjaScriptProperty]
              [Display(Description = "period", GroupName = "Parameters", Order = 1)]
              public int Period
              {
              get { return period; }
              set { period = Math.Max(1, value); }
              }

              #endregion
              }
              }

              Comment


                #22
                historical volatility

                Attached file of historical volatility indicator so you can see the error when compiling. Thank you very much for the help
                Attached Files

                Comment


                  #23
                  63/5000
                  That was changed but the error persists with the variable "value"

                  Comment


                    #24
                    Thats pretty easy to fix

                    hints:

                    Value.set(histvolatile);
                    ->
                    Value[0] = histvolatile;

                    as well as

                    {Value.set(0);
                    ->
                    {Value[0] = 0;




                    one more hint:

                    inside new NT8 method

                    protected override void OnStateChange()

                    I guess you have to introduce the state switcher, eg:

                    switch (State)
                    {
                    case State.SetDefaults:
                    ........

                    you current implementation would obviously create plot (AddPlot()) on each & every call of this method

                    and OnStateChange() is being called in lots of cases!
                    on creation, on termination, etc etc

                    consider reading help or consulting some samples for NT8 script......


                    good luck.

                    Comment


                      #25
                      historical volatility

                      I attach the exported as I leave it so that if you can give it a look since I do not know anything about programming and I was correcting it with help of you I want to hang in the part of indicators since it is very important for the trader. NT8 should include this type of indicator.
                      Attached Files

                      Comment


                        #26
                        historical volatility

                        It does not throw me any more errors but when using it shows nothing

                        Comment


                          #27
                          provides steps and configuration (bar type, instrument type, tick type, connection type, everything!)
                          most probably there is a logical issue in the indicator code.
                          or mis-use.

                          2) could you attach the same working script for nT7 that shows smth?

                          Comment


                            #28
                            historical volatility

                            I'll give it to you. I would have two more indicators to pass you would be willing to make a pay for the work that takes you.
                            Attached Files

                            Comment


                              #29
                              I'v analyzed, doing some stuff and here we go
                              Please confirm this is what you need - http://prntscr.com/g0tj9w

                              Comment


                                #30
                                What would be the password?

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by pechtri, 06-22-2023, 02:31 AM
                                9 responses
                                122 views
                                0 likes
                                Last Post NinjaTrader_ChelseaB  
                                Started by frankthearm, 04-18-2024, 09:08 AM
                                16 responses
                                66 views
                                0 likes
                                Last Post NinjaTrader_Clayton  
                                Started by habeebft, Today, 01:18 PM
                                1 response
                                5 views
                                0 likes
                                Last Post NinjaTrader_ChelseaB  
                                Started by benmarkal, Today, 12:52 PM
                                2 responses
                                14 views
                                0 likes
                                Last Post benmarkal  
                                Started by f.saeidi, Today, 01:38 PM
                                1 response
                                8 views
                                0 likes
                                Last Post NinjaTrader_BrandonH  
                                Working...
                                X