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

indicator on 2 panels

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

    indicator on 2 panels

    Hello,

    I want to ask please how I can work with an indicatorr in NT7 that is plotting in price panel so that that when certain conditons are true it plots also bars and backcoloring in panel2 below price panel. Can´t find it in the help guide.

    Thank you!
    Tony

    #2
    Hello tonynt,

    Thanks for your post.

    Regarding, "an indicatorr in NT7 that is plotting in price panel so that that when certain conditons are true it plots also bars and backcoloring in panel2 below price panel.
    That would not be possible because indicators that plot in the price panel would not have an indicator panel assigned.

    You can have an indicator that is assigned to an indicator panel and it can draw objects on the price panel however its plot must be in the indicator panel. You cannot plot in more than one panel from one indicator.

    You may want to create two indicators to accomplish your goal.

    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Paul View Post
      Hello tonynt,

      Thanks for your post.

      Regarding, "an indicatorr in NT7 that is plotting in price panel so that that when certain conditons are true it plots also bars and backcoloring in panel2 below price panel.
      That would not be possible because indicators that plot in the price panel would not have an indicator panel assigned.

      You can have an indicator that is assigned to an indicator panel and it can draw objects on the price panel however its plot must be in the indicator panel. You cannot plot in more than one panel from one indicator.

      You may want to create two indicators to accomplish your goal.
      Hello,

      thank you for your reply. Then let me do another question please: when an indicator has to run COBC false but parts in the indicator in "{}" need to run COBCtrue, is this possible? It doesnt work with FirstTickOfBar as I tried already. This is to do the workaround for using 2nd panel with bars. The idea is - as it works with indicators basically running COBCtrue - when condition is true with close of bar then backcolor that bar. With COBCfalse and FistTickOfBar it plots always one bar later. Or how can it be plotting with COBCfalse and FirstTickOfBar the bar before?

      Thank you!
      Tony

      Comment


        #4
        Hello tonynt,

        Thanks for your reply.

        The reason that it would plot a bar after is because the FirstTickOfBar is a new bar. I am thinking you are using BackColor = some color which will color the background of the bar when it is told to and again as you are now in a new bar it will color that new bar.

        What you want here is to color the background of the "previous bar" which is the one just closed, to do that you would use a variation of the backcolor called BackColorSeries[] where you can use the index of [1]. For example:

        if (FirstTickOfBar && some conditions)
        {
        BackColorSeries[1] = Color.Pink; // color the just closed bar
        }

        Reference: https://ninjatrader.com/support/help...olorseries.htm

        Note: if you want to color all panels then use: https://ninjatrader.com/support/help...rallseries.htm

        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Thank you!

          Comment


            #6
            "You can have an indicator that is assigned to an indicator panel and it can draw objects on the price panel however its plot must be in the indicator panel."

            I'd like to have an indicator that plots in a panel then also, in the price panel, draws lines between the closes of certain bars along with printing text values based on that indicator's values. Could you please provide a code snippet to show me how to do this.

            Thanks

            Comment


              #7
              Hello Slide588,

              Thanks for your post.

              You wrote, "I'd like to have an indicator that plots in a panel then also, in the price panel," Just to be clear, plots can only be assigned to one panel.

              If you have an indicator that plots in an indicator panel then you can use the systems bool DrawOnPricePanel = true to have the draw objects (lines, text) on the price panel.

              Reference: https://ninjatrader.com/support/help...pricepanel.htm
              Last edited by NinjaTrader_PaulH; 04-28-2020, 08:02 AM. Reason: Changed the link from NT8 to NT7 help guide.
              Paul H.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by love2code2trade, 04-17-2024, 01:45 PM
              4 responses
              37 views
              0 likes
              Last Post love2code2trade  
              Started by alifarahani, Today, 09:40 AM
              2 responses
              13 views
              0 likes
              Last Post alifarahani  
              Started by junkone, Today, 11:37 AM
              3 responses
              16 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by pickmyonlineclass, Today, 12:23 PM
              0 responses
              3 views
              0 likes
              Last Post pickmyonlineclass  
              Started by frankthearm, Yesterday, 09:08 AM
              12 responses
              44 views
              0 likes
              Last Post NinjaTrader_Clayton  
              Working...
              X