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 Segwin, 05-07-2018, 02:15 PM
          14 responses
          1,789 views
          0 likes
          Last Post aligator  
          Started by Jimmyk, 01-26-2018, 05:19 AM
          6 responses
          837 views
          0 likes
          Last Post emuns
          by emuns
           
          Started by jxs_xrj, 01-12-2020, 09:49 AM
          6 responses
          3,293 views
          1 like
          Last Post jgualdronc  
          Started by Touch-Ups, Today, 10:36 AM
          0 responses
          13 views
          0 likes
          Last Post Touch-Ups  
          Started by geddyisodin, 04-25-2024, 05:20 AM
          11 responses
          63 views
          0 likes
          Last Post halgo_boulder  
          Working...
          X