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 NullPointStrategies, Today, 05:17 AM
    0 responses
    39 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    124 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    64 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    41 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X