Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Time of Day condition

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

    Time of Day condition

    && (Times[0][0].TimeOfDay > new TimeSpan(9, 35, 0))
    && (Times[0][0].TimeOfDay < new TimeSpan(15, 45, 0))

    I added the above to working strategy but then my trades stopped occurring, After Blocking those 2 lines and compiling again, executions resumed as before

    this strategy is unlocked runs OnEachTick

    Update: I do not understand why but when i reduce my brick size of my primary bar, it will work
    Last edited by DTSSTS; 01-16-2022, 06:14 PM.

    #2
    Hello DTSSTS,

    Use Print() to understand behavior.

    Print the time of the bar, then print the values used in the condition.

    Below is a link to a forum post that demonstrates using Print() to understand behavior.


    I am happy to assist with analyzing the output.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    47 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    23 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    33 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    51 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Working...
    X