Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Order generation from strategy for manual trading

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

    #16
    Hi Koganam,
    Thanks. Looks like I need to set the session template "US Equities RTH" on per instrument basis in the watchlist. I can do that. I will try today after market hours. Can you please let me know if there is any option to set a session template as the default session template for ninjatrader to use. I noticed the option to set session template disappears in strategy analyzer if the data series type is "Day" in the backtest options.

    Hi JC -
    Your Option-B is what I need i.e., strategy analyzer process the daily bar after the market is closed for the day (i.e., after US equities RTH hours) to submit orders for next day. My understanding is currently it is NOT processing today's daily bar till next day's daily bar close. Probably because I had CalculateOnBarClose=true. That behavior is non-intuitive.

    I am hoping with Koganam suggestions i.e., CalculateOnBarClose=false and setting session template for instruments individually to US Equities RTH would solve the problem i.e., strategy analyzer invokes OnBarUpdate() on today's bar after hours.

    I think it would be useful if NT has documentation describing clearly when strategy analyzer will process today's DAILY bar (like for Yahoo/Kinetic EOD data feeds) i.e., when it will invoke OnBarUpdate() method on today's DAILY bar for these two options -- CalculateOnBarClose=false and true. Same information for strategies working off weekly bars.

    Comment


      #17
      Originally posted by atrader123 View Post
      ...My understanding is currently it is NOT processing today's daily bar till next day's daily bar close.
      Not quite. Today's bar closes at tomorrow's open.

      Comment


        #18
        Hello atrader123,

        When using daily charts you are forced to use the session template from the data provider itself.

        For a workaround to set a session template on a day based chart you may view the following forum post.
        http://www.ninjatrader.com/support/f...75&postcount=3

        Note that it does require a connection to a intraday data provider.

        Also, using the Strategy Analyzer Calculate on bar close is always going to be set to true.

        You may add intrabar granularity when backtesting a strategy to to have your logic calculate with the primary data series bar. See the following forum link for a reference.
        http://www.ninjatrader.com/support/f...ead.php?t=6652
        JCNinjaTrader Customer Service

        Comment


          #19
          Hi JC, Koganam,
          Thanks very much for your help. I have access to intraday data but looks like both Yahoo and Kinetic EOD (free) send RTH data. Did couple of tests today with strategy analyzer after markets are closed. The sample strategy is processing today's bar when CalculateOnBarClose = false. Don't know if it is a bug as it contradicts documentation for strategy analyzer but if it is then please don't fix.

          Following is the output -
          Proceesing bar.........10/10/2012 OHLC: 144.18,144.32,143.09,143.28
          Proceesing bar.........10/11/2012 OHLC: 144.28,144.49,143.33,143.36
          BuyOn:10/12/2012,SPY,@Price: 143.36
          Proceesing bar.........10/12/2012 OHLC: 143.46,143.95,142.58,142.89
          Proceesing bar.........10/15/2012 OHLC: 143.23,144.23,142.77,144.08
          Proceesing bar.........10/16/2012 OHLC: 144.76,145.64,144.66,145.54
          SellOn:10/17/2012,SPY,@Price: 145.54
          Thought few other NT users might also find interesting the scenario of using strategy analyzer to generate strategy signals end of the day/week for discretionary trading. So I posted a summary of the workflow, sample code and steps done on my blog. Thanks again for the help. I appreciate it.

          Link: http://www.atraderjournal.com/2012/1...ing-using.html

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          664 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          376 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          110 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          575 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          580 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X