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 DannyP96, 05-18-2026, 02:38 PM
    1 response
    24 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    115 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    69 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    225 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    411 views
    0 likes
    Last Post CaptainJack  
    Working...
    X