Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BackColor in panel 2

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

    BackColor in panel 2

    Hi

    I want to set the backcolor in panel 2 based on difference between Volume[0] and Volume[1].

    The indicator does not work with the code:
    if ( Volume[0] < Volume[1] )....

    Do I need to refer to the volume array differently?...or collect the data in a different array?

    Thanks
    Last edited by ATI user; 08-31-2007, 06:23 AM.

    #2
    Likely two issues.

    1) Set DrawOnPricePanel = false in the Initialize() method. Additional information located here - http://www.ninjatrader-support.com/H...ceOnPanel.html

    2) Make sure you add as the first statement in OnBarUpdate()

    if (CurrentBar < 1)
    return;

    When you check Volume[1] on the first bar of a chart, 1 bar ago does not yet exist thus the indicator will not work.
    RayNinjaTrader Customer Service

    Comment


      #3
      Thanks Ray.

      Works perfectly.

      Just adding the second suggestion fixed problem.
      Last edited by ATI user; 08-31-2007, 08:22 PM.

      Comment


        #4
        Ray

        Now I want to DrawDot above the volume bar. Does not accept that for some reason. It drew the dot above the price bar until I put in your suggestion #1. Now no dot anywhere.

        Thanks

        Comment


          #5
          You have to do this by setting the indicator to the same panel as the Volume indicator when adding the indicator to a chart and setting in the indicator itself, set the DrawOnPricePanel property to false.

          RayNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          571 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          331 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
          549 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          549 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X