Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to caclulate last bar of day at 3:55pm?

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

    How to caclulate last bar of day at 3:55pm?

    Hello,
    For 15 and 60 minute bars. I would like to close the last bar of the day a little early, like 5 minutes before close. So for 15 minute bars, the last bar of the day would have 10 minutes. This would cause the strategy to calculate a bit early so that an end of day trade can be placed. I know this might be off from the final close of the day.

    Is this possible through the GUI or through code?

    It seems it might be possible if I can, in real time, change CalculateOnBarClose from true to false at exactly 3:55pm.

    Regards.

    #2
    Originally posted by sajosh View Post
    Hello,
    For 15 and 60 minute bars. I would like to close the last bar of the day a little early, like 5 minutes before close. So for 15 minute bars, the last bar of the day would have 10 minutes. This would cause the strategy to calculate a bit early so that an end of day trade can be placed. I know this might be off from the final close of the day.

    Is this possible through the GUI or through code?

    It seems it might be possible if I can, in real time, change CalculateOnBarClose from true to false at exactly 3:55pm.

    Regards.
    You might want to use OnMarketData() to trigger off of for that last calculation. Of course, you can also use the PC clock time, which means that that trigger will be limited to realtime only.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by localappleseed, Today, 01:05 PM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_Jim  
    Started by Abdullah_KSA, Today, 12:43 PM
    5 responses
    17 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by westofpluto, Today, 11:42 AM
    4 responses
    19 views
    0 likes
    Last Post westofpluto  
    Started by Jschmelz, Today, 11:33 AM
    1 response
    28 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by butt_toast, Today, 10:46 AM
    2 responses
    19 views
    0 likes
    Last Post NinjaTrader_Zachary  
    Working...
    X