• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

AddRenko new brick

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

    AddRenko new brick

    Hello,

    I am figuring out how to know when a brick is closed when using AddRenko() in a ninja script strategy and if the value of the close is higher or lower than the previous brick. Can I use Close[0]?

    Can you provide some sample code?

    #2
    did you try https://ninjatraderecosystem.com/use...nko-bartype-8/ examples?

    Comment


      #3
      Hi guillembm, thanks for your post.

      If your script runs OnBarClose, you can detect BarsInProgress == 1 (assuming the Renko series is the only added series.) e.g.

      Code:
      OnBarUpdate()
      {
      
          if(BarsInProgress == 1)
          {
              if(Close[0] < Close[1]) Print("Close[0] < Close[1] " + Time[0]);
          }
      
      }
      Chris L.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Darringona, Today, 07:43 AM
      0 responses
      3 views
      0 likes
      Last Post Darringona  
      Started by simonkloot, Today, 07:28 AM
      0 responses
      6 views
      0 likes
      Last Post simonkloot  
      Started by marcus2300, Today, 06:24 AM
      0 responses
      4 views
      0 likes
      Last Post marcus2300  
      Started by Dhjesus, Today, 06:23 AM
      0 responses
      7 views
      0 likes
      Last Post Dhjesus
      by Dhjesus
       
      Started by embreyw, Today, 05:56 AM
      0 responses
      6 views
      0 likes
      Last Post embreyw
      by embreyw
       
      Working...
      X