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

PnF

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

    PnF

    Hi,
    I'm new to NT. I'm trying to code for the first time, hope to get some help as I'm starting out. I want to use point and figure in my setup.
    Can someone show me how to program these conditions using NinjaScript:

    condition 1: If 3 column ago (4th column including current column) - was the lowest column
    condition 2: Current box is 2 boxes higher than the high of the previous column ago
    condition 3: 2 column ago, it has at least 5 boxes of X

    Thanks!

    #2
    30percent, thanks for your post - you can normally access the PnF columns with the bar indices, so Close[3] would give you the closing value of the column 3 bars ago.

    We would normally not create custom code here, but I have forwarded your request to one of our NinjaScript trainees who will work this as an exercise - he'll repost with further details once done.

    Thanks,
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Hello 30percent,

      Thank you for your post.

      I am working on the custom code here for you.

      I did have a question relating to condition 1; do you want to know if 3 columns ago was the lowest for the session or the lowest of the last 3 columns and the current column?

      I look forward to assisting you further.

      Comment


        #4
        Hi Patrick,

        for condition 1, I would like to know if 3 columns ago, was the lowest of the session.

        Thank you!

        Comment


          #5
          Hello 30 Percent,

          Thank you for your patience.

          Condition 1: if (LowestBar(Low, Bars.BarsSinceSession) == Low[3])
          In the above condition we are asking if the Lowest bar of the session was 3 bars ago.
          For information on LowestBar please visit the following link: http://www.ninjatrader.com/support/h...?lowestbar.htm
          For information on Bars.BarsSinceSession please visit the following link: http://www.ninjatrader.com/support/h...ncesession.htm

          Condition 2: if (High[0] >= High[1] + (TickSize * 2))
          In the above condition we are asking if the High of the current bar is greater than or equal to the High of the previous bar plus the Tick Size (Box Size) times two.
          For information on TickSize please visit the following link: http://www.ninjatrader.com/support/h...l?ticksize.htm

          Condition 3: if (High[2] > High[3] && Close[2] >= (TickSize * 5))
          In the above condition we are asking if the High of 2 bars ago is greater than the high of three bars ago (indicating X boxes) and the close of 2 bars ago is greater than or equal to Tick Size (Box Size) times five.

          The above conditions assume that the Tick Size of the instrument is 2 (Box Size is determined in the Data Series window when selecting PointAndFigure as your Period Type and by default is 2 ticks for a box).
          To check the tick size of an instrument go to Tools > Instrument Manager > search for your instrument > check the Tick Size field.

          I look forward to assisting you further with your NinjaScript project.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by mgco4you, Today, 09:46 PM
          0 responses
          1 view
          0 likes
          Last Post mgco4you  
          Started by Rapine Heihei, Today, 08:19 PM
          1 response
          8 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by Rapine Heihei, Today, 08:25 PM
          0 responses
          6 views
          0 likes
          Last Post Rapine Heihei  
          Started by f.saeidi, Today, 08:01 PM
          1 response
          9 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by Rapine Heihei, Today, 07:51 PM
          0 responses
          8 views
          0 likes
          Last Post Rapine Heihei  
          Working...
          X