Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Entry Handling

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

    Entry Handling

    Hello,

    I have combined in a strategy nt-script-strategy-entries (2 lots) and chart-trader-ATM entry (1 lot). Everything works fine. But today it occured for the first time that there have been 4 lots in the trade. How can this happen?

    I have

    EntriespPerDirection = 3;
    EntryHandling = EntryHandling.AllEntries;

    And after this problem I started testing EntriesPerDirection with 1, 2... and no matter what number with EntriesPerDirection, there are usually always 3 lots. Why?

    Does EntriesPerDirection count the entris with script and atm same time?

    Thanks
    Tony

    #2
    Hi Tony, the EntryHandling / EntriesPerDirection does not apply to the ATM strategy methods.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Hi Bertrand,

      and what about my first question pls?

      I have

      {
      EnterShort(1000, "S1A");
      EnterShort(1000, "S2A");
      //EnterShort(1000, "S3");
      //EnterShort(1000, "S4");

      }

      But there are 3000 short (sometime) Why?

      Thanks
      Tony

      Originally posted by NinjaTrader_Bertrand View Post
      Hi Tony, the EntryHandling / EntriesPerDirection does not apply to the ATM strategy methods.

      Comment


        #4
        Tony, this could happen if you're not taking care to keep your account position correctly in sync to the account position - http://www.ninjatrader.com/support/h..._positions.htm

        Easiest would be starting up in WaitUntilFlat mode and then ensuring the account is flat as well.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Thank you for your reply. I do in "WaitUntilFlat" mode. I have COBC=false and the entry condition is only
          Position.MarketPosition == MarketPosition.Flat
          && GetCurrentAsk() > GetCurrentBid())
          because I want to have the entry immediately (but then working with the script and the atm).

          In the attached jpg you can see that in AU and GU there are long correctly 3000 with 3000 stops (2000 script stops and 1000 atm-stop) but in EUR there are 4000 long and only 2000 stops. So there is 1000 long more and on the other hand the stops are only 2000.

          This occurs not every trade but very often, with sim datafeed and with live-trading.


          Thanks
          Tony



          Originally posted by NinjaTrader_Bertrand View Post
          Tony, this could happen if you're not taking care to keep your account position correctly in sync to the account position - http://www.ninjatrader.com/support/h..._positions.htm

          Easiest would be starting up in WaitUntilFlat mode and then ensuring the account is flat as well.
          Attached Files
          Last edited by tonynt; 11-26-2011, 01:27 PM.

          Comment


            #6
            I may be wrong, but the below code is contradictory. AllEntry is limiting the trades to 3 (Entries per direction) and ignoring the unique strings.

            EntriespPerDirection = 3;
            EntryHandling = EntryHandling.AllEntries;

            Comment


              #7
              Bukkan,

              thank you for your reply. What do you think then I should do with entryhandling when I want to have

              EnterLong(1000, "L1A");
              EnterLong(1000, "L2A");

              and the 3rd long (1000) I have coded with GetATM....

              Thanks
              Tony


              Originally posted by bukkan View Post
              I may be wrong, but the below code is contradictory. AllEntry is limiting the trades to 3 (Entries per direction) and ignoring the unique strings.

              EntriespPerDirection = 3;
              EntryHandling = EntryHandling.AllEntries;

              Comment


                #8
                Originally posted by tonynt View Post
                Bukkan,

                thank you for your reply. What do you think then I should do with entryhandling when I want to have

                EnterLong(1000, "L1A");
                EnterLong(1000, "L2A");

                and the 3rd long (1000) I have coded with GetATM....

                Thanks
                Tony
                Tony,
                You assigning an unique identifier with each Managed Order. The very pupose of that get nullified when you assign the entry handling as allentries, atleast while submitting the entry orders.

                Atm orders are not event driven, and it cannot recognize MarketPosition. Atm orders event updates lag by atleast by one tick.

                From the screenshot i could see there are 2 managed orders (marketPosition == MarketPostion.Flat filters out any further managed order, GetCurrentAsk is always greater than getcurrentbid, so its redundant) and another order as submitted by the atm strategy.

                i could only see your codes in bits and pieces. as such it is difficult to say in concrete.

                Comment


                  #9
                  Bukkan,

                  thank you for your reply. When testing with sim datafeed I think that the error occurs because with AllEntries it can happen that one uniquely named entry is realized 2 times. So the solution is to use UniqueEntries and set direction1. I´m wondering when it makes sense to use AllEntries then.


                  Best
                  Tony

                  Originally posted by bukkan View Post
                  Tony,
                  You assigning an unique identifier with each Managed Order. The very pupose of that get nullified when you assign the entry handling as allentries, atleast while submitting the entry orders.

                  Atm orders are not event driven, and it cannot recognize MarketPosition. Atm orders event updates lag by atleast by one tick.

                  From the screenshot i could see there are 2 managed orders (marketPosition == MarketPostion.Flat filters out any further managed order, GetCurrentAsk is always greater than getcurrentbid, so its redundant) and another order as submitted by the atm strategy.

                  i could only see your codes in bits and pieces. as such it is difficult to say in concrete.
                  Last edited by tonynt; 11-27-2011, 01:55 PM.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by DJ888, 04-16-2024, 06:09 PM
                  6 responses
                  18 views
                  0 likes
                  Last Post DJ888
                  by DJ888
                   
                  Started by Jon17, Today, 04:33 PM
                  0 responses
                  1 view
                  0 likes
                  Last Post Jon17
                  by Jon17
                   
                  Started by Javierw.ok, Today, 04:12 PM
                  0 responses
                  6 views
                  0 likes
                  Last Post Javierw.ok  
                  Started by timmbbo, Today, 08:59 AM
                  2 responses
                  10 views
                  0 likes
                  Last Post bltdavid  
                  Started by alifarahani, Today, 09:40 AM
                  6 responses
                  41 views
                  0 likes
                  Last Post alifarahani  
                  Working...
                  X