Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Change current bar color of a custom bar type

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

    #16
    Hello chris07,

    Thanks for your reply.

    Glad that is meeting your needs.

    When a script loads, it will process every bar starting with the very first historical bar and will go through them one at a time. Each bar will activate the OnBarClose() method and the script will color the bar transparent.

    As you only wanted the currently forming bar to be transparent I added the chack to see if it was real-time data (rather than coloring all the historical bars transparent and then recoloring them).

    So this means only the real-time bar gets set to transparent. Once that bar closes it gets recolored according to the relationship of Close to open price of the bar.
    Paul H.NinjaTrader Customer Service

    Comment


      #17
      Hello Paul,

      thanks a lot for your explanation, that makes sense. I would also like to extend my gratitude that you have helped getting the script to work. I am very happy it works,

      Best

      Chris

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by tkaboris, Today, 08:32 AM
      2 responses
      4 views
      0 likes
      Last Post tkaboris  
      Started by RaddiFX, Yesterday, 09:55 PM
      3 responses
      25 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by geotrades1, Today, 08:33 AM
      2 responses
      9 views
      0 likes
      Last Post geotrades1  
      Started by samish18, 04-17-2024, 08:57 AM
      23 responses
      110 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by Orion815, Today, 08:39 AM
      1 response
      4 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Working...
      X