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

draw on multiple panels

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

    draw on multiple panels

    i have an indicator that plots in panel2. it requires horizontal lines to be drawn, so i have set
    Code:
    DrawOnPricePanel = false;
    lines draw fine (as do dots, diamonds, arrows, etc.) and i am able to change the backcolor of panel2 without issue.

    now for the questions:
    1. is it possible (from this indicator that plots on panel2 with DrawOnPricePanel set to false) to draw dots, diamonds, arrows, lines etc on panel1 (the price panel)? has anyone figured out how to make this work?

    2. is it possible to change the historgram bar-color and/or outline on panel2 using this singular plot? or do i need to use the NT65 trick of having two plots with different colors and only setting values for the appropriate condition?

    3. is it possible to change the backcolor of panel1 from this same indicator?

    using NT7 -- thanks in advance for any insights ;-)
    cheers,
    -e
    Last edited by e-man; 06-20-2010, 09:18 AM. Reason: forgot #3

    #2
    Hi e-man,

    1. Is unfortunately not really supported, however you can try switching the DrawOnPricePanel dynamically in your code.

    2. in NT7 you can achive this with on Plot using the PlotColors array - http://www.ninjatrader.com/support/h...plotcolors.htm

    3. this would be possible with using BackColorAll, however this is not directly limited to the Panel 1 backcolor only then.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      thanks, Ben -- i'll give those suggestions a try. never thought to dynamically toggle the DrawOnPricePanel -- nice idea.

      cheers,
      -e

      Comment


        #4
        I have an indicator using DrawOnPricePanel dynamically that works fine in v6.5, but does not work properly in NT 7. Bertrand, is that a NT 7 bug?

        Comment


          #5
          powermoney, welcome to our forums here - I need to check into this on my NT7 - however this was never a suppported workaround, so it could be 'broken' now.
          BertrandNinjaTrader Customer Service

          Comment


            #6
            it's not working for me either in NT7. is there a proper/supported way to do this in NT7?

            cheers,
            -e

            Comment


              #7
              e-man,

              You will not be able to try and separate out different objects to draw on different panels. It is an all or nothing affair for DrawOnPricePanel.
              Josh P.NinjaTrader Customer Service

              Comment


                #8
                So what is the workaround now ?
                I need to draw lines in NT7 both on the price channel and the indicator panel..

                Hope there is still hope :-)

                Wessel

                Comment


                  #9
                  You can always use just two indicators with different DrawOnPricePanel settings.
                  BertrandNinjaTrader Customer Service

                  Comment


                    #10
                    The ability to dynamically change DrawOnPricePanel is highly desired - I am requesting that the feature be added to NT 7. The use of two indicators to achive the same result seems cumbersome and inefficient.

                    Comment


                      #11
                      powermoney, thank you for the request. I will forward it along.
                      AustinNinjaTrader Customer Service

                      Comment


                        #12
                        Wessel,

                        i ended up doing what Bertrand suggested -- two indicators.

                        i would also appreciate the ability to dynamically toggle DrawOnPricePanel, should that feature be re-enabled in NT7.

                        cheers,
                        -e

                        Comment


                          #13
                          Originally posted by Wessel View Post
                          So what is the workaround now ?
                          I need to draw lines in NT7 both on the price channel and the indicator panel..

                          Hope there is still hope :-)

                          Wessel
                          Interesting. I'm running in the same problem with an custom indicator. Where can I find more about this workaround?

                          Dynamically changing the DrawOnPricePanel in an indicator doesn't seem to work. Well, in the way that I tried it at least. Perhaps there is an error in the following code for dynamically changing DrawOnPricePanel?
                          Code:
                          [COLOR=black][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]protected [/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][/COLOR][COLOR=black][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]override [/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][/COLOR][COLOR=black][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]void [/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]OnBarUpdate[/SIZE][/FONT][B][COLOR=black]()[/COLOR][/B]
                          [B][COLOR=black]{[/COLOR][/B]
                          [/SIZE][/FONT][/SIZE][/FONT][/COLOR][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][COLOR=black]DrawOnPricePanel=[/COLOR][/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][COLOR=black]true[/COLOR][/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][B][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][COLOR=black];[/COLOR][/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][/B][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]
                          [/SIZE][/FONT][/SIZE][/FONT][COLOR=black][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]if[/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][B][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2] ([/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][/B][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]CurrentBar<20[/SIZE][/FONT][B][COLOR=black])[/COLOR][/B]
                          [B][COLOR=black]{[/COLOR][/B]
                          [/SIZE][/FONT][/SIZE][/FONT][/COLOR][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][COLOR=black]return[/COLOR][/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][B][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][COLOR=black];[/COLOR][/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][/B][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]
                          [B][SIZE=2][FONT=Consolas][COLOR=black]}[/COLOR][/FONT][/SIZE][/B]
                          [/SIZE][/FONT][/SIZE][/FONT][COLOR=black][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]else[/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][/COLOR][COLOR=black][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]if[/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][B][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2] ([/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][/B][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]visualConfirm[/SIZE][/FONT][B][COLOR=black])[/COLOR][/B]
                          [B][COLOR=black]{[/COLOR][/B]
                          [COLOR=black]DrawOnPricePanel=[/COLOR][/SIZE][/FONT][/SIZE][/FONT][/COLOR][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][COLOR=black]false[/COLOR][/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][B][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][COLOR=black];[/COLOR][/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][/B][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]
                          [SIZE=2][FONT=Consolas][COLOR=black]DrawLine[B]([/B][/COLOR][/FONT][/SIZE][/SIZE][/FONT][/SIZE][/FONT][COLOR=black][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]"RSI signal line"[/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][B][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2], [/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][/B][/COLOR][COLOR=black][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]true[/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][B][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2], [/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][/B][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]20[B], [/B]manualRsiValue1[B], [/B]0[B], [/B]manualRsiValue1[B], [/B][/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][/COLOR][COLOR=black][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]Color[/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2].RoyalBlue[B], [/B][/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]DashStyle[/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][/COLOR][FONT=Consolas][SIZE=2][COLOR=#f3f3f3][FONT=Consolas][SIZE=2][COLOR=#f3f3f3][FONT=Consolas][SIZE=2][COLOR=#f3f3f3][COLOR=black].DashDot[B], [/B]1[/COLOR][B][COLOR=black]);[/COLOR][/B][/COLOR][/SIZE][/FONT][COLOR=#f3f3f3]
                          [B][SIZE=2][FONT=Consolas][COLOR=black]}[/COLOR][/FONT][/SIZE][/B]
                          [/COLOR][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT]
                          Any ideas?

                          Regards,

                          Comment


                            #14
                            afaik, there is no current work-around. this (unsupported) functionality works in 6.5 but is not present in 7.0.

                            guess you'll just have to add your name to the list of those requesting this be re-enabled.

                            cheers,
                            -e

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by TraderBCL, Today, 04:38 AM
                            2 responses
                            7 views
                            0 likes
                            Last Post TraderBCL  
                            Started by martin70, 03-24-2023, 04:58 AM
                            14 responses
                            105 views
                            0 likes
                            Last Post martin70  
                            Started by Radano, 06-10-2021, 01:40 AM
                            19 responses
                            606 views
                            0 likes
                            Last Post Radano
                            by Radano
                             
                            Started by KenneGaray, Today, 03:48 AM
                            0 responses
                            4 views
                            0 likes
                            Last Post KenneGaray  
                            Started by thanajo, 05-04-2021, 02:11 AM
                            4 responses
                            471 views
                            0 likes
                            Last Post tradingnasdaqprueba  
                            Working...
                            X