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

Undocumented/Unsupported Ninja Tips and Tricks

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

    Originally posted by cassb View Post
    I want to have a 'dashboard' display on my chart panel 1 with some indicator info in it -- kind of like how the Data Box works, only fixed in the upper right of the chart.

    I am trying the "documented" features to do this without much success. I attached a screen shot of what I am looking for. But what I would like it to be able to change fonts and colors inside this 'box' in the upper right from my indicator code... which does not seem possible using this syntax:

    Code:
                #region Draw info panel
                string panelText = "|                   Test                       |" + "\n| ATR: value\n| EMA: value\n| Daily High: value\n| Etc...";
                DrawTextFixed("InfoPanel", panelText, TextPosition.TopRight,Color.Black, new Font("Ariel", 8, FontStyle.Regular), Color.Transparent, Color.LightGray, 10);
                #endregion
    Is there an undocumented way to place a dashboard panel like this onto a chart and be able to control how it looks with fonts, colors, formatting, etc?

    Thanks!
    Bryan
    Custom Plot using DrawString(). Look at the CustomPlotSample.cs file for ideas on how.

    Comment


      Thanks, Leroy. But what I am looking for is to be able to change individual text within this dashboard to different colors/fonts. Like, for example, if the ATR value exceeds a certain limit, I might want to change the value to red.

      So I think I really need some kind of graphics object that I can construct in the program and then display on the chart panel on each bar update. It's just that I believe this would be an undocumented thing and I don't have an example of something like this to look at and learn from.

      Thanks!
      Bryan
      cassb
      NinjaTrader Ecosystem Vendor - Logical Forex

      Comment


        Well....then you just look at those values and change the color when you draw it.

        Changing individual parts of that dashboard with the single DrawTextFixed is not possible...you'd have to do something like that with individual lines and know where you are drawing.....You'd have to override the Plot method where you can get the graphics object.

        Drawing text is easy...but getting the coordinates right is something you are going to have to work at if you haven't much experience with Windows programming.

        Leroy

        Comment


          Options order

          Hey guys, just wondering if anyone has tried something like this. I need to sign onto IB and submit an options order from inside NT C#, has anyone tried this? NT does not support options orders.

          Comment


            Changing the X Axis width...

            I need to expand the width of the X Axis. Can anyone suggest how this might be done?

            Comment


              Are you asking you to make the bars bigger? Smaller? You want to see more bars or less bars or something else entirely?

              Comment


                I'm painting my own bars, basically rectangles with information. Similar to volume footprint bars. In order for them to space correctly, the X Axis, it seems, needs to be wider so my rectangles when painted don't display on top of each other. Hope that helps.

                Comment


                  Controlling manual order thru ATM Strategy

                  I would like to be able to manually place an order on the Super Dom with a selected ATM Strategy but then have an ATM script takeover to manage the stops and targets. I don't see anyway with the ATM Strategy methods to get the order ID and or Strategy ID to take control of these.

                  Does anyone know of an unsupported way around this.

                  Thanks for any input.

                  Jerry

                  Comment


                    Connecting to SQL or other database

                    I'm looking to have an NT7 strategy read parameter values from either a MySQL or PostgresSQL database. Also, I may want to write values from NT7 to a database at some point.

                    Questions:
                    Is there anything in NT7 that will prevent or cause problems with a strategy reading/writing to a database?

                    Are there any known instances of NT users deploying databases to read/write values?

                    Comment


                      Hello, how to access programmatically to initial colors of the DataSeries ?

                      That is to say, I don't waynt to repaint bars using CandleOutlineColor or BarColor, I just want to retrieve the colors set from the DataSeries field of the chart as shown here on my screenshot.

                      Click image for larger version

Name:	initial colors from dataseries.jpg
Views:	1
Size:	130.1 KB
ID:	900251

                      Thanks for your help

                      Comment


                        Originally posted by rouckya View Post
                        Hello, how to access programmatically to initial colors of the DataSeries ?

                        That is to say, I don't waynt to repaint bars using CandleOutlineColor or BarColor, I just want to retrieve the colors set from the DataSeries field of the chart as shown here on my screenshot.

                        [ATTACH]25808[/ATTACH]

                        Thanks for your help
                        Answered that one here.

                        ref: http://www.ninjatrader.com/support/f...hybrid&t=39499

                        Remember: no official NT support for ChartControl matters.

                        Comment


                          Originally posted by r2kTrader View Post
                          Have you ever wanted to load a workspace from within a strategy or when you start a certain strategy? Now you can. Just drop this line in your initialize() and change to your liking.

                          NinjaTrader.Gui.WorkspaceOptions.SwitchWorkspace("D:\\Documents and Settings\\User\\My Documents\\NinjaTrader 6.5\\workspaces\\123.xml", true);

                          If anyone is interested, you can use a similar technique to "auto-save" your workspace throughout the day.
                          From an indicator running on a chart in a particular workspace, is there any way to detect which workspace the chart/indicator is running in?

                          Comment


                            undocumented serialization

                            Hi,

                            I would like the user of my indicator to choose a set of indicator input series. Something like what you have for each indicator / parameters / data / input series.

                            I believe this is a serialization problem.And ninja support team already answered it cannot help.

                            I do something like:

                            private IndicatorBase inputIndicator1;
                            ..

                            [XmlIgnore()]
                            [Description("Indicator 1 input data")]
                            [Category("Parameters")]
                            [Gui.Design.DisplayName("Indicator 1")]
                            public NinjaTrader.Indicator.IndicatorBase InputIndicator1 {
                            get { return inputIndicator1; }
                            set { inputIndicator1 = value; }
                            }

                            and this is where I need to add the serialization of the input. But it seem to be undocumented.

                            Any idea ?

                            Thank you

                            W.

                            Comment


                              Originally posted by liberty4all View Post
                              NinjaTrader.Gui.WorkspaceOptions.SwitchWorkspace(" D:\\Documents and Settings\\User\\My Documents\\NinjaTrader 6.5\\workspaces\\123.xml", true);
                              Does anyone know a list of other classes such as this "WorkspaceOptions" ? I would love access to more!

                              Thank you,
                              Daniel

                              Comment


                                Originally posted by liberty4all View Post
                                From an indicator running on a chart in a particular workspace, is there any way to detect which workspace the chart/indicator is running in?
                                Nobody from NT ever replied to this. Is there some way to detect the workspace that a chart/indicator is in from C# code?

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by samish18, Yesterday, 10:13 AM
                                1 response
                                22 views
                                0 likes
                                Last Post NinjaTrader_Eduardo  
                                Started by Austiner87, Today, 05:02 PM
                                0 responses
                                5 views
                                0 likes
                                Last Post Austiner87  
                                Started by tonynt, 05-21-2019, 06:27 AM
                                10 responses
                                530 views
                                1 like
                                Last Post fiendtrades  
                                Started by awwenzovs, Today, 08:03 AM
                                2 responses
                                15 views
                                0 likes
                                Last Post NinjaTrader_Eduardo  
                                Started by Ashkam, 04-29-2024, 09:28 AM
                                4 responses
                                44 views
                                0 likes
                                Last Post Ashkam
                                by Ashkam
                                 
                                Working...
                                X