Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Newbie here - How do I start?

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

    Newbie here - How do I start?

    Hello,

    I want to write a script to automate my trade executions, very basic, basically go long or short a position at a particular ES-mini level I will be manually changing at EOD (for now).

    Where do I start? any documentation for something like a general SW architecture(detailing modules etc) to follow?

    #2
    Hello justinfo,

    Thanks for your post and welcome to the forums!

    The easiest way to get started to automate your strategy is with the Strategy Wizard on your Ninjatrader. With the wizard you can create simple to moderately complex strategies using an interface that creates the c# NinjaScript code for you. (If you want to create directly in code you can start with the wizard and it will create the structures needed and then you can unlock the code and edit it directly)

    The Ninjatrader helpguide offers tutorials to get you started with the process. Here is the main page to start at: http://www.ninjatrader.com/support/h...strategies.htm

    Here is a recording of our strategy training session (1 hour) that covers the strategy wizard: https://www.youtube.com/watch?v=Maaq...56536A44DD7105
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      I followed through the strategy wizard tutorial for MACross. When I run the backtest, I dont see any data, i.e. everything is blank. Are any of my settings wrong? I am using Kinetick end of day connection...

      Comment


        #4
        Hello justinfo,

        Thanks for your reply.

        With the Kinetic EOD connection all of your testing would need to be done with daily bars and higher. When you ran the analyzer did you select:
        1) Your strategy?
        2) A particular instrument to run on?
        3) "day" for the dataseries "type"?
        3) A from and to date?

        If you suspect your strategy is not functioning correctly, you can run the same test with the SampleMaCrossOver and you should see results. I would encourage you to do this first anyway so that you can can see something that is already tested and built. If you are not getting results with the sampleMACrossover then you may want to take a screenshot of the backtest parameters/settings for us to review.
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Thanks!! That fixed it! I was doing 5min on data series. Do any of the free data connections let me run the backtest for a 5min bar?

          Comment


            #6
            Hello justinfo,

            Thanks for your reply.

            You can use the Market Replay connection to test your strategy with any bar/chart type for most futures instruments. Note that this would not be strategy analyzer back test type data but would be more like live data in that you would have tick by tick replay of the data as needed.

            In your case market replay data would need to be downloaded first, then you would connect to the market replay connection.

            Here are two video links on the download and replay processes:
            http://www.ninjatrader.com/support/m...tUp/Set-Up.htm (Note: only need to view the downloading replay data section)
            Paul H.NinjaTrader Customer Service

            Comment


              #7
              Once I download the market replay day and connect, how can I run my strategy using this data?

              When I went back to the MACross strategy I pick the one day date range I recorded for the market replay and see nothing after backtest...

              Comment


                #8
                I shut off the strategy analyzer and went back to it and it works perfectly! Thanks for the help!

                I want to understand more about the bars are built and how the actual trade executions happen when I pick 1min vs 3min vs 5min. Can you point me to more videos targeting these topics?

                Comment


                  #9
                  Hello justinfo,

                  Thanks for your reply.

                  As I mentioned in my prior post the market replay data is not data that you can back test with. To test your strategy with Market replay, you have to connect to the market replay connection, then apply your strategy to the chart, then run the replay forward and you would see it execute as the data progresses. This is exactly what running a strategy on live data would look like except that you can run replay from 1x speed (same as was recorded at) upto 500x speed.

                  Here is a link to the helpguide section that covers running a strategy on the chart: http://www.ninjatrader.com/support/h...t_strategy.htm

                  If you wish to run backtests on intraday data then you would need to obtain intraday historical data either by subscribing to a datafeed or by purchasing historical data and importing it into Ninjatrader. Here is a link to the historical data manager: http://www.ninjatrader.com/support/h...ta_manager.htm
                  Paul H.NinjaTrader Customer Service

                  Comment


                    #10
                    This is helpful, I did not realize I have to run it on a chart.

                    What i ended up doing and it looks like it works is go to the control center and add the strategy to strategies and then opened strategy analyzer and ran the back test and its now executing as per the strategy.

                    I will redo it using the chart method..

                    Comment


                      #11
                      Backtest not working on my strategy

                      Trying to do backtest for first time..
                      When I run it on my strategy... I get no data. when I run it on the sample strategies, I get data.

                      All parameters appear to be the same. The backtester does execute and takes it time before it displays the summary data, but for whatever reason my strategy gets nothing back.

                      I have run my strategy in Replay mode and it works fine.

                      Comment


                        #12
                        Never mind... I figured it out... had to make sure the strategy used historical data.
                        if (historical) return; was in the code... Undoing this made it work.

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by helpwanted, Today, 03:06 AM
                        1 response
                        11 views
                        0 likes
                        Last Post sarafuenonly123  
                        Started by Brevo, Today, 01:45 AM
                        0 responses
                        9 views
                        0 likes
                        Last Post Brevo
                        by Brevo
                         
                        Started by aussugardefender, Today, 01:07 AM
                        0 responses
                        5 views
                        0 likes
                        Last Post aussugardefender  
                        Started by pvincent, 06-23-2022, 12:53 PM
                        14 responses
                        242 views
                        0 likes
                        Last Post Nyman
                        by Nyman
                         
                        Started by TraderG23, 12-08-2023, 07:56 AM
                        9 responses
                        387 views
                        1 like
                        Last Post Gavini
                        by Gavini
                         
                        Working...
                        X