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

  • NinjaTrader_PaulH
    replied
    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.

    Leave a comment:


  • Slide588
    replied
    "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

    Leave a comment:


  • tonynt
    replied
    Thank you!

    Leave a comment:


  • NinjaTrader_PaulH
    replied
    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

    Leave a comment:


  • tonynt
    replied
    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

    Leave a comment:


  • NinjaTrader_PaulH
    replied
    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.

    Leave a comment:


  • tonynt
    started a topic indicator on 2 panels

    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

Latest Posts

Collapse

Topics Statistics Last Post
Started by inanazsocial, Today, 01:15 AM
1 response
5 views
0 likes
Last Post NinjaTrader_Jason  
Started by rocketman7, Today, 02:12 AM
0 responses
10 views
0 likes
Last Post rocketman7  
Started by dustydbayer, Today, 01:59 AM
0 responses
1 view
0 likes
Last Post dustydbayer  
Started by trilliantrader, 04-18-2024, 08:16 AM
5 responses
23 views
0 likes
Last Post trilliantrader  
Started by Davidtowleii, Today, 12:15 AM
0 responses
3 views
0 likes
Last Post Davidtowleii  
Working...
X