Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Data Box data

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

    #31
    Regarding your NinjaScript question, it looked like you were trying to build a NT7 Indicator?

    Whether this is NT7 or NT8, the screen you showed is for user input parameters that show up when you are in an indicator's properties screen in a chart.

    If you are using NT7, you will actually want to launch the strategy wizard to pull code from. You can do so by visiting the NT7 Control Center -> Tools -> New NinjaScript -> Strategy . This wizard is much more robust, and most of the code you generate can be used directly in an indicator. To view your Indicator's source, from the screen you showed me, simply click Next -> Next -> Next -> Finish.

    If, on the other hand, you would like to build an NT8 strategy, you can start a more robust Indicator wizard from the NT8 Control Center -> New -> NinjaScript Editor -> Right-click Indicators on the right -> New Indicator -> Give this indicator a unique name -> Next . From here, you can follow the wizard instructions here, http://ninjatrader.com/support/helpG...?ns_wizard.htm , using context sensitive help (select an element to learn about and press F1) as needed. We are happy to answer any questions specific to the wizard we can. You will also want to create a Strategy Builder by visiting New -> Strategy Builder . This will give you something to pull more complicated code samples from. You can view your indicator's source once you are done with the wizard by clicking "Generate".

    This is some advice I give people often that are new to NinjaScript.

    If you would like to take on learning NinjaScript, we have a fully documented help guide which will help you get started. You will find language references to all of the methods and functions you will be using. You will also see a tutorial section which will help you create your first indicator and get you started with some of these concepts.
    a link to our help guide can be found below: http://www.ninjatrader.com/support/h...?tutorials.htm


    I am also linking you to the educational resources section of the help guide to help you get started with NinjaScript:



    You will find reference samples online as well as some tips and tricks for both indicators and strategies:




    These samples can be downloaded, installed and modified from NinjaTrader and hopefully serve as a good base for your custom works.


    There is a also a growing library of user submitted custom indicators (100+) and strategies that can be downloaded from our support form. Please look in the NinjaScript file sharing section of our support forum as you may find what you are looking for there: http://www.ninjatrader.com/support/f...splay.php?f=37


    Finally, the following link is to our help guide with an alphabetical reference list to all supported methods, properties, and objects that are used in NinjaScript.

    Without coding, in the wizards (either the strategy wizard in NT7 or the strategy builder in NT8), on the Condition Builder page, you will see several time and price data items, and will have the ability to conditionally act at certain times of day and draw lines on charts.

    With regard to this,

    Originally posted by Dolfan View Post
    Just so I'm clear here, when you say "please create a new chart trading the same instruments you have been trading.", do you mean ALL of the charts that I have open or just the chart that I get my data from? If you mean ALL of my charts, will they need to have all of the indicators and lines as I draw them too? Thanks!

    Dolfan
    A single chart you were pulling data from will work. And thank you.
    Jessica P.NinjaTrader Customer Service

    Comment


      #32
      Thanks Jessica, very helpful indeed. I showed you a screen shot from the N7 Indicator builder but I would prefer to use N8 since that is where the charts I am using are at. I am having trouble with N8 strategy builder and Patrick is looking into that. I made a video for him yesterday that illustrates this problem. Suffice it to say that I am leery of that builder until I see that problem resolved. I have seen other bugs but have not brought them up yet.

      So, I will start this as a strategy and go from there, using N8. Will get back to you as it goes.

      Best regards,

      Dolfan

      Comment


        #33
        Jessica,

        Although your post was very helpful, I admit that I am still confused. Perhaps it is the change in options but I cannot figure out a starting point. Specifically, I need to draw a horizontal line that coincides with the settlement price of the day or closing price of the 1440 minute bar. It will need to begin and end at the vertical day or market session lines. I am growing fond of NT8 and would like to do this on NT8 charts. Can you be specific with the instructions or some helpful syntax? This is just a start as it will get more complicated moving forward. Thanks once again.

        Best regards,

        Dolfan

        Comment


          #34
          Hello Dolfan,

          Originally posted by Dolfan View Post
          I need to

          • draw a horizontal line
            • that coincides with the settlement price of the day
              or closing price of the 1440 minute bar
            • It will need to begin and end at the vertical day or market session lines
          • I am growing fond of NT8 and would like to do this on NT8 charts
          According to the NT8 help guide, the simplest overload for the DrawLine method is this :

          Originally posted by http://ninjatrader.com/support/helpGuides/nt8/en-us/draw_line.htm
          Draw.Line(NinjaScriptBaseowner,stringtag,intstartBarsAgo,doublestartY,intendBarsAgo,doubleendY,Brushbrush)
          Let's build off a simple case first : settlement price to settlement price
          • owner should be self
          • "lineNumber" + (CurrentBar - 1)
            for the tag
          • we start 2 bars ago
          • we start at yesterday's settlement price, which is Close[1]
          • we end 1 bar ago
          • we end again at yesterday's settlement price, which is Close[1]

          If we re-use a tag, we can modify a line. This is why I used CurrentBar - 1. Let's now draw a horizontal line over the current bar at the current closing price.

          • owner should be self
          • "lineNumber" + CurrentBar
            for the tag
          • we start 1 bars ago
          • we start at the current closing price, which is Close[0]
          • we end 0 bars ago, or on the current bar
          • we end again at the current closing price, which is Close[0]

          This way, when CurrentBar becomes CurrentBar - 1 (in other words, at the end of the day), the previous bar will automatically be updated to yesterday's settlement price.


          So putting all this together, we have



          Draw.Line(self, "lineNumber" + (CurrentBar - 1), 2, Close[1], 1, Close[1]);

          Draw.Line(self, "lineNumber" + CurrentBar, 1, Close[0], 0, Close[0]);

          Please let us know if there is any other way we can help.
          Jessica P.NinjaTrader Customer Service

          Comment


            #35
            I am going to have to study this for a while but to clarify my intent, the data will come from 1440 bars but my lines are drawn on 15 min charts. Not sure if this will be a strategy that draws lines or an indicator. If you have ever seen ApexInvesting Deviation level lines, what I hope to do is similar to that, but with my own formulas and price deviation levels. Theirs is an indicator. Essentially they draw a settlement line, then standard deviation levels at 0.5, 0.7, 1.0, 1.5, 2.0, & 3.0. Here is a snapshot view of Apex Deviation Levels on a 15 minute chart. . http://screencast.com/t/zi0E69Wcul

            Mine of course would look different but you get the picture.

            Dolfan

            Comment


              #36
              Hello Dolfan,

              Draw.Line has another overload, which looks like this :

              Draw.Line(NinjaScriptBaseowner,stringtag,boolisAutoScale,DateTimestartTime,doublestartY,DateTimeendTime,doubleendY,Brushbrush,DashStyleHelperdashStyle,intwidth)

              Emphasis mine. Members of the Times series are DateTime objects. So if your 15 minute bars, say, are sync'ed to Times[2] (and Closes[2] etc) , then this call

              Draw.Line(self, "lineNumber" + (CurrentBar - 1), 2, Close[1], 1, Close[1], Brushes.LimeGreen);

              would become

              Draw.Line(this, "newLine" + CurrentBar, true, Times[2][2], Closes[2][1], Times[2][1], Closes[2][1], Brushes.LimeGreen, DashStyleHelper.Dot, 2);

              I am including a link to the help guide section on working with multiple time series. Please let us know if there are any other ways we can help.

              Jessica P.NinjaTrader Customer Service

              Comment


                #37
                Where is 6/23 and 6/24

                Updating my charts this morning and I see that on the 1440 min chart there are no bars for 6/23 & 6/24 for several instruments including GC, ES, YM, NG, NQ. Any ideas why?

                Dolfan

                Comment


                  #38
                  Hello Dolfan, and thank you for your question.

                  I investigated one of those instruments, the E-Mini S&P, by selecting Tools -> Instrument Manager -> Searched for ES and selected it -> Edit . I saw that this instrument trades on the CME US Index Futures ETH exchange. Next, visiting Tools -> Session Manager , I was able to determine that this session template filters out data outside of a Monday through Friday range.

                  Please let us know if there is any other way we can help.
                  Jessica P.NinjaTrader Customer Service

                  Comment


                    #39
                    How does that apply? June 23 and June 24 were Thursday and Friday from last week.

                    Dolfan

                    Comment


                      #40
                      Hello Dolfan,


                      Sorry, I missed the specific dates. I tried this on my system and there were indeed different dates left out. I think there may be something we will need to investigate on your system. Would it be possible to arrange a support call for you? Could you e-mail the following to platformsupport[at]ninjatrader[dot]com , with this unique ID in the body of the e-mail?


                      1520420
                      • A phone number where you can be reached
                      • A time window where I can call you (please include a time zone) our regular support hours are 8:30am to 6pm US Eastern, Monday through Friday.
                      • Shortly before our call, please launch our remote support application. There are 2 ways you can do this.


                      I look forward to being of further assistance.
                      Jessica P.NinjaTrader Customer Service

                      Comment


                        #41
                        I would be happy to take a support call from Ninja but there will be no remote accessing my system. I strictly prohibit this. Please let me know if you can still make a call. Thanks!

                        Dolfan

                        Comment


                          #42
                          That won't be necessary. Instead, please send me your log and trace files, templates, and other files, so that I may look into what occurred.
                          You can do this by going to the Control Center-> Help-> Email Support.
                          Please reference the following ticket number in the body of the email:
                          1520420
                          Please also tick all the boxes in the "Other Files" section.
                          Jessica P.NinjaTrader Customer Service

                          Comment


                            #43
                            OK, will do. I have another question which I am not sure if it is related to a problem that you suspect and if it can also be discovered in the log/trace files. This morning a placed an order in a SIM account for 10 contracts in NG with an automated strategy that has a 5 tick trailing stop. It seems to me that it slipped as much or about 20 ticks before the stop kicked in. Seems like an awful lot of slippage to me.

                            I am running NT8 for these exercises and I like the fact that NT8 allows me to open multiple SIM accounts for alternative testing. I have looked hard in NT7 for that capability. Is it there and I have missed it or is it not capable?

                            Best regards,

                            Dolfan

                            Comment


                              #44
                              Won't work Jessica. Attempting to send files caused NT8 to freeze up. I waited 20 minutes for it to send but I ended up having to force quit the app through Task Manager. Send me a list if the files you need and where to get them and I will download them and send from another computer. Best regards,

                              Dolfan

                              Comment


                                #45
                                Hello Dolfan,

                                As there are a great deal of things which can cause the behavior you saw, my intention in capturing this data was so that I could run through several scenarios without frequently asking for more information. I am not sure which files of yours I would need to diagnose why the 23rd and 24th are not showing up for you.

                                However, I am happy to help here in the support forums. Since this issue differs significantly from the original thread topic, to make things easier for others searching through these forums, would it be possible to start a new forums thread for this topic? You can make sure I am flagged to the thread by placing "Attn : NinjaTrader_JessicaP" in the body of your first post.

                                One question I would like to ask, are Saturday and Sunday being excluded for you as well, or do these have data?

                                One thing you can try on your end, is shutting down NinjaTrader, deleting the contents of your (My) Documents\NinjaTrader 8\db\cache folder, and reloading all historical data on all of your charts once more.

                                To your other questions,

                                If your strategies have too much slippage, your first order of business should be to contact the emergency trade desk,



                                Once you have done so, please ensure in your strategy that you are using Stop Market instead of Stop Limit orders if you experience this kind of slippage. Stop Market orders can fill more quickly, since traders can fill immediately at the best available price. In addition, many exchanges have a built-in limit protection called a "no bust range". You will need to research what this range is for your instrument, but many exchanges have rules for this that are superior to one direction limit protections. Finally, with some instruments and exchanges, Stop Limit orders are silently converted to Stop Market orders anyway at the trade desk. In brief, Stop Market orders are faster and, ironically, more predictable in some situations.

                                In NT7, if you visit the NT7 Control Panel -> Tools -> Options -> Simulator -> Accounts, you will be brought to a screen where you can create new accounts by typing in an account name and clicking save and then close, and then OK in the options screen.
                                Last edited by NinjaTrader_JessicaP; 06-30-2016, 12:11 PM.
                                Jessica P.NinjaTrader Customer Service

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                                0 responses
                                673 views
                                0 likes
                                Last Post Geovanny Suaza  
                                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                                0 responses
                                379 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by Mindset, 02-09-2026, 11:44 AM
                                0 responses
                                111 views
                                0 likes
                                Last Post Mindset
                                by Mindset
                                 
                                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                                0 responses
                                577 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by RFrosty, 01-28-2026, 06:49 PM
                                0 responses
                                582 views
                                1 like
                                Last Post RFrosty
                                by RFrosty
                                 
                                Working...
                                X