Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BarBrush on second data series

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

    BarBrush on second data series

    Hello,

    I have a strategy that trades two instruments (using AddDataSeries() for the 2nd one), this works well.


    When adding both the Master and 2nd instrument data series on the same chart, whether on the same panel or separate ones, the trade executions show up perfectly for both instruments. So far so good.

    What I haven't been able to figure out is how use BarBrush to impact the 2nd data series, I can only get it to work on the master instrument. Thought maybe using "BarsInProgress == 1" would allow me to address but it did not work.

    Is there a way to alter the properties of the 2nd data series on the chart?

    Thanks in advance.

    #2
    Hello DanPrado,

    Thanks for your post.

    A script can only perform Barbrush actions on the primary series (which would be the primary series of the chart).

    A script will only have knowledge of the primary series of the chart.


    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thanks for the quick reply.

      As an alternative maybe I could try painting a region that overlaps the candle color on the alternate series (when sharing the same chart panel)... thoughts on that, maybe you can point to an example? Or any other creative ideas?

      Appreciate your help!

      Comment


        #4
        Hello DanPrado,

        Thanks for your reply.

        You could try using BackBrushAll which would draw behind the bars on all panels,

        Reference: https://ninjatrader.com/support/help...ckbrushall.htm

        We can also leave this thread open for any forum member input who might have a creative solution.
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Good learning about BackBrushAll, although it won't help this specific requirement since the brush does not apply to both series.

          Related question: can a script draw / change properties on alternate panels? Meaning that if I place two data series in a chart, each on its own panel, can the script address the 2nd panel as well?

          Comment


            #6
            Hello DanPrado,

            "can a script draw / change properties on alternate panels? Meaning that if I place two data series in a chart, each on its own panel, can the script address the 2nd panel as well?" No, an indicator type script can add its own indicator panel and draw in that and a price panel but it could not draw in two price panels. A strategy can only draw in its primary price panel.
            Paul H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by toughiee, Today, 12:04 AM
            0 responses
            2 views
            0 likes
            Last Post toughiee  
            Started by vdoan20, Yesterday, 08:30 PM
            0 responses
            7 views
            0 likes
            Last Post vdoan20
            by vdoan20
             
            Started by gupagoer, Yesterday, 07:42 PM
            0 responses
            9 views
            0 likes
            Last Post gupagoer  
            Started by Holligoly, Yesterday, 05:13 PM
            2 responses
            11 views
            0 likes
            Last Post Holligoly  
            Started by Raginpower, Yesterday, 01:53 PM
            0 responses
            14 views
            0 likes
            Last Post Raginpower  
            Working...
            X