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 Jonker, 04-27-2024, 01:19 PM
    3 responses
    22 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by businessman1929, 04-29-2024, 01:28 PM
    2 responses
    21 views
    0 likes
    Last Post businessman1929  
    Started by bltdavid, 03-27-2023, 05:32 AM
    18 responses
    346 views
    0 likes
    Last Post ETFVoyageur  
    Started by NM_eFe, Today, 05:15 PM
    0 responses
    4 views
    0 likes
    Last Post NM_eFe
    by NM_eFe
     
    Started by vitaly_p, Today, 05:09 PM
    0 responses
    4 views
    0 likes
    Last Post vitaly_p  
    Working...
    X