Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Evaluating Daily Bars before close of Session

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

    Evaluating Daily Bars before close of Session

    I know that the title sounds a little strange, but I want to be able to enter a position at the end of a trading session (say the last 3-5 minutes or so) by evaluating what has happened thus far during the day, as part of swing trading strategy.

    For example, I may want to enter a position on a cross over condition or a certain oscillator value essentially being meet during this session and enter a position at the close.

    I am not sure how to achieve this with ninjascript. I have contemplated using 1435 minute bars, but this messes up the daily flow and I believe that using "onBarClose = false" will not work also as this will fire all session long instead of just allowing me to analyse at the end.

    Thoughts???

    #2
    Your two ideas would be the options available to you. You will need to either add additional granularity into your strategy with a secondary time frame or you will need to use CalculateOnBarClose = false and then filter out all processing till near the end of the day. You can do the filtering by checking your PC clock time with DateTime.Now.
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    60 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    39 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    19 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    21 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    51 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X