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 SalmaTrader, 07-07-2026, 10:26 PM
      0 responses
      22 views
      0 likes
      Last Post SalmaTrader  
      Started by CarlTrading, 07-05-2026, 01:16 PM
      0 responses
      12 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 06-17-2026, 10:32 AM
      0 responses
      8 views
      0 likes
      Last Post CaptainJack  
      Started by kinfxhk, 06-17-2026, 04:15 AM
      0 responses
      10 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 06-17-2026, 04:06 AM
      0 responses
      16 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Working...
      X