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 Option Whisperer, Today, 09:55 AM
      1 response
      11 views
      0 likes
      Last Post bltdavid  
      Started by port119, Today, 02:43 PM
      0 responses
      1 view
      0 likes
      Last Post port119
      by port119
       
      Started by Philippe56140, Today, 02:35 PM
      0 responses
      3 views
      0 likes
      Last Post Philippe56140  
      Started by 00nevest, Today, 02:27 PM
      0 responses
      2 views
      0 likes
      Last Post 00nevest  
      Started by Jonafare, 12-06-2012, 03:48 PM
      5 responses
      3,986 views
      0 likes
      Last Post rene69851  
      Working...
      X