Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Lines will not plot

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

    Lines will not plot

    Hi, I was hoping someone could help me figure out what I am doing wrong? I'm trying to plot a line when there is a + or - Delta in the opposite direction of price movement.
    I used the buysell indicator and tried to modify it. Not much luck.
    If anybody can help, Thanks in advance!
    Attached Files

    #2
    Hello woodyfox,

    Thanks for your post.

    Not sure what you mean by not much luck. Do you have compile errors? Do you have run time errors (errors showing in the "log" tab of the control center). Does the indicator produce any on chart output? Can you post (attach) the entire source code file, not just a partial screenshot?

    Comment


      #3
      Paul, Thank you for responding so quickly. The indicator is just the NT BuySellVolume indicator with a few things changed. My code that I tried will not plot any chart output. I have attached the top part of the code. I can't fit the whole code on one screenshot. Thanks.
      Attached Files

      Comment


        #4
        Hello woodyfox,

        Thanks for your reply.

        Change the setting "DrawOnPricePanel" from true to false.

        If the indicator is not in error it has likely been plotting on the price panel but at the levels specified which are likely quite different from the price.

        Reference: http://ninjatrader.com/support/helpG...pricepanel.htm

        Comment


          #5
          Hi Paul, Wouldn't I want the "DrawOnPricePanel" to set to true if i am trying to plot lines at the high and low of a current Bar?

          Comment


            #6
            Hello woodyfox,

            Thanks for your reply.

            Yes, you are correct, I was looking at something else when replying, you do want DrawOnPricePanel = true; to draw your lines on the price panel.

            I will try to replicate what you are doing and update this thread when I have further information.

            Comment


              #7
              Cool. Thanks Paul.

              Comment


                #8
                Hello woodyfox,

                Thanks for your patience.

                Where the buys and sells are declared you should add the statement private Series<double> Delta;

                In the OnStateChange() method where it shows State == State.Historical change that to State == State.DataLoaded Below that, between the "{ }" add: Delta = new Series<double> (this);

                In the sections where you had if ((Values[0][1]...) change to if((Delta[1]...)

                Comment out or delete the lines for the #region Properties they are not needed, down to #endregion

                This will sound odd but on the OnStateChange(), set the BarsRequiredToPlot to a value of 2. This is to prevent an indexing error.

                For reference, please see: http://ninjatrader.com/support/helpG...s/?seriest.htm

                Comment


                  #9
                  Wow. Thanks Paul ! Did the Trick!

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  607 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  353 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  105 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  560 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  561 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X