Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Point and Figure and NinjaScript

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

    #16
    Thanks for your response Josh.

    I can't get the two timeframes in sync with each other...wathever I try...
    But oke, I think I can create a workaround without using the Currentbar==0 timeframe form the chart...

    But I have my doubts if this should be the behavior of the charts...

    But to use the workaround Point C has to be solved! Because with an Open en Low not representing correct values (from my developer experiences I would say upfront without knowing anything that it could be a float datatype beeing used somewhere where it shouldn't be...)in the timeframe Currentbar ==1 makes it impossible to create a strategy for PnF charts! I think this one is a bug in NT?

    Comment


      #17
      johannes,

      Can you please attach your script used for point C? Thank you.
      Josh P.NinjaTrader Customer Service

      Comment


        #18
        Here it is, strategy is started at a 1 minute PnF chart with a 1 tick x 3 box reversal on the ES 06-10 (S&P500 future June).

        Thanks.
        Attached Files

        Comment


          #19
          I was staring at the data and the charts again and then I saw what was happening!

          BarsInProgress == 0, al data at this timeframe is correct, and it doesn't have to do anything with BarsRequired.

          It displays the close == high and open == low of the last Bar on the PnF chart with the time at which the last bar was created. And not the current time and current close! So it is impossible to see what the last tick quote is, and at which time this has happened! The same thing as discussed above at Point 3. So the behavior of this timeframe is correct. I am happy that the OnBarUpdate() event is called for each tick while you can't see the last close which is a pity!

          But the problems are with the BarsInProgress == 1 (where I constantly thought the problems where with BarsInProgress == 0 timeframe, my mistake!). The close in this timeframe gives the actual tick (on which value the last trade has been made). But what all other values mean? I have no idea!

          So the new question is, why does this line of code not work:
          Code:
          [FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]
          AddPointAndFigure(productToTrade, PeriodType.Minute, [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]1[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2], [/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]1[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2], [/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]3[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2], PointAndFigurePriceType.Close, MarketDataType.Last);
          [/SIZE][/FONT][/SIZE][/FONT]
          and why does it give rubbish data?

          Sorry for pointing in the wrong direction at first![/SIZE][/FONT]

          Comment


            #20
            johannes,

            Unfortunately I was unable to reproduce:

            Code:
            84    0    1192.25    1192.25    1193.75    1193.75    4/12/2010 8:39:00 AM
            84    1    1192.25    1192.25    1193.75    1193.75    4/12/2010 8:39:00 AM
            85    0    1194.5    1192.5    1194.5    1192.5    4/12/2010 9:08:00 AM
            85    1    1194.5    1192.5    1194.5    1192.5    4/12/2010 9:08:00 AM
            86    0    1192    1192    1194.25    1194.25    4/12/2010 9:31:00 AM
            86    1    1192    1192    1194.25    1194.25    4/12/2010 9:31:00 AM
            87    0    1194    1192.25    1194    1192.25    4/12/2010 9:53:00 AM
            87    1    1194    1192.25    1194    1192.25    4/12/2010 9:53:00 AM
            88    0    1193    1193    1193.75    1193.75    4/12/2010 9:57:00 AM
            88    1    1193    1193    1193.75    1193.75    4/12/2010 9:57:00 AM
            89    0    1194    1193.25    1194    1193.25    4/12/2010 10:04:00 AM
            89    1    1194    1193.25    1194    1193.25    4/12/2010 10:04:00 AM
            90    0    1193    1193    1193.75    1193.75    4/12/2010 10:36:00 AM
            90    1    1193    1193    1193.75    1193.75    4/12/2010 10:36:00 AM
            91    0    1193.75    1193.25    1193.75    1193.25    4/12/2010 10:46:00 AM
            91    1    1193.75    1193.25    1193.75    1193.25    4/12/2010 10:46:00 AM
            92    0    1193    1193    1193.5    1193.5    4/12/2010 10:52:00 AM
            92    1    1193    1193    1193.5    1193.5    4/12/2010 10:52:00 AM
            93    0    1195.75    1193.25    1195.75    1193.25    4/12/2010 11:20:00 AM
            93    1    1195.75    1193.25    1195.75    1193.25    4/12/2010 11:20:00 AM
            94    0    1194.5    1194.5    1195.5    1195.5    4/12/2010 11:31:00 AM
            94    1    1194.5    1194.5    1195.5    1195.5    4/12/2010 11:31:00 AM
            95    0    1195.25    1194.75    1195.25    1194.75    4/12/2010 11:34:00 AM
            95    1    1195.25    1194.75    1195.25    1194.75    4/12/2010 11:34:00 AM
            96    0    1194.5    1194.5    1195    1195    4/12/2010 11:45:00 AM
            96    1    1194.5    1194.5    1195    1195    4/12/2010 11:45:00 AM
            97    0    1195.25    1194.75    1195.25    1194.75    4/12/2010 11:53:00 AM
            97    1    1195.25    1194.75    1195.25    1194.75    4/12/2010 11:53:00 AM
            98    0    1193.25    1193.25    1194.5    1194.5    4/12/2010 11:59:00 AM
            98    1    1193.25    1193.25    1194.5    1194.5    4/12/2010 11:59:00 AM
            99    0    1194    1193.5    1194    1193.5    4/12/2010 12:07:00 PM
            99    1    1194    1193.5    1194    1193.5    4/12/2010 12:07:00 PM
            100    0    1193.25    1193.25    1193.75    1193.75    4/12/2010 12:20:00 PM
            100    1    1193.25    1193.25    1193.75    1193.75    4/12/2010 12:20:00 PM
            101    0    1194.75    1193.5    1194.75    1193.5    4/12/2010 12:34:00 PM
            101    1    1194.75    1193.5    1194.75    1193.5    4/12/2010 12:34:00 PM
            102    0    1193.25    1193.25    1194.5    1194.5    4/12/2010 12:42:00 PM
            102    1    1193.25    1193.25    1194.5    1194.5    4/12/2010 12:42:00 PM
            103    0    1194.75    1193.5    1194.75    1193.5    4/12/2010 12:59:00 PM
            103    1    1194.75    1193.5    1194.75    1193.5    4/12/2010 12:59:00 PM
            104    0    1193.5    1193.5    1194.5    1194.5    4/12/2010 1:05:00 PM
            104    1    1193.5    1193.5    1194.5    1194.5    4/12/2010 1:05:00 PM
            105    0    1194.75    1193.75    1194.75    1193.75    4/12/2010 1:07:00 PM
            105    1    1194.75    1193.75    1194.75    1193.75    4/12/2010 1:07:00 PM
            106    0    1192    1192    1194.5    1194.5    4/12/2010 1:24:00 PM
            106    1    1192    1192    1194.5    1194.5    4/12/2010 1:24:00 PM
            107    0    1193.25    1192.25    1193.25    1192.25    4/12/2010 1:38:00 PM
            107    1    1193.25    1192.25    1193.25    1192.25    4/12/2010 1:38:00 PM
            108    0    1191.5    1191.5    1193    1193    4/12/2010 1:46:00 PM
            108    1    1191.5    1191.5    1193    1193    4/12/2010 1:46:00 PM
            109    0    1193.25    1191.75    1193.25    1191.75    4/12/2010 2:01:00 PM
            109    1    1193.25    1191.75    1193.25    1191.75    4/12/2010 2:01:00 PM
            110    0    1191.75    1191.75    1193    1193    4/12/2010 2:12:00 PM
            110    1    1191.75    1191.75    1193    1193    4/12/2010 2:12:00 PM
            111    0    1192.75    1192    1192.75    1192    4/12/2010 2:15:00 PM
            111    1    1192.75    1192    1192.75    1192    4/12/2010 2:15:00 PM
            112    0    1189.75    1189.75    1192.25    1192.25    4/13/2010 7:37:00 AM
            112    1    1189.75    1189.75    1192.25    1192.25    4/13/2010 7:37:00 AM
            113    0    1192.25    1190    1192.25    1190    4/13/2010 7:51:00 AM
            113    1    1192.25    1190    1192.25    1190    4/13/2010 7:51:00 AM
            114    0    1190    1190    1192    1192    4/13/2010 8:03:00 AM
            114    1    1190    1190    1192    1192    4/13/2010 8:03:00 AM
            115    0    1191.25    1190.25    1191.25    1190.25    4/13/2010 8:16:00 AM
            115    1    1191.25    1190.25    1191.25    1190.25    4/13/2010 8:16:00 AM
            116    0    1187.25    1187.25    1191    1191    4/13/2010 8:26:00 AM
            116    1    1187.25    1187.25    1191    1191    4/13/2010 8:26:00 AM
            117    0    1187.75    1187.5    1188    1187.5    4/13/2010 8:29:00 AM
            117    1    1187.75    1187.5    1188    1187.5    4/13/2010 8:29:00 AM
            118    0    1185    1185    1187.5    1187.5    4/13/2010 8:38:00 AM
            118    1    1185    1185    1187.5    1187.5    4/13/2010 8:38:00 AM
            119    0    1187.75    1185.25    1187.75    1185.25    4/13/2010 8:55:00 AM
            119    1    1187.75    1185.25    1187.75    1185.25    4/13/2010 8:55:00 AM
            120    0    1187    1187    1187.5    1187.5    4/13/2010 9:03:00 AM
            120    1    1187    1187    1187.5    1187.5    4/13/2010 9:03:00 AM
            121    0    1188.25    1187.25    1188.25    1187.25    4/13/2010 9:07:00 AM
            121    1    1188.25    1187.25    1188.25    1187.25    4/13/2010 9:07:00 AM
            122    0    1187    1187    1188    1188    4/13/2010 9:12:00 AM
            122    1    1187    1187    1188    1188    4/13/2010 9:12:00 AM
            123    0    1188.75    1187.25    1188.75    1187.25    4/13/2010 9:22:00 AM
            123    1    1188.75    1187.25    1188.75    1187.25    4/13/2010 9:22:00 AM
            124    0    1188    1188    1188.5    1188.5    4/13/2010 9:25:00 AM
            124    1    1188    1188    1188.5    1188.5    4/13/2010 9:25:00 AM
            125    0    1188.75    1188.25    1188.75    1188.25    4/13/2010 9:33:00 AM
            125    1    1188.75    1188.25    1188.75    1188.25    4/13/2010 9:33:00 AM
            126    0    1188    1188    1188.5    1188.5    4/13/2010 9:39:00 AM
            126    1    1188    1188    1188.5    1188.5    4/13/2010 9:39:00 AM
            127    0    1188.5    1188.25    1188.75    1188.25    4/13/2010 9:46:00 AM
            127    1    1188.5    1188.25    1188.75    1188.25    4/13/2010 9:46:00 AM
            128    0    1187.5    1187.5    1188.25    1188.25    4/13/2010 9:54:00 AM
            128    1    1187.5    1187.5    1188.25    1188.25    4/13/2010 9:54:00 AM
            129    0    1188.5    1187.75    1188.5    1187.75    4/13/2010 9:59:00 AM
            129    1    1188.5    1187.75    1188.5    1187.75    4/13/2010 9:59:00 AM
            130    0    1187.75    1187.75    1188.25    1188.25    4/13/2010 10:09:00 AM
            130    1    1187.75    1187.75    1188.25    1188.25    4/13/2010 10:09:00 AM
            131    0    1190.75    1188    1190.75    1188    4/13/2010 10:20:00 AM
            131    1    1190.75    1188    1190.75    1188    4/13/2010 10:20:00 AM
            132    0    1190    1190    1190.5    1190.5    4/13/2010 10:22:00 AM
            132    1    1190    1190    1190.5    1190.5    4/13/2010 10:22:00 AM
            133    0    1190.75    1190.25    1190.75    1190.25    4/13/2010 10:27:00 AM
            133    1    1190.75    1190.25    1190.75    1190.25    4/13/2010 10:27:00 AM
            134    0    1189.75    1189.75    1190.5    1190.5    4/13/2010 10:39:00 AM
            134    1    1189.75    1189.75    1190.5    1190.5    4/13/2010 10:39:00 AM
            135    0    1191.75    1190    1191.75    1190    4/13/2010 11:12:00 AM
            135    1    1191.75    1190    1191.75    1190    4/13/2010 11:12:00 AM
            136    0    1190.75    1190.75    1191.5    1191.5    4/13/2010 11:19:00 AM
            136    1    1190.75    1190.75    1191.5    1191.5    4/13/2010 11:19:00 AM
            137    0    1192.5    1191    1192.5    1191    4/13/2010 11:42:00 AM
            137    1    1192.5    1191    1192.5    1191    4/13/2010 11:42:00 AM
            138    0    1191.75    1191.75    1192.25    1192.25    4/13/2010 11:47:00 AM
            138    1    1191.75    1191.75    1192.25    1192.25    4/13/2010 11:47:00 AM
            139    0    1193.5    1192    1193.5    1192    4/13/2010 11:57:00 AM
            139    1    1193.5    1192    1193.5    1192    4/13/2010 11:57:00 AM
            140    0    1192.75    1192.75    1193.25    1193.25    4/13/2010 11:58:00 AM
            140    1    1192.75    1192.75    1193.25    1193.25    4/13/2010 11:58:00 AM
            141    0    1193.25    1193    1193.5    1193    4/13/2010 12:02:00 PM
            141    1    1193.25    1193    1193.5    1193    4/13/2010 12:02:00 PM
            142    0    1192    1192    1193    1193    4/13/2010 12:12:00 PM
            142    1    1192    1192    1193    1193    4/13/2010 12:12:00 PM
            143    0    1193    1192.25    1193    1192.25    4/13/2010 12:23:00 PM
            143    1    1193    1192.25    1193    1192.25    4/13/2010 12:23:00 PM
            144    0    1192    1192    1192.75    1192.75    4/13/2010 12:30:00 PM
            144    1    1192    1192    1192.75    1192.75    4/13/2010 12:30:00 PM
            145    0    1192.75    1192.25    1192.75    1192.25    4/13/2010 12:36:00 PM
            145    1    1192.75    1192.25    1192.75    1192.25    4/13/2010 12:36:00 PM
            146    0    1192    1192    1192.5    1192.5    4/13/2010 12:45:00 PM
            146    1    1192    1192    1192.5    1192.5    4/13/2010 12:45:00 PM
            147    0    1193.5    1192.25    1193.5    1192.25    4/13/2010 12:56:00 PM
            147    1    1193.5    1192.25    1193.5    1192.25    4/13/2010 12:56:00 PM
            148    0    1192.25    1192.25    1193.25    1193.25    4/13/2010 12:59:00 PM
            148    1    1192.25    1192.25    1193.25    1193.25    4/13/2010 12:59:00 PM
            Perhaps you could try clearing your data cache and get freshly generated charts to see if it makes a difference.

            As an aside, it may be easier for you to use "\t" instead of "____" to try and space your different columns out.

            Edit: Did not see your latest post till now. Will amend post if necessary after additional testing.
            Josh P.NinjaTrader Customer Service

            Comment


              #21
              johannes,

              After reviewing your latest post and running your strategy again I get this:
              Code:
              139    0    True    1193.5    1192    1193.5    1192    4/13/2010 11:57:00 AM
              139    1    True    1193.5    1192    1193.5    1192    4/13/2010 11:57:00 AM
              140    0    True    1192.75    1192.75    1193.25    1193.25    4/13/2010 11:58:00 AM
              140    1    True    1192.75    1192.75    1193.25    1193.25    4/13/2010 11:58:00 AM
              141    0    True    1193.25    1193    1193.5    1193    4/13/2010 12:02:00 PM
              141    1    True    1193.25    1193    1193.5    1193    4/13/2010 12:02:00 PM
              142    0    True    1192    1192    1193    1193    4/13/2010 12:12:00 PM
              142    1    True    1192    1192    1193    1193    4/13/2010 12:12:00 PM
              143    0    True    1193    1192.25    1193    1192.25    4/13/2010 12:23:00 PM
              143    1    True    1193    1192.25    1193    1192.25    4/13/2010 12:23:00 PM
              144    0    True    1192    1192    1192.75    1192.75    4/13/2010 12:30:00 PM
              144    1    True    1192    1192    1192.75    1192.75    4/13/2010 12:30:00 PM
              145    0    True    1192.75    1192.25    1192.75    1192.25    4/13/2010 12:36:00 PM
              145    1    True    1192.75    1192.25    1192.75    1192.25    4/13/2010 12:36:00 PM
              146    0    True    1192    1192    1192.5    1192.5    4/13/2010 12:45:00 PM
              146    1    True    1192    1192    1192.5    1192.5    4/13/2010 12:45:00 PM
              147    0    True    1193.5    1192.25    1193.5    1192.25    4/13/2010 12:56:00 PM
              147    1    True    1193.5    1192.25    1193.5    1192.25    4/13/2010 12:56:00 PM
              148    0    True    1192.25    1192.25    1193.25    1193.25    4/13/2010 12:59:00 PM
              148    1    True    1192.25    1192.25    1193.25    1193.25    4/13/2010 12:59:00 PM
              149    0    True    1195    1192.5    1195    1192.5    4/13/2010 1:20:00 PM
              149    1    True    1195    1192.5    1195    1192.5    4/13/2010 1:20:00 PM
              149    0    False    1195    1192.5    1195    1192.5    4/13/2010 1:20:00 PM
              149    1    False    1195    1192.5    1195    1192.5    4/13/2010 1:20:00 PM
              149    0    False    1195    1192.5    1195    1192.5    4/13/2010 1:20:00 PM
              149    1    False    1195    1192.5    1195    1192.5    4/13/2010 1:20:00 PM
              149    0    False    1195    1192.5    1195    1192.5    4/13/2010 1:20:00 PM
              149    1    False    1195    1192.5    1195    1192.5    4/13/2010 1:20:00 PM
              149    0    False    1195    1192.5    1195    1192.5    4/13/2010 1:20:00 PM
              149    1    False    1195    1192.5    1195    1192.5    4/13/2010 1:20:00 PM
              149    0    False    1195    1192.5    1195    1192.5    4/13/2010 1:20:00 PM
              149    1    False    1195    1192.5    1195    1192.5    4/13/2010 1:20:00 PM
              149    0    False    1195    1192.5    1195    1192.5    4/13/2010 1:20:00 PM
              149    1    False    1195    1192.5    1195    1192.5    4/13/2010 1:20:00 PM
              149    0    False    1195    1192.5    1195    1192.5    4/13/2010 1:20:00 PM
              149    1    False    1195    1192.5    1195    1192.5    4/13/2010 1:20:00 PM
              149    0    False    1195    1192.5    1195    1192.5    4/13/2010 1:20:00 PM
              149    1    False    1195    1192.5    1195    1192.5    4/13/2010 1:20:00 PM
              149    0    False    1195    1192.5    1195    1192.5    4/13/2010 1:20:00 PM
              149    1    False    1195    1192.5    1195    1192.5    4/13/2010 1:20:00 PM
              149    0    False    1195    1192.5    1195    1192.5    4/13/2010 1:20:00 PM
              149    1    False    1195    1192.5    1195    1192.5    4/13/2010 1:20:00 PM
              I added a column that prints true/false to signify when you are starting to process real-time data. Everything is identical regardless of BarsInProgress 0 or 1. I've attached the slightly modified strategy version here.
              Attached Files
              Josh P.NinjaTrader Customer Service

              Comment


                #22
                Thanks for your efforts Josh!

                You get very beautiful output!

                I removed everything in the map ninjatrader 7/db and that didn't make a difference!

                I was just planning to post it when I got with the restartup of NT after removing the database the message that NT beta 14 was around. So I installed that one after I still couldn't got those nice output. And updating to beta 14 solved the problem, finally I get also that nice output ...it was a long day but finally some results!!!

                Thanks for your help and responses!


                Other problem:

                Only while trying beta 14 I saw still some gaps and incorrect bars in the PnF chart. In the other PnF thread I already pointed to one of the problems. I saw in the release notes that not all problems where solved jet for the PnF charts so I don't know if you had notice of these bugs, but I will point them out again.
                See attachment:
                1) Gap, which can't exist in PnF charts, the downbar should start one box below the top of the green bar.
                2 & 3) On a 3box reversal you can never have bars of 2 box's

                Thanks again!
                Attached Files

                Comment


                  #23
                  johannes,

                  Those issues in the screenshot have not been addressed yet in B14. It is on our development's list though.
                  Josh P.NinjaTrader Customer Service

                  Comment


                    #24
                    Hi,

                    How can I disable the strategy buy and sell orders to be displayed on other charts then the chart where the strategy is applied to?

                    As you can see in the attachment, the chart is unusable now because of all trades being displayed. The trades where taken on a lower PnF reversal chart.

                    Thanks,
                    Johan
                    Attached Files

                    Comment


                      #25
                      johannes,

                      Please open up the Data Series window and select your series. On the right hand side scroll down and you should have an option to set the Plot executions to DoNotPlot.
                      Josh P.NinjaTrader Customer Service

                      Comment


                        #26
                        Thanks for your quick response and the solution Josh!

                        Comment

                        Latest Posts

                        Collapse

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