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 ageeholdings, Today, 07:43 AM
    0 responses
    7 views
    0 likes
    Last Post ageeholdings  
    Started by pibrew, Today, 06:37 AM
    0 responses
    4 views
    0 likes
    Last Post pibrew
    by pibrew
     
    Started by rbeckmann05, Yesterday, 06:48 PM
    1 response
    14 views
    0 likes
    Last Post bltdavid  
    Started by llanqui, Today, 03:53 AM
    0 responses
    6 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Started by burtoninlondon, Today, 12:38 AM
    0 responses
    12 views
    0 likes
    Last Post burtoninlondon  
    Working...
    X