• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

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 tramadolmedication, Today, 02:13 AM
0 responses
4 views
0 likes
Last Post tramadolmedication  
Started by tramadolmedication, Today, 02:07 AM
0 responses
4 views
0 likes
Last Post tramadolmedication  
Started by rampayanla, Today, 01:33 AM
0 responses
6 views
0 likes
Last Post rampayanla  
Started by rcsingleton, Today, 12:28 AM
0 responses
8 views
0 likes
Last Post rcsingleton  
Started by zergrush, Today, 12:17 AM
0 responses
5 views
0 likes
Last Post zergrush  
Working...
X