Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Intrabar granularity

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

    Intrabar granularity

    I was trying to run intrabar granularity for backtesting, and downloaded the script from http://www.ninjatrader-support.com/v...ead.php?t=6652
    I think I understood everything pretty well, but while trying the script, I just get trades if I choose one minute in the strategy backtest box, but this makes the script work as with a single bar series.
    If I choose 5 minutes in the strategy backtest box, no trades are done at all.
    Any idea about what am I doing wrong?
    Thanks a lot!

    PS: By the way, why does the backtest chart draw two SMA lines (5 and 50) while figures are suposed to be calculated with EMA's??

    #2
    Hi eswap0,

    In the example you want to set the time to be 5min for your primary bar series. Trades should occur under this scenario if you have the data. If you are experiencing otherwise it would be great if you could check your Control Center logs and let us know of any fishy errors.

    The chart is suppose to draw EMA of 10 and 25 by default. Are you sure you are testing the right strategy? Please try it again with default settings.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      There's a smily missing: the ashamed one.
      Sorry: I shouldn't test scripts that late. The script runs perfectly.
      Sorry for my stupid mistake: I choosed a diferent strategy..
      Thanks so much,

      PS: it might be usefull to somebody that trades run ok, at the right minute, althougt the chart is plotting them in the wrong bar.

      Comment


        #4
        The charting happens on the 5min bar, but your trades are in the 1mins. Since there are less 5min bars then there are 1min bars they get squished when plotting.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Last question (I hope).
          I realize I can use different minute periods, and everything works, but as soon as I choose "1 day" in the strategy backtest box (instead of n minutes) the script for intrabar granularity shows no trades.
          Is there any way to mix days and minutes?
          Thanks a lot!

          Comment


            #6
            That is the nature of using daily bars. From a daily bar there is no way you can determine intrabar price action so there is no way you can trade intrabar. The only way you can do this is through a multi-time frame strategy. Please see the Help Guide on Multi-Time Frame for more information.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Sorry but, isn't the script from http://www.ninjatrader-support.com/v...ead.php?t=6652 aldready based in Multi-time frame?
              I checked the script and instructions and saw that fit the Help Guide on Multi-Time Frame (like Add(PeriodType.Minute, n) and if (BarsInProgress == n))
              Again in that Guide minutes are not mixed with days...
              Thanks again!

              Comment


                #8
                The best way for you to understand how it works is just to try it for yourself. Please keep in mind the instructions (outlined in the reference sample) on which series needs to be the primary and which needs to be the secondary. Daily and intraday time frames will mix.
                Josh P.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by caacapital, Today, 10:10 AM
                1 response
                14 views
                0 likes
                Last Post NinjaTrader_ShawnB  
                Started by DiverG20, Today, 10:23 AM
                0 responses
                21 views
                0 likes
                Last Post DiverG20  
                Started by SuneSorgenfrei, Today, 09:29 AM
                0 responses
                19 views
                0 likes
                Last Post SuneSorgenfrei  
                Started by dodoei, Today, 07:24 AM
                0 responses
                14 views
                0 likes
                Last Post dodoei
                by dodoei
                 
                Started by thecashguys, Today, 06:13 AM
                0 responses
                13 views
                0 likes
                Last Post thecashguys  
                Working...
                X