Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Buy Sell Volume swap

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

    Buy Sell Volume swap

    Hello,

    I was wondering if anyone knows how to edit the code for the Buy Sell Volume indicator. I'm looking to make it so the buy/sell volume is visually swapped; showing the buy at the bottom and sell at the bottom. I've tried to edit the code around my self flipping any buy/sell lines, but no luck. Just preference if anyone can help, that'd be great.
    Thanks!

    #2
    Hello sylisk,

    Welcome to the NinjaTrader forums!

    Be sure to start by making a copy of the indicator first, and modify your own custom copy.

    The plots appear in the order AddPlot() is called.

    Change the order of the AddPlot calls in State.SetDefaults.

    Change the indexes of the plot series for the public variables that return the Values collections on lines 100 and 107.

    Then you will likely want to assign the Sells plot to buys plus sells in on lines 84 and 91, instead of the Buys plot on lines 85 and 92.


    I am also including a link to a forum post with helpful resources on getting started with C# and NinjaScript.
    https://ninjatrader.com/support/foru...pts#post786040
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Hello sylisk,

      Welcome to the NinjaTrader forums!

      Be sure to start by making a copy of the indicator first, and modify your own custom copy.

      The plots appear in the order AddPlot() is called.

      Change the order of the AddPlot calls in State.SetDefaults.

      Change the indexes of the plot series for the public variables that return the Values collections on lines 100 and 107.

      Then you will likely want to assign the Sells plot to buys to sells in on lines 84 and 91, instead of the Buys plot on lines 85 and 92.


      I am also including a link to a forum post with helpful resources on getting started with C# and NinjaScript.
      https://ninjatrader.com/support/foru...pts#post786040
      I probably messed up with the code, but my indicator is now only showing red volume bars.

      Attached I've highlighted what I edited in the code, if you can point me on what I need to fix. Thanks!

      Comment


        #4
        Hello sylisk,

        The original script adds the sells to the buys and assigns this to the Buys plot so that you can see it on top.

        In post # 2, I suggested that you add the buys and sells to the Sells so that you can see it. Have you done this?
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        563 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        329 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        547 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        548 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X