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 DJ888, 04-16-2024, 06:09 PM
    6 responses
    18 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by Jon17, Today, 04:33 PM
    0 responses
    1 view
    0 likes
    Last Post Jon17
    by Jon17
     
    Started by Javierw.ok, Today, 04:12 PM
    0 responses
    6 views
    0 likes
    Last Post Javierw.ok  
    Started by timmbbo, Today, 08:59 AM
    2 responses
    10 views
    0 likes
    Last Post bltdavid  
    Started by alifarahani, Today, 09:40 AM
    6 responses
    41 views
    0 likes
    Last Post alifarahani  
    Working...
    X