Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Accessing Point and Figure data...

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

    Accessing Point and Figure data...

    How do you get the PnF boxsize, and reversal in NT8 NinjaScript? Before it was BarsPeriod.Value, and BarsPeriod.Value2. Those are returning the wrong value now.

    #2
    Hello,

    Can you please clarify what appears to be wrong with the values? Are they not updating at all? I am seeing the accurate Box size and Reversal size with the following Prints:

    Code:
                Print(BarsPeriod.Value);
                Print(BarsPeriod.Value2);
    Dave I.NinjaTrader Product Management

    Comment


      #3
      In my script (which is a DrawingTool, not an Indicator):

      Code:
      private BarsPeriod bp;
      In OnStateChange() I have:
      Code:
      bp = new BarsPeriod();
      in my OnMouseDown() I have
      Code:
      Print("boxSize: "+bp.Value+" -- reversal: "+bp.Value2);
      my ouput is:
      Code:
      boxSize: 1 -- reversal: 1
      My setttings are attached
      Attached Files
      Last edited by funk101; 10-09-2015, 11:09 AM.

      Comment


        #4
        I see now. What you are doing is instantiating a new BarsPeriod object, but you are not doing anything with the Box Size and Reversal values of that particular object. What you need is an instance of ChartControl related to the chart on which the object resides. An instance of ChartControl will have a BarsPeriod object attached to it which should carry the correct values, and you can just assign a reference to that existing BarsPeriod object to your bp object.

        For example, I was able to get this working in a modified version of the @Text drawing tool as follows:

        Code:
        		private void DrawText(ChartControl chartControl)
        		{
                             Print(chartControl.BarsPeriod.Value);
                             ....................
        Dave I.NinjaTrader Product Management

        Comment


          #5
          Sweet, thanks!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Segwin, 05-07-2018, 02:15 PM
          14 responses
          1,788 views
          0 likes
          Last Post aligator  
          Started by Jimmyk, 01-26-2018, 05:19 AM
          6 responses
          837 views
          0 likes
          Last Post emuns
          by emuns
           
          Started by jxs_xrj, 01-12-2020, 09:49 AM
          6 responses
          3,293 views
          1 like
          Last Post jgualdronc  
          Started by Touch-Ups, Today, 10:36 AM
          0 responses
          13 views
          0 likes
          Last Post Touch-Ups  
          Started by geddyisodin, 04-25-2024, 05:20 AM
          11 responses
          63 views
          0 likes
          Last Post halgo_boulder  
          Working...
          X