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

Added Time series question..

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

    #16
    Hello zachj,

    Thank you for your response.

    Is there a difference in the number of trades taken? There should be, this would be expected. You are adding a additional condition to your strategy that filters based on volume and (Closes[2][1] >= 10 && Closes[2][1] <= 200).

    Can you detail why you would not expect to see such a difference here?

    I look forward to your response.

    Comment


      #17
      Yes 143 trades with the volume code and 155 without. But I'm just backtesting on symbol SPY, the volume and price constraint should have no effect. I don't understand how this is not clear. If SPY is hovering around $150 price and volume always over 100 million, why is a filter for volume over a measley 100k and stocks between $10 and 200 changing the net profit results or amount of trades? Im just putting those fillters in for when I run a BT in the future on the entire S&P to avoid the stocks that don't pass those specs. Im running just on SPY currently to make sure this code isn't effecting anything it shouldn't, which it definately is.
      Last edited by zachj; 06-20-2013, 09:21 AM.

      Comment


        #18
        Hello zachj,

        Thank you for your patience.

        I see what you are detailing, I am investigating this further on my end and I will follow up with you when I have additional details.

        Comment


          #19
          Ok thanks. I guess my original question should have been when backtesting a index of stocks how do I weed out the stocks with under 100k average daily volume. Given that I already have a primary price series of 5min and a secondary price series of 1min in place.

          Comment


            #20
            So that I can make sure I run the test with the exact settings you're using could you please provide me with the complete source file so that I may test on my end. Pasting the source will not be sufficient.

            Located in (MY)Documents\NinjaTrader 7\bin\Custom\Strategy

            Also provide me with any parameter inputs you may be using.

            I look forward to assisting you further.
            LanceNinjaTrader Customer Service

            Comment


              #21
              source file and parameters attached.
              Attached Files
              Last edited by zachj; 06-21-2013, 08:00 AM.

              Comment


                #22
                Thank you for this, because time is involved can you also let me know the local PC's timezone?
                LanceNinjaTrader Customer Service

                Comment


                  #23
                  Eastern standard Time.

                  Comment


                    #24
                    I've run the test several times and each time provides me with the same results.

                    I noticed the screenshots you provided where ran using different data series. The first screen shot is using 2 SPY time frames where as the 2nd is using 3 SPY time frames

                    These will cause different results due to different start times for the script.

                    For example. If you require 20 bars 1 minute bars to be loaded before calculating, it will start after 20 minutes. In your case it looks like the 3rd series are daily bars. This means it will be not placing trades for at least the first 20 days.

                    Let me know if I can be of further assistance.
                    LanceNinjaTrader Customer Service

                    Comment


                      #25
                      It will still cause a difference even though I don't have the bars required code in there?

                      Comment


                        #26
                        Your strategy settings are set to 20 bars required. You could reduce this on the interface but keep in mind if not enough data is available you will get out of bounds errors.
                        LanceNinjaTrader Customer Service

                        Comment


                          #27
                          Oh Gotcha. So basically I have my BT start date as 2/1/12 but when the daily series is added and with the 20 bar requirement it's not actually starting to trade until the end of feb when 20 trading days have passed. With there is only 2 price series the primary series being 5min, 20 bars passes within just a couple hours. If I set the min bars to 0 will it use the 20 days prior to 2/1/12 if that data is available?

                          Comment


                            #28
                            Originally posted by zachj View Post
                            If I set the min bars to 0 will it use the 20 days prior to 2/1/12 if that data is available?
                            It will not use any data before the start date. It will begin reading data starting at the start date but will not begin calculating until enough bars have been loaded per your settings. Be aware that logical checks done on a series that has not loaded enough data will cause errors.



                            Let me know if I can be of further assistance.
                            LanceNinjaTrader Customer Service

                            Comment


                              #29
                              Ok so I would need to set my start date 20 trading days prior to 2/1/12 if I wanted it to start calculating on 2/1/12. Thanks for clearing this up guys, its a big relief to finally have this resolved. Go ahead and close her down.

                              Comment


                                #30
                                Yep, for this specific script it sounds like this is correct

                                Let us know if we can be of further assistance.
                                LanceNinjaTrader Customer Service

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by alifarahani, Today, 09:40 AM
                                6 responses
                                33 views
                                0 likes
                                Last Post alifarahani  
                                Started by Waxavi, Today, 02:10 AM
                                1 response
                                17 views
                                0 likes
                                Last Post NinjaTrader_LuisH  
                                Started by Kaledus, Today, 01:29 PM
                                5 responses
                                14 views
                                0 likes
                                Last Post NinjaTrader_Jesse  
                                Started by Waxavi, Today, 02:00 AM
                                1 response
                                12 views
                                0 likes
                                Last Post NinjaTrader_LuisH  
                                Started by gentlebenthebear, Today, 01:30 AM
                                3 responses
                                17 views
                                0 likes
                                Last Post NinjaTrader_Jesse  
                                Working...
                                X