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 judysamnt7, 03-13-2023, 09:11 AM
      4 responses
      59 views
      0 likes
      Last Post DynamicTest  
      Started by ScottWalsh, Today, 06:52 PM
      4 responses
      36 views
      0 likes
      Last Post ScottWalsh  
      Started by olisav57, Today, 07:39 PM
      0 responses
      7 views
      0 likes
      Last Post olisav57  
      Started by trilliantrader, Today, 03:01 PM
      2 responses
      21 views
      0 likes
      Last Post helpwanted  
      Started by cre8able, Today, 07:24 PM
      0 responses
      10 views
      0 likes
      Last Post cre8able  
      Working...
      X