Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DrawOnPricePanel

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

    DrawOnPricePanel

    Working on what should be a simple add-on, but the output is not working as programmed. If you look at the photo, you will see the 'CrossAbove' is plotting on the indicator panel (as programmed), but the 'CrossBelow' will only post in the price panel (it is also suppose to be in the indicator panel). I have changed the syntax order...putting 'CrossBelow' on top (and on bottom); did a cut-and-paste, deleted the cut-and-paste, typed it in fresh, added it to different charts, but the 'CrossBelow' will not print on the indicator panel. Any suggestions?

    Thanks in advance!!!!

    if (CrossAbove(K, 35, 1))
    { DrawVerticalLine("CrossUp", 0, Color.Blue, DashStyle.DashDotDot,5);
    DrawOnPricePanel = false;
    }

    if (CrossBelow(K, 65, 1))
    { DrawVerticalLine("CrossDown", 0, Color.Black, DashStyle.DashDotDot,5);
    DrawOnPricePanel = false;
    }
    Attached Files
    Last edited by phoenix; 05-06-2010, 11:32 PM.

    #2
    Hi phoenix,

    In most cases DrawOnPricePanel = false; should be put in the Initialize(), unless you have a specific reason not to.

    Otherwise, put it before your Draw statement....

    if (CrossBelow(K, 65, 1))
    {
    DrawOnPricePanel = false;
    DrawVerticalLine("CrossDown", 0, Color.Black, DashStyle.DashDotDot,5);
    }

    More info at - http://www.ninjatrader-support.com/H...awPriceOnPanel
    TimNinjaTrader Customer Service

    Comment


      #3
      phoenix,

      Let us know if that works because I didn't think you could do that...and I thought I tested it at some point. Anyway, if you can that would be great to know!
      Last edited by mountainclimber; 05-07-2010, 10:01 AM.

      Comment


        #4
        Hey NT Tim,

        Thanks!!! That worked. I had formatted a couple of indicators with the 'DrawUp(Down)Arrow' function in it, to draw those on the indicator panel, I had to include the "DrawOnPricePanel = false;" as written below, and simply did the same with this.

        The only programming class I had was in college in 1984, and that was in Fortran. ;-)

        So, I am learning by trial and error here.

        Thanks for your help.

        phoenix

        Comment


          #5
          Hi phoenix,

          Great! Glad to hear you've got it up and running!

          Aww, Fortran, now that's old school!
          TimNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

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