Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

simple order management logic problem

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

    simple order management logic problem

    i have a very simple sytem i am trying to creat into a strategy:

    enter long when: 20 period ma crosses above 100 period ma
    exit long when: 20 period ma crosses below 50 period ma

    enter short when: 20 period ma crosses below 100 period ma
    exit short when: 20 period ma crosses above 50 period ma

    when i enter this strategy in the strategy wizard it will enter the position correctly on the "EnterLong" command, however on the "ExitLong" command it will exit the existing position ma but if the 20 period crosses below the 50 period ma again it will ENTER SHORT, this is not correct, i want it to wait again until an entry based on rules above, and only close if there is an active position open.

    please help, thank you.

    #2
    Then you should add a condition that checks if the strategy position is flat as part of the condition for entry.
    RayNinjaTrader Customer Service

    Comment


      #3
      i dont understand

      thank you for your quick reply ninjatrader ray, unfortunately i dont understand exactly how to do this, this is my first attempt at creating a simple strategy and i the way i input the strategy so far was exactly as i outlined it in my initial post

      Comment


        #4
        Maybe this link will help -

        RayNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        52 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        142 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        160 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        96 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        276 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X