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 NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    54 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    130 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    72 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    44 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    49 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X