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

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 mattbsea, Today, 05:44 PM
          0 responses
          4 views
          0 likes
          Last Post mattbsea  
          Started by RideMe, 04-07-2024, 04:54 PM
          6 responses
          31 views
          0 likes
          Last Post RideMe
          by RideMe
           
          Started by tkaboris, Today, 05:13 PM
          0 responses
          2 views
          0 likes
          Last Post tkaboris  
          Started by GussJ, 03-04-2020, 03:11 PM
          16 responses
          3,282 views
          0 likes
          Last Post Leafcutter  
          Started by WHICKED, Today, 12:45 PM
          2 responses
          20 views
          0 likes
          Last Post WHICKED
          by WHICKED
           
          Working...
          X