Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DrawLine help needed

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

    DrawLine help needed

    I have attached a stripped down indicator that uses the DrawLine method
    to put up to 10 lines on the price chart. They are not showing up and I
    am not getting any error. I have a print statement to verify the logic is
    executing with values as expected.

    What I hope to see is that the lines are drawn for the bars on a given day
    and are left there. New bars, with new values, are then drawn as the bars
    for a new day unfold.
    I call DrawLine each bar with the same tag so I am expecting to
    alter the same line by extending it one more bar.

    I could use some more eyes to point out what I am doing wrong.

    Thanks in advance,
    Gary
    Attached Files

    #2
    Forgot to mention...

    I forgot to point out that the indictor code I attached normally reads data from a file but that was too much to upload, so I hard coded some data.
    The dummy data plots some lines for the ES on 2/14/2008.

    The lines should only be drawn for the bars on 2/14.

    Thanks again, to who ever has an idea

    Comment


      #3
      Figured it out.

      I was using CurrentBar for the endBarsAgo parameter. Instead it should
      have been set to 0 (for last bar on chart).

      Hope I didn't waste anybody's time

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      42 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      25 views
      0 likes
      Last Post PaulMohn  
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      162 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      98 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      157 views
      2 likes
      Last Post CaptainJack  
      Working...
      X