Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Enter trade 1 bar after EMA crossover

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

    #16
    Hello Hugues,

    In a new condition set, in the conditions select Time -> Time Series on the left, equals in the center, Time -> Time value on the right, and select the time.
    In the actions, in the order management section, submit an exit order.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #17
      Chelsea,

      Thanks much for your help. In the order management section, for exit order, we have either exit long or exit short. Do i have to create 2 news conditions sets(one for exit long and one for exit short) ?

      Also, do i have to untick the exit on session close in the setting?

      Thank you again!
      Hugues

      Comment


        #18
        Hello Hugues,

        You can put both ExitLong() and ExitShort() in the same condition. If there is no long position, the ExitLong() will just be ignored or vice versa. (This will result in a TraceOrders message though, which can be ignored if this is the behavior you want)

        The best code would probably have two conditions, one for long one for short, and checks the Strategy -> Current market position to be long (or short).

        The Exit on session close is up to you. If you want to keep a position open to the next session uncheck this.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        89 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
        119 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