Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Only check logic after certain time

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

    Only check logic after certain time

    Good morning,

    Building a strategy that has a certain time I'd like it to start. Right now I'm using "ToTime(Time[0]) > 060000". So, when I enable the strategy the night before at 8pm I only want it to check the logic after 6am the next morning. The issue is that the strategy won't execute before 6am BUT if the criteria for entry was met overnight it "triggers" a signal which then adjusts the account market position which directly effects my logic for entering new trades. How can I change this so that the strategy can be enabled but the criteria can only be met after a certain hour?

    Thanks so much for the help

    #2
    Hello Bmatarese,

    If you have a variable, such as a bool, that was set after 6:00 and before 23:59, you could reset that variable in a new condition set that checks for the time to be 00:00 (midnight).
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Segwin, 05-07-2018, 02:15 PM
    14 responses
    1,789 views
    0 likes
    Last Post aligator  
    Started by Jimmyk, 01-26-2018, 05:19 AM
    6 responses
    837 views
    0 likes
    Last Post emuns
    by emuns
     
    Started by jxs_xrj, 01-12-2020, 09:49 AM
    6 responses
    3,293 views
    1 like
    Last Post jgualdronc  
    Started by Touch-Ups, Today, 10:36 AM
    0 responses
    13 views
    0 likes
    Last Post Touch-Ups  
    Started by geddyisodin, 04-25-2024, 05:20 AM
    11 responses
    63 views
    0 likes
    Last Post halgo_boulder  
    Working...
    X