Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Always start with a long or short

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

    Always start with a long or short

    When starting a single direction automated trading strategy such as when x = y go long or short and exit when x no longer =y how do I make certain the strategy will start with the enter long or short rather than the exit position command?
    Thank you in advance.

    #2
    Not sure I follow, why are you concerned if an exit call is made first? If there is nothing to exit, this method call is ignored internally anyways.
    RayNinjaTrader Customer Service

    Comment


      #3
      During back testing and simulation the strategy would sometimes would start with the exit.
      Perhaps real time application is the cure.

      Comment


        #4
        For sure an Exit() method could be called first before an Entry() method but this Exit() is ignored (no action taken) if a position does not exist.

        From NT perspective -

        This:

        ExitLong();
        EnterLong();

        is the same as:

        EnterLong();
        ExitLong();

        if these were the only method calls in OnBarUpdate().
        RayNinjaTrader Customer Service

        Comment


          #5
          Thank you for the help

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by michi08, 10-05-2018, 09:31 AM
          5 responses
          741 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by The_Sec, Today, 02:29 PM
          0 responses
          1 view
          0 likes
          Last Post The_Sec
          by The_Sec
           
          Started by tsantospinto, 04-12-2024, 07:04 PM
          4 responses
          62 views
          0 likes
          Last Post aligator  
          Started by sightcareclickhere, Today, 01:55 PM
          0 responses
          1 view
          0 likes
          Last Post sightcareclickhere  
          Started by Mindset, 05-06-2023, 09:03 PM
          9 responses
          259 views
          0 likes
          Last Post ender_wiggum  
          Working...
          X