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

Drawing a line on the price pane from the indicator from the lower pane

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

    Drawing a line on the price pane from the indicator from the lower pane

    Hello All,

    How do i draw a line on the price pane,using a signal from the volume indicator fromthe lower pane?For e.g., the logic is,for the simplicity sake:

    if Volume[0] > Volume[1] ---> Draw a line on the Low[0],on the Price pane,with the 1 bar projection into the future.

    Thanks to all in advance!

    #2
    Originally posted by outsource View Post
    Hello All,

    How do i draw a line on the price pane,using a signal from the volume indicator fromthe lower pane?For e.g., the logic is,for the simplicity sake:

    if Volume[0] > Volume[1] ---> Draw a line on the Low[0],on the Price pane,with the 1 bar projection into the future.

    Thanks to all in advance!
    You just use DrawLine().

    Comment


      #3
      Originally posted by koganam View Post
      You just use DrawLine().
      Are you referring to some specific DrawLine() method.Simple DrawLine method i used doesn`t work.

      For e.g.,

      I use this method to draw a line in the price pane:

      DrawLine("low" + CurrentBar, true, 0, Low[0], - 1 Low[0], Color.Black, DashStyle.Solid, 2);

      I put this line in the Volume indicator - nothing showed up in the Price pane.
      Last edited by outsource; 05-30-2015, 03:20 PM.

      Comment


        #4
        Hello outsource,

        Thank you for your post.

        Are you checking for the CurrentBar? For example:
        Code:
        			if(CurrentBar <= 1)
        				return;
        			
        			if(Volume[0] > Volume[1])
        			{
        				DrawLine("tag", 0, Low[0], -1, Low[0], Color.Blue);
        			}

        Comment


          #5
          Originally posted by NinjaTrader_PatrickH View Post
          Hello outsource,

          Thank you for your post.

          Are you checking for the CurrentBar? For example:
          Code:
          			if(CurrentBar <= 1)
          				return;
          			
          			if(Volume[0] > Volume[1])
          			{
          				DrawLine("tag", 0, Low[0], -1, Low[0], Color.Blue);
          			}
          I tried but it doesn`t change a thing

          Comment


            #6
            Hello outsource,

            Thanks for your reply.

            Do you see any related errors listed in the "log" tab of the control center after you apply the indicator?

            I created a quick indicator to test your code and find that it does produce a line as expected (see attached). Note, I did modify the tag name so that we could see more than just the current line.
            Attached Files
            Paul H.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Paul View Post
              Hello outsource,

              Thanks for your reply.

              Do you see any related errors listed in the "log" tab of the control center after you apply the indicator?

              I created a quick indicator to test your code and find that it does produce a line as expected (see attached). Note, I did modify the tag name so that we could see more than just the current line.
              Hi ,Paul,

              no,no errors related in the log.It just paints nothing on the chart.May be due to the indicator architecture.NinjaTrader Dave has got the indicator i want this addition for.Maybe you can contact him sand see if you can add this feature.

              Comment


                #8
                Hello outsource,

                Thanks for your reply.

                As tested the code by itself is fine so the issue may reside elsewhere in the indicator. This is where you might start breaking down the code and using debug/Print statements to find the root issue.

                Neither Dave nor I know what indicator you are referring to.
                Paul H.NinjaTrader Customer Service

                Comment


                  #9
                  Originally posted by NinjaTrader_Paul View Post
                  Hello outsource,

                  Thanks for your reply.

                  As tested the code by itself is fine so the issue may reside elsewhere in the indicator. This is where you might start breaking down the code and using debug/Print statements to find the root issue.

                  Neither Dave nor I know what indicator you are referring to.
                  This Dave:



                  Maybe just you have contacted another Dave.The indicator is the Volume signals.

                  Comment


                    #10
                    Hello outsource,

                    Thank you for your response.

                    We will reference the thread when Dave returns. In the meantime, can you send the file over to us at platformsupport[at]ninjatrader[dot]com?

                    Comment


                      #11
                      Originally posted by NinjaTrader_PatrickH View Post
                      Hello outsource,

                      Thank you for your response.

                      We will reference the thread when Dave returns. In the meantime, can you send the file over to us at platformsupport[at]ninjatrader[dot]com?
                      Hi,Patrick,

                      Sent

                      Comment


                        #12
                        Hello outsource,

                        Thank you for your patience.

                        If you change DrawOnPricePanel to True it will place all draw objects on the price panel, this will result in irregular plots in the indicator you sent us.

                        Since the DrawLine() idea is actually quite simple and does not need the indicator you sent, you could just create a new indicator that draws on the price panel and then add that to the same chart. You will then have the line you need.

                        Comment


                          #13
                          Originally posted by NinjaTrader_PatrickH View Post
                          Hello outsource,

                          Thank you for your patience.

                          If you change DrawOnPricePanel to True it will place all draw objects on the price panel, this will result in irregular plots in the indicator you sent us.

                          Since the DrawLine() idea is actually quite simple and does not need the indicator you sent, you could just create a new indicator that draws on the price panel and then add that to the same chart. You will then have the line you need.
                          Yes,Thanks,Patrick.

                          The thing is,as you could see,the formula to draw a line a bit different then Volume[0] > Volume[1],to create a brand new indicator for that purpose.

                          Anyway,can you please do a little favour?Can you ask Paul to upload the indicator he`s created,but instead the line to draw a TrendChannel for that simple formula:

                          Volume[0] > Volume[1]

                          ?

                          The TrendChannel should start with the Bar[0] and connect High[-1](if the Close[0]>Open[0]) and Low[-1](if Close[0]<Open[0])

                          Comment


                            #14
                            Hello outsource,

                            Thank you for your response.

                            Can you provide the full condition or explain it further?

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by DayTradingDEMON, Today, 09:28 AM
                            1 response
                            10 views
                            0 likes
                            Last Post NinjaTrader_ChelseaB  
                            Started by cmtjoancolmenero, Yesterday, 03:58 PM
                            8 responses
                            31 views
                            0 likes
                            Last Post NinjaTrader_ChelseaB  
                            Started by helpwanted, Today, 03:06 AM
                            2 responses
                            21 views
                            0 likes
                            Last Post NinjaTrader_LuisH  
                            Started by navyguy06, Today, 09:28 AM
                            0 responses
                            2 views
                            0 likes
                            Last Post navyguy06  
                            Started by rjbtrade1, 11-30-2023, 04:38 PM
                            2 responses
                            77 views
                            0 likes
                            Last Post DavidHP
                            by DavidHP
                             
                            Working...
                            X