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 sidlercom80, Today, 02:40 AM
                0 responses
                12 views
                0 likes
                Last Post sidlercom80  
                Started by b16_aln, Today, 01:52 AM
                0 responses
                11 views
                0 likes
                Last Post b16_aln
                by b16_aln
                 
                Started by junkone, Yesterday, 08:55 PM
                1 response
                10 views
                0 likes
                Last Post NinjaTrader_Jason  
                Started by adaeiqendqw, 01-16-2021, 02:56 AM
                1 response
                16 views
                0 likes
                Last Post NinjaTrader_Jason  
                Started by [email protected], Yesterday, 06:10 PM
                5 responses
                17 views
                0 likes
                Last Post NinjaTrader_ChrisSch  
                Working...
                X