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 LawrenHom, Today, 10:45 PM
      0 responses
      3 views
      0 likes
      Last Post LawrenHom  
      Started by love2code2trade, Yesterday, 01:45 PM
      4 responses
      28 views
      0 likes
      Last Post love2code2trade  
      Started by funk10101, Today, 09:43 PM
      0 responses
      7 views
      0 likes
      Last Post funk10101  
      Started by pkefal, 04-11-2024, 07:39 AM
      11 responses
      37 views
      0 likes
      Last Post jeronymite  
      Started by bill2023, Yesterday, 08:51 AM
      8 responses
      44 views
      0 likes
      Last Post bill2023  
      Working...
      X