Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi-Instrument Strategy

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

    #16
    You likely need to run with a higher EntriesPerDirection here or set EntryHandling to use UniqueEntries:

    BertrandNinjaTrader Customer Service

    Comment


      #17
      Thanks Bertrand, it is working good with the enter. However, with the ExitLong() or ExitShort statement are working. Every enter position is closing only with profit target level instead of closing when I am opening a new position in the opposine direction.

      Initialize()
      EntriesPerDirection = 4;
      EntryHandling = EntryHandling.AllEntries;

      OnBarUpdate()
      if .........something
      {
      EnterShort(1,quantityOrder,"short1");
      EnterShort(2,quantityOrder,"short2");
      EnterShort(3,quantityOrder,"short3");
      ExitLong("long");
      }

      else if ....something
      {
      EnterLong(5,quantityOrder,"long");
      ExitShort("short1");
      ExitShort("short2");
      ExitShort("short3");
      }

      It is entering new positions but is not exiting the latest one....it close only when meet the profit target.

      Comment


        #18
        Loukas, please try exiting the position before opening a position in the other direction:
        Code:
        exitshort1
        exitshort2
        exitshort3
        enterlong5
        
        instead of
        
        enterlong5
        exitshort1
        exitshort2
        exitshort3
        AustinNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by fx.practic, 10-15-2013, 12:53 AM
        5 responses
        5,404 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by Shai Samuel, 07-02-2022, 02:46 PM
        4 responses
        95 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by DJ888, Yesterday, 10:57 PM
        0 responses
        7 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by MacDad, 02-25-2024, 11:48 PM
        7 responses
        159 views
        0 likes
        Last Post loganjarosz123  
        Started by Belfortbucks, Yesterday, 09:29 PM
        0 responses
        8 views
        0 likes
        Last Post Belfortbucks  
        Working...
        X