Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Sim to setup Automated Trading.

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

    Sim to setup Automated Trading.

    Hi Guys,

    Windoze7 64bit, NinjaTrader 32bit v7...11, eSignal feed, IB broker.

    In Control Center I insert a New Strategy on a Market (to me it is an Market-System-Parameter set "MSP")

    The Algo (let's call it "Dave") behind the MSP requires 225 days (Min. Bars Required) before it generates a signal. Also, Dave is only in the market 10-20 days a year (per instrument).

    The default "Days to load" for Strategies in the "Strategies" tab is 365, which is a bit light so I suggested it load 3,650 days as I have decades of history (back to 1991).

    So, my Strategy is Dave, my Market is MSFT and Parameters... well who cares...

    Then I click the right-mouse button and choose "Strategy Performance >> Historical" and I see "Performance" depicting a start date of 26-01-2012 and an end date of 25-01-2013 and no trades and wonder what happened to my request for 3,650 days of data??? What am I suppose to do if I'm running a 400 day average? Can't even run Automated Trading in that scenario?

    I understand Dave may not of had a signal in the last 100 odd days so I go and insert Dave across the entire S&P500 (500 MSP's) and do the same. Still not a single result.

    Now I figure something smells funky, so I go to the Strategy Analyzer and do a run from 26-01-2012 to 25-01-2013 and sure enough - almost half of the equities have no trades - but half do! So, why am I not getting any results when I run them in the Control Center >> Strategies tab?

    This brings me to my two pointed questions.

    1. Why am I not getting results from the the MSPs I'm running in the Control Center.

    2. How do I get the Control Center Automated Trader thingy to load and test on more than a year of data?

    Thanks and regards,

    #2
    What interval are you testing on? Minute or daily?

    If you open a chart, can you load 3,650 days of data?
    MatthewNinjaTrader Product Management

    Comment


      #3
      Hi Matthew,

      Yes, daily... Dave uses daily data only and is in a trade 3-6 days on average and in the market about 10% of the time...

      I have no problem charting 3,650 bars (well, I presume I'm getting that many bars I haven't checked). When I ask for 3,650 bars it's going back to 31 Jan 2003 atm.

      I'd be happy if I could have a coupla years and get some Historical Results in Control Center to back-end my live trading... Just so I know I'm getting signals, because at the moment it doesn't seem like I'm getting any, as evidenced by Strategy Analyzer showing me heaps of trades and Control Center >> Strategies showing me none over the same test period (which I can't seem to expand).

      If I set Strategy Analyzer to test Davefrom 26 Jan 2012 - 25 Jan 2013 on the Dow stocks trading starts late Dec (setting aside 225 bars) and have over a dozen trades in over half the Dow30 stocks... but nothing if I try the same in Control Panel >> Strategies.

      Thoughts?

      Comment


        #4
        Hello,

        You will need to debug your logic to determine why it may not being taking trades over this period if you're sure the data is there.

        The easiest way to do this to add Print() statements to make sure each bar is being called as you'd expect.

        For example, on the first line of OnBarUpdate() you can add Print(Time[0]);

        This will print the DateTime of each bar your strategy is accessing and you can first ensure it's going back to the periods you expect.

        If it can access this data, but there still are no trades being taken for this time, you'd need to continue debugging.


        More examples of this can be found below:



        For strategies add TraceOrders = true to your Initialize() method and you can then view valuable output related to strategy submitted orders through Tools > Output window:

        MatthewNinjaTrader Product Management

        Comment


          #5
          Humph...

          Was able to get results for Historical testing when I was connected to a live feed and it seem to be reading from my historical database... yet when I test in Strategy Analyzer with a live connection it runs like a dog because it reloads the history. That's seems screwy.

          Okay, so question 1. solved.

          Do you have an answer to question 2? What do I do if I have a system using a 365+ day indicator, Control Center >> Strategies will never load enough data to calculate a Signal. Why do you have the "Days to Load" field if you're just going to ignore it... or do you ignore it? Can't tell...

          Comment


            #6
            I'd suggest you read questions before you spend the time writing a response.

            The Strategy has no problem whatsoever generating trades (in Strategy Analyzer) as I said time and time and time again in my post... the problem was Control Panel >> Strategies.

            Do you have an answer for question 2. from my original post?

            Comment


              #7
              The strategy analyzer and the historical results in the control center should be the same. If it is not working in one area, it shouldn't be working in the other. Which is why I suggested you add some dubugging tools to ensure you're looking at the data set you expect from the control center as you are from the strategy analyzer.

              Regarding your second question, setting your days to load is all that is needed to request this data.

              For example, connected to a eSignal connection, if I load the SampleMACrossOver Strategy on AAPL and set the Days To Load to 3650, I get results back to 2003.

              As a test, can you please do the same and tell me what results you get?
              MatthewNinjaTrader Product Management

              Comment


                #8
                Hi Matthew,
                If I do the sim without the data-feed connected then I only get a year, but connected to the data-feed I get the history loading and the full sim.
                Thanks

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by pvincent, 06-23-2022, 12:53 PM
                14 responses
                238 views
                0 likes
                Last Post Nyman
                by Nyman
                 
                Started by TraderG23, 12-08-2023, 07:56 AM
                9 responses
                383 views
                1 like
                Last Post Gavini
                by Gavini
                 
                Started by oviejo, Today, 12:28 AM
                0 responses
                1 view
                0 likes
                Last Post oviejo
                by oviejo
                 
                Started by pechtri, 06-22-2023, 02:31 AM
                10 responses
                125 views
                0 likes
                Last Post Leeroy_Jenkins  
                Started by judysamnt7, 03-13-2023, 09:11 AM
                4 responses
                59 views
                0 likes
                Last Post DynamicTest  
                Working...
                X