• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Time Filter

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

    Time Filter

    Hello
    I am trying to create a time filter using the strategy builder - trades only to be opened between 3pm and 6.40am

    I have the entry on 2 separate tabs

    Set 1
    "entry code"
    time filters

    Times[Default input][0].TimeOfDay>=new TimeSpan(15,0,0)
    Times[Default input][0].TimeOfDay<=new TimeSpan(23,59,0)

    Set 2
    "entry code"
    time filters
    Times[Default input][0].TimeOfDay>=new TimeSpan(0,0,0)
    Times[Default input][0].TimeOfDay<=new TimeSpan(6,40,0)


    I am still returning values between 6.41am and 2.59pm

    Thanks for any help

    Stefan





    #2
    Hello Stefan,

    Thanks for your post.

    Using your time codes above, I do not see any activity between 6:40 AM and 3:00 PM on the chart as indicated by the dots. You may want to debug by printing a dot when your filter conditions are true. You may want to simplify the strategy (if you have other things in there, or create a new one of only the filter conditions).


    Click image for larger version

Name:	sdauteuil-1.PNG
Views:	32
Size:	79.3 KB
ID:	1063352
    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by YevhenShynkarenko, Today, 02:55 AM
    0 responses
    30 views
    0 likes
    Last Post YevhenShynkarenko  
    Started by pjsmith, Today, 02:20 AM
    0 responses
    9 views
    0 likes
    Last Post pjsmith
    by pjsmith
     
    Started by faisamtrader, Yesterday, 10:03 PM
    0 responses
    8 views
    0 likes
    Last Post faisamtrader  
    Started by johnnybegoode, Yesterday, 08:11 PM
    0 responses
    4 views
    0 likes
    Last Post johnnybegoode  
    Started by Bionian, Yesterday, 02:47 PM
    2 responses
    26 views
    0 likes
    Last Post Bionian
    by Bionian
     
    Working...
    X