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 Max238, Today, 01:28 AM
      1 response
      22 views
      0 likes
      Last Post CactusMan  
      Started by giulyko00, Yesterday, 12:03 PM
      2 responses
      10 views
      0 likes
      Last Post giulyko00  
      Started by r68cervera, Today, 05:29 AM
      0 responses
      4 views
      0 likes
      Last Post r68cervera  
      Started by geddyisodin, Today, 05:20 AM
      0 responses
      6 views
      0 likes
      Last Post geddyisodin  
      Started by JonesJoker, 04-22-2024, 12:23 PM
      6 responses
      38 views
      0 likes
      Last Post JonesJoker  
      Working...
      X