Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Entries per Direction value?

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

    Entries per Direction value?

    NT support,

    Could you please help me?

    Is there some NT managed value for the number of entries in a particular direction?

    I am trying to scale into a position and would like to understand how many entries are in a particular direction there are. I am aware of the EntriesPerDirection value and am using that to determine the maximum number of position I want to enter. However, I would like to understand if I have entered once and take some action, then if I have entered a second time I would like to take some action.

    Any help is appreciated.

    Thanks,

    drolles

    #2
    Hi drolles, there's would unfortunately not be a property available exposed keeping track, I would suggest you keep track of entries yourself with a counter. Another approach would be using differently named signal names, where you could distinguish by.

    Comment


      #3
      Bertrand,

      Thanks very much for the suggestions. And your prompt reply on a weekend.

      Could you please help me a little further? My thinking was along your lines as well in counting the entries myself. However, I’m getting a little stuck with the reversals of positions by EnterLongStop or EnterShortStop (which I’m using to reverse positions). It appears these don’t give exit signals when calling OnExecution. The exit signal name that is given in the “Close position”, however when looking for this signal name in OnExecution() it does not find it. I suspect that the signal name for this is “Short Entry” (i.e. if a long position is being exchanged for a short position using EnterShortStop).

      I need some means of determining when a position is being reversed as opposed to scaled into. I need to reset the counter when the position has been reversed and add to the counter when a position is being scaled into.

      Additionally, we probably need to add the access to the entries count as an item on the development request. It seems logical that I’m not the first customer to request such a thing.

      Thanks,

      drolles

      Comment


        #4
        Hi drolles, you're welcome - I'll forward your request to expose the EntriesPerDirection count. Correct the Enter methods reverse for you, so you see one close position and the new Enter xxx order to achieve the reverse, I would reset the count once I get this execution as the new entry is tied to the Close Position.

        Comment


          #5
          Bertrand,

          Thanks for your continued help on this.

          After some additional testing I don’t think this is going to work. I’ve realised that if you are scaling into a position that the EnterShortStop() does not exit all the position with the close position signal.

          The scheme we have devised works well when the strategy is set to single entries (see single entry screen capture). However, when the strategy is set to multiple entries per direction, the exit signal changes to the opposite entry signal (e.g. from Close position to Long Entry in this case). See the multiple entry screen capture as reference.

          Have it missed something? Is my interpretation correct?

          To handle the requirements of the strategy I think I will need to use unmanaged orders. However, my worry is that I’m not going to be able to cleanly reverse the position. Are you able to have a single order that reverses the position and enters in the new direction in a single order or does this need to be done in multiple orders?

          Additionally, when using the unmanaged scheme does NT 7 still have the ability to sync orders upon strategy launch?

          Thanks and regards,

          drolles
          Attached Files

          Comment


            #6
            drolles, I believe it should work - I ran a quick test here scaling in with 2 individual entries and then reversing with one - over all strategy position qty's were taken into consideration when issung the reverse order.

            The unmanaged mode would offer you as well to reverse your position completely, however there would be no signal tracking by NT and thus you would need to keep track yourself to know the qty you need to achieve the reverse.

            Comment


              #7
              Bertrand,


              Thanks for your reply.


              I’m assuming that you were using the standard functionality of having the orders expire every bar. However, I am trying to use the live till cancelled feature to ensure that the orders are not resubmitted every bar. I am using 240 min bars for signals with orders and manage stop losses being managed at 1 minute intervals. Given that the signals should only change every four hours it doesn’t seem sensible to have the orders resubmitted every minute but updated on an necessary event (e.g. the opposite order being filled).


              After your post, I have retested my code. The effects are still the same after some adjusting of the code as to where I thought the error might have been. However, to no result; it appears that at some stage orders start to be submitted every bar as they would if IOrder objects are being created as “live till cancel”.
              I’m seeing output with trace orders enable to the following effect in the output window:

              Current Account Size = 9117
              26/11/2010 21:53:00 Entered internal PlaceOrder() method at 26/11/2010 21:53:00: BarsInProgress=1 Action=SellShort OrderType=Stop Quantity=0.01M LimitPrice=0 StopPrice=0.9800 SignalName='Short Entry' FromEntrySignal=''
              Current Account Size = 9117
              26/11/2010 21:54:00 Entered internal PlaceOrder() method at 26/11/2010 21:54:00: BarsInProgress=1 Action=SellShort OrderType=Stop Quantity=0.01M LimitPrice=0 StopPrice=0.9800 SignalName='Short Entry' FromEntrySignal=''
              Current Account Size = 9117
              26/11/2010 21:55:00 Entered internal PlaceOrder() method at 26/11/2010 21:55:00: BarsInProgress=1 Action=SellShort OrderType=Stop Quantity=0.01M LimitPrice=0 StopPrice=0.9800 SignalName='Short Entry' FromEntrySignal=''
              Current Account Size = 9117
              26/11/2010 21:56:00 Entered internal PlaceOrder() method at 26/11/2010 21:56:00: BarsInProgress=1 Action=SellShort OrderType=Stop Quantity=0.01M LimitPrice=0 StopPrice=0.9800 SignalName='Short Entry' FromEntrySignal=''
              Current Account Size = 9117
              26/11/2010 21:57:00 Entered internal PlaceOrder() method at 26/11/2010 21:57:00: BarsInProgress=1 Action=SellShort OrderType=Stop Quantity=0.01M LimitPrice=0 StopPrice=0.9800 SignalName='Short Entry' FromEntrySignal=''
              Current Account Size = 9117
              26/11/2010 21:58:00 Entered internal PlaceOrder() method at 26/11/2010 21:58:00: BarsInProgress=1 Action=SellShort OrderType=Stop Quantity=0.01M LimitPrice=0 StopPrice=0.9800 SignalName='Short Entry' FromEntrySignal=''
              Current Account Size = 9117
              26/11/2010 21:59:00 Entered internal PlaceOrder() method at 26/11/2010 21:59:00: BarsInProgress=1 Action=SellShort OrderType=Stop Quantity=0.01M LimitPrice=0 StopPrice=0.9800 SignalName='Short Entry' FromEntrySignal=''

              Again, the code appears to work perfectly when using a single entry.


              Thanks and regards,


              drolles

              Comment


                #8
                Hi drolles, is there any test strategy I could run on my end for you? Then please attach it to a reply to our email ticket already open...if you're working with liveUntilCancelled it could be that you run into the internal order handling rules with the managed approach, if you do not cancel working orders before issuing the reverse orders (which would result in Ignored orders listed in your TraceOrder output).

                Thanks,

                Comment


                  #9
                  Bertrand,

                  Thanks for your reply.

                  I’m happy to forward the strategy I’ve developed over to you. I have emailed the usual support address.

                  Thanks and regards,

                  Dan

                  Comment


                    #10
                    Thanks Dan, got it and will look into shortly.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    648 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    369 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    108 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    572 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    573 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X