Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Arrows not showing on Indicator Panel

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

    Arrows not showing on Indicator Panel

    I am trying to draw Arrows on the Indicator Panel.
    DrawOnPricePanel= false; in the Initialize() method, and is never touched again. I am well aware of NT's problems with that function. This indicator writes to the indicator panel only. In addition to this section of code, lines & text are produced and they do appear correctly. The output window shows exactly where the cross-overs were detected and is correct.

    Unfortunately the Arrows NEVER show. I also tried Triangles -- they never plotted either.

    Code:
    tagX = "X"+CurrentBar.ToString(); 
                if ( wERG[0]<wHIST[0] && wERG[1]>wHIST[1] ) // Mark triangle up
                {
                    pX = wERG[0]-5;
                    DrawArrowUp(tagX, true, CurrentBar, pX, Color.Black); 
                    Print(header+" ERG fell over Hist  @ "+pX.ToString("###.##")+" on Bar "+CurrentBar+" at "+Time[0].ToString("MM/dd HH:mm:ss"));
                }
                else if ( wERG[0]>wHIST[0] && wERG[1]<wHIST[1] ) // Mark triangle down
                {
                    pX = wERG[0]+5;
                    DrawArrowDown(tagX, true, CurrentBar, pX, Color.Black); 
                    Print(header+" ERG rose over Hist @ "+pX.ToString("###.##")+" on Bar "+CurrentBar+" at "+Time[0].ToString("MM/dd HH:mm:ss"));
                }
    tagX is a string, p1 is a double, and the wERG & wHIST are DataSeries.

    So what's going on?

    #2
    It looks like your problem might be the way that you are calculating pX. How do you know that the arrow is not simply drawing too far away for you to see? As a first step, as I do not know how the function is calculated, or what its resultant values are, draw the arrow at what I presume is the crossover point. ie., try pX = wERG[0], and see if the arrow shows up. If it does, that validates my surmise.
    Last edited by koganam; 03-16-2011, 08:17 PM.

    Comment


      #3
      I did try that. No dice. No arrows either. Thank you, koganam, for the suggestion.

      And I verified that the histogram has a final trough well below the cross-over, the arrow would be on the chart. Scrunched it anyway just to make sure. I checked several locations far back on the chart (one advantage of printing a list).

      One thing I did not try was using the alternate draw expression (time vs bar) because bar is more direct, I thought. I am actually getting that desperate, but I still think NT has a problem.

      Comment


        #4
        You would need to change to bar you are drawing at to 0 instead of CurrentBar. This would cause your arrows to be drawn zero bars back. All of your arrows are now drawing at the first bar of your chart.

        Dan

        DrawArrowUp(tagX, true, 0, pX, Color.Black);
        eDanny
        NinjaTrader Ecosystem Vendor - Integrity Traders

        Comment


          #5
          Bingo! Thank you, edanny!

          such a rookie mistake...

          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
          330 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
          548 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