• 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

  • 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

  • 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:

Latest Posts

Collapse

Topics Statistics Last Post
Started by woodyfox, Yesterday, 08:33 PM
0 responses
2 views
0 likes
Last Post woodyfox  
Started by rblunsom, Yesterday, 11:19 AM
2 responses
26 views
0 likes
Last Post guidoisot  
Started by drewski1980, Yesterday, 02:38 PM
1 response
15 views
0 likes
Last Post NinjaTrader_ChrisL  
Started by jfep1977, Yesterday, 02:31 PM
2 responses
13 views
0 likes
Last Post jfep1977  
Started by dmking, Yesterday, 12:39 PM
6 responses
24 views
0 likes
Last Post dmking
by dmking
 
Working...
X