• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 U0000999, Today, 05:44 AM
      1 response
      11 views
      0 likes
      Last Post NinjaTrader_ShawnB  
      Started by Teebone21, Today, 10:38 AM
      2 responses
      9 views
      0 likes
      Last Post Teebone21  
      Started by futurestrader7, Today, 11:31 AM
      0 responses
      3 views
      0 likes
      Last Post futurestrader7  
      Started by J_o_s, 03-30-2020, 12:29 AM
      2 responses
      16 views
      0 likes
      Last Post J_o_s
      by J_o_s
       
      Started by ptpatrader, Today, 10:27 AM
      2 responses
      7 views
      0 likes
      Last Post ptpatrader  
      Working...
      X