Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 algospoke, Today, 06:40 PM
      0 responses
      10 views
      0 likes
      Last Post algospoke  
      Started by maybeimnotrader, Today, 05:46 PM
      0 responses
      8 views
      0 likes
      Last Post maybeimnotrader  
      Started by quantismo, Today, 05:13 PM
      0 responses
      7 views
      0 likes
      Last Post quantismo  
      Started by AttiM, 02-14-2024, 05:20 PM
      8 responses
      168 views
      0 likes
      Last Post jeronymite  
      Started by cre8able, Today, 04:22 PM
      0 responses
      10 views
      0 likes
      Last Post cre8able  
      Working...
      X