Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

enterlong on close

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

    enterlong on close

    Hi, How do I enter long on the current bar at close realtime in dayly charts?

    On ProRealTime the code is BUY 1 SHARE AT MARKET thisbaronclose

    #2
    Hello fercho,
    In NinjaTrader there is no bar close events. Formation of a new bar essentially represents that a bar has closed. In case of a daily bars since a new bar is only formed on the next day the close of the bar is not represented the way you want and as such you cannot submit an order "on close of the bar" in a daily chart.

    You can however create a multi-series strategy with the secondarily series being a intraday bars array and submit an order accordingly.

    Please let me know if I can assist you any further.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Joydeep View Post
      Hello fercho,
      In NinjaTrader there is no bar close events. Formation of a new bar essentially represents that a bar has closed. In case of a daily bars since a new bar is only formed on the next day the close of the bar is not represented the way you want and as such you cannot submit an order "on close of the bar" in a daily chart.

      You can however create a multi-series strategy with the secondarily series being a intraday bars array and submit an order accordingly.

      Please let me know if I can assist you any further.
      Could you please post a simple code example for it,
      Thank you in advance

      Comment


        #4
        Please see our reference sample on backtesting with an intrabar granularity:

        You can submit orders to different Bars objects. This allows you the flexibility of submitting orders to different timeframes. Like in live trading, taking entry conditions from a 5min chart means executing your order as soon as possible instead of waiting until the next 5min bar starts building. You can achieve this by
        MatthewNinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        67 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        36 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        59 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        62 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        53 views
        0 likes
        Last Post CarlTrading  
        Working...
        X