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

NT7 Bar Opacity

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

    NT7 Bar Opacity

    Can Someone point me to some NT7 Code that will allow me to set the Opacity of Bars
    in a MultiTimeFrame Series. i.e 1 opacity for Series 1 and a second opacity for Series 2.
    I have searched but what is getting confusing is the features that work in NT7 vs. NT8.
    When I search it seems everything comes up regardless of specifying NT7

    Thanks

    #2
    Hello JerryWar,

    Thank you for writing in.

    You would be unable to change the bar color or opacity of a different series on your chart. You would need to add the script to that specific series to change those items.

    To change the opacity of a bar, you can do the following in code:
    Code:
    // use the Color.FromArgb method; replace alpha with an alpha value and color with the color
    // BarColor = Color.FromArgb(alpha, color);
    
    // example to make blue bars with an alpha channel value of 50
    BarColor = Color.FromArgb(50, Color.Blue);
    More information about the Color.FromArgb() method can be found here: https://msdn.microsoft.com/en-us/lib...v=vs.110).aspx

    Please, let us know if we may be of further assistance.
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      Zachary
      Thanks that gets me part way there. But How/Where do I process the command for the BarColor especially for a 2nd and 3rd DataSeries.
      Example: Do I have to set the Barcolor for Each and Every Bar.
      as in

      if (BarsInProgress=2) BarColor =Color.FromArgb(50, Color.Blue);

      Or Is there a way to set the BarColor Once for a complete DataSeries Once in the Initialization etc ?

      Thanks
      Jerry

      Comment


        #4
        Hello JerryWar,

        You would be unable to change the bar color or opacity of a different series on your chart. You would need to add the script to that specific series to change those items.

        You would need to run an instance of your script on each data series that is on your chart. Ensure that you have set the script's input series in the Indicators/Strategies window to each series.
        Zachary G.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by cmtjoancolmenero, Yesterday, 03:58 PM
        11 responses
        39 views
        0 likes
        Last Post cmtjoancolmenero  
        Started by FrazMann, Today, 11:21 AM
        0 responses
        3 views
        0 likes
        Last Post FrazMann  
        Started by geddyisodin, Yesterday, 05:20 AM
        8 responses
        52 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by DayTradingDEMON, Today, 09:28 AM
        4 responses
        26 views
        0 likes
        Last Post DayTradingDEMON  
        Started by George21, Today, 10:07 AM
        1 response
        22 views
        0 likes
        Last Post NinjaTrader_ChristopherJ  
        Working...
        X