Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Enter open ot day within intraday strategy

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

    Enter open ot day within intraday strategy

    Hi,

    1. I tried to enter at market on open of the day within a intraday strategy. Unfortunately with no success. Has anybody an idea?

    2. Next question ist to determine that only one entry per day is allowed.

    3. Is it possible to exit some seconds before the end of the session within a End of day strategy? With ExitOnClose it was not working.

    Thanks

    #2
    1. Please use filters of if (Bars.FirstBarOfSession && FirstTickOfBar) to place your order.

    2. You would keep track of this yourself.
    Code:
    if (Bars.FirstBarOfSession && FirstTickOfBar)
         hasTraded = false;
    
    if (hasTraded == false)
    {
         EnterLong();
         hasTraded = true;
    }
    3. Please use ExitOnClose. You need to set a reasonable amount of seconds before the market close for it to actually have time to submit and get filled by the exchange.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thanks for your quick answer, Josh. It tried it and it works at the second bar of the new day. Not bad but what about the open of the day? Is this also possible with intraday bars or do I have to change to daily bars?

      Comment


        #4
        You have to run in real-time with CalculateOnBarClose = false to get it to trade intrabar.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Thanks. I will do so. But by the way:

          After deconnecting or closing down Ninjatrader the implemented strategies disapear allways. I saved the workspace but after every close down of NT I have to implement all the startegies again. How can I change it?

          Comment


            #6
            Closing NT will remove the strategy. NT7 will provide strategy persistence features.
            Josh P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by CaptainJack, 05-29-2026, 05:09 AM
            0 responses
            251 views
            0 likes
            Last Post CaptainJack  
            Started by CaptainJack, 05-29-2026, 12:02 AM
            0 responses
            161 views
            0 likes
            Last Post CaptainJack  
            Started by charlesugo_1, 05-26-2026, 05:03 PM
            0 responses
            165 views
            1 like
            Last Post charlesugo_1  
            Started by DannyP96, 05-18-2026, 02:38 PM
            1 response
            250 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 05-11-2026, 05:56 AM
            0 responses
            203 views
            0 likes
            Last Post CarlTrading  
            Working...
            X