Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Converting indicators from 6.5 to Ninja 7 problems

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

    #16
    Originally posted by dj22522 View Post
    In my post#10, CalculateValueAreaHistov2, imports and compiles into NT7 without errors.
    I can then see it in the indicator list and apply it to a chart, however nothing plots.

    I don't get any errors.
    I'm unclear how to proceed ?

    Appreciate the reply koganam, many thx
    I would suggest that you:
    1. Clean out the log.
    2. Open a new workspace with 1 chart
    3. Apply the indicator to it
    4. Examine the log for errors. (Or post the log, so we can see what is in it).

    Comment


      #17
      Originally posted by koganam View Post
      I would suggest that you:
      1. Clean out the log.
      2. Open a new workspace with 1 chart
      3. Apply the indicator to it
      4. Examine the log for errors. (Or post the log, so we can see what is in it).
      Thx.

      Amongst many lines the log contains this line for the indicator:
      "CalculateValueAreaHistv2: 'Ticksize' property can't be accessed from within 'Initialize' method"

      Btw, how would I do number 1) Clean out the log ?

      Many thx

      Comment


        #18
        dj22522, that TickSize property would now need to be accessed from the OnStartUp() method instead of in Initialize().
        AustinNinjaTrader Customer Service

        Comment


          #19
          Originally posted by dj22522 View Post
          Thx.

          Amongst many lines the log contains this line for the indicator:
          "CalculateValueAreaHistv2: 'Ticksize' property can't be accessed from within 'Initialize' method"

          Btw, how would I do number 1) Clean out the log ?

          Many thx
          That error means that there is something being done in the Initialize() method that may have worked in NT6.5, but does not work in NT7, one of the reasons why NT Support warns us about using undocumented features. I may be able to take a quick look after the market closes, but cannot examine code at this time.

          You clean the log by refreshing it.
          1. Close NinjaTrader.
          2. Go to the log folder under the user directory.
          3. Rename the log file that has a name that includes today's date.
          4. Restart NinjaTrader, and a new log will be created.

          Comment


            #20
            Via Edit I see there is no section for OnStartUP()
            There are a few lines referring to TickSize in 'Initialize'.


            protected override void Initialize()
            {
            ChartOnly = true;
            Overlay = true;
            CalculateOnBarClose = true;
            PriceDigits = Math.Max(0,TickSize.ToString().Length-2);
            RecalculateColors();
            if(TickSize.ToString().Length<=2) FS="0";
            if(TickSize.ToString().Length==3) FS="0.0";
            if(TickSize.ToString().Length==4) FS="0.00";
            if(TickSize.ToString().Length==5) FS="0.000";
            if(TickSize.ToString().Length>=6) FS="0.0000";
            }
            Last edited by dj22522; 07-06-2011, 10:49 AM.

            Comment


              #21
              Originally posted by koganam View Post
              That error means that there is something being done in the Initialize() method that may have worked in NT6.5, but does not work in NT7, one of the reasons why NT Support warns us about using undocumented features. I may be able to take a quick look after the market closes, but cannot examine code at this time.

              You clean the log by refreshing it.
              1. Close NinjaTrader.
              2. Go to the log folder under the user directory.
              3. Rename the log file that has a name that includes today's date.
              4. Restart NinjaTrader, and a new log will be created.
              Thx, I've little experience with this so any help, as and when you're able would be great.
              And thx for the Clean Log instructions.

              Many thx

              PS: Apologies Davis72 for intruding, I just realized it's your thread rather than a overall thread for NT6.5 to Nt7 issues.
              Apologies

              .
              Last edited by dj22522; 07-06-2011, 11:22 AM.

              Comment


                #22
                This is a section that you'll have to add. If you need assistance with converting indicators, you can contact one of our 3rd party NinjaScript consultants - http://www.ninjatrader.com/partners#...pt-Consultants

                Code:
                Initialize()
                {
                  // stuff goes here
                }
                OnStartUp()
                {
                  // more stuff here
                }
                OnBarUpdate()
                {
                  // main stuff here
                }
                AustinNinjaTrader Customer Service

                Comment


                  #23
                  DJ, please take a look at how I created the OnStartUp() section and moved some code from Initialize() to OnStartUp(). I'm not sure exactly how this script is supposed to work, but it is plotting some bars now.
                  Attached Files
                  AustinNinjaTrader Customer Service

                  Comment


                    #24
                    Originally posted by NinjaTrader_Austin View Post
                    DJ, please take a look at how I created the OnStartUp() section and moved some code from Initialize() to OnStartUp(). I'm not sure exactly how this script is supposed to work, but it is plotting some bars now.
                    That's great. Many thx.
                    I will read and learn.
                    Yes it's a rolling histogram for user selectable period.
                    ie set to 15 minute the histogram will always be the data for the last 15 minutes rolling forward in real time.

                    Many thx.

                    PS: I asked initially in this dedicated thread.
                    Apologies to davis72, so please remove all post relating to this indi if it's better to do so and I'' upload the indi there?

                    thx again

                    Last edited by dj22522; 07-06-2011, 11:39 AM.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Barry Milan, Yesterday, 10:35 PM
                    7 responses
                    19 views
                    0 likes
                    Last Post NinjaTrader_Manfred  
                    Started by AttiM, 02-14-2024, 05:20 PM
                    10 responses
                    179 views
                    0 likes
                    Last Post jeronymite  
                    Started by ghoul, Today, 06:02 PM
                    0 responses
                    9 views
                    0 likes
                    Last Post ghoul
                    by ghoul
                     
                    Started by DanielSanMartin, Yesterday, 02:37 PM
                    2 responses
                    13 views
                    0 likes
                    Last Post DanielSanMartin  
                    Started by DJ888, 04-16-2024, 06:09 PM
                    4 responses
                    13 views
                    0 likes
                    Last Post DJ888
                    by DJ888
                     
                    Working...
                    X