Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

plotting a histogram

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

    plotting a histogram

    Hi, in my indicator I plot a historgram. I need to set the values of prior bars on the historgram. I currently set the value of the current bar using 'set' .. how do I reference prior bars using 'set'? thanks

    #2
    Try:
    Set(1, myValue);//previous plot segment
    Set(2, myOtherValue);//Two bars back
    eDanny
    NinjaTrader Ecosystem Vendor - Integrity Traders

    Comment


      #3
      Hello FCatan,
      Code:
       
      [LEFT][FONT=Courier New][SIZE=2]MyValue[[/SIZE]Thank you for your post.
      eDanny has provided an excellent answer.
      I would like to expand on that and include that you could reference prior bars by also using 
      
      
      [FONT=Courier New][SIZE=2][COLOR=#800080]1[/SIZE][/FONT][FONT=Courier New][SIZE=2]] = Close[[/SIZE][/FONT] [FONT=Courier New][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]] - Open[[/SIZE][/FONT] [FONT=Courier New][SIZE=2][COLOR=#800080]3[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]];[/SIZE][/FONT]
      [FONT=Courier New]MyOtherValue[/FONT][FONT=Courier New][SIZE=2][[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080]2[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]] = Close[[/SIZE][/FONT] [FONT=Courier New][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]] - Open[[/SIZE][/FONT] [FONT=Courier New][SIZE=2][COLOR=#800080]3[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]];[/SIZE][/FONT][/LEFT]

      Also, this example is how this would be implemented using NT8.
      [/FONT][/COLOR]

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      596 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
      554 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X