Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Counting Divergence lines

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

    Counting Divergence lines

    Hi I am trying to add a counter to a Fisher transform divergence indicator I have created that will count each time the divergence line is drawn with this indicator. I will paste the draw code that I'm using to draw the divergence line. If anyone knows a small piece of code that I can add that will make appear a ongoing tally in the lower right of the price panel of how many times this particular line has been drawn on the chart I would appreciate it.

    Code:
    Draw.Line(this, "high"+CurrentBar.ToString() + BarsAgo.ToString(), true, BarsAgo, High[BarsAgo] + (TickSize * MarkerDistanceFactor), A, 
    									High[A] + (TickSize * MarkerDistanceFactor), divergenceColor, divergenceDashStyle, divergenceLineWidth);
    Thanks
    Quantismo

    #2
    Hello Quantismo,

    You an increment an integer as a counter.

    Below is a link to a forum post that discusses this.


    You can use Draw.TextFixed() to put text in a corner of the chart.

    Below is a public link to the help guide.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks Ninja ChelseaB for the link but my little grey cells are were not able to draw from it how to get it done that way, I am now trying to use the candlestick pattern indicator as a reference as it has a similar counter showing in the price panel also to wrap my head around how to do this hopefully..

      Thanks Quantismo

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      574 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      332 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
      553 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