Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to create a while loop to wait until the current bar close to enter a trade?

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

    How to create a while loop to wait until the current bar close to enter a trade?

    For example, imagine am trading on the 5minute time frame and the current bar is currently only around the 3minutes mark. I want to manually press the "enable" button on the strategy tab section and the strategy will wait until the current bar closes (so it waits the remaining 2minutes) and then it will enter a Long/Short at the open of the new bar?

    I am able to enter a Long at the close of the 5minute bar once the current bar opens by simply having EnterLongStopMarket(Close[0]);
    Is there possible to enter at the open value of the current bar?
    Last edited by zaro33; 09-09-2019, 08:31 PM.

    #2
    Hello zaro33,

    Thanks for your post.

    We've noted that this topic is the same as one you created here: https://ninjatrader.com/support/foru...he-next-candle So I will provide my response in the other thread.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    90 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    135 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    120 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    69 views
    0 likes
    Last Post PaulMohn  
    Working...
    X