Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

EntriesPerDirection used as position limit

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

    EntriesPerDirection used as position limit

    Hi Ninjas,

    I'm coding a very simple procedure for scaling in/out with managed orders. An obvious requirement would be set a limit for maximum opened positions, either Long or Short. Reading about EntriesPerDirection property, it seems to serve as limit for maximum position indirectly, as it depends on the order's quantity. But my doubt is:

    EntriesPerDirection property refers to ONLY the maximum number of orders for one side, Long or Short, independently of its quantity, right ? So, if the order size is set "By the Strategy" , the maximum amount position will be variable as orders might come with different size.

    Is there any other way to set a maximum limit position ?

    #2
    Hello pstrusi,

    EntriesPerDirection property refers to ONLY the maximum number of orders for one side, Long or Short, independently of its quantity, right ?

    Correct.

    Is there any other way to set a maximum limit position ?

    Using the managed position there would be no good way to set a maximum limit position since changing the Strategy Parameters can come into play but you can check the "DefaultQuantity" variable inside of your code and make your strategy "return" if it is over a certain amount so it does not trade.
    JCNinjaTrader Customer Service

    Comment


      #3
      Simple question:

      Imagine that I have a LONG position of 400.000 EURUSD, and the Algo calculates that it has to change to a new SHORT position of 200.000, under managed orders, this would be as simple as to write:

      EnterShort (200000);

      The system by itself will close the LONG of 400.000 and open the SHORT of 200.000, right ?

      Comment


        #4
        Originally posted by pstrusi View Post
        ...

        Is there any other way to set a maximum limit position ?
        Of course. Just check Position.Quantity.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by giulyko00, Today, 12:03 PM
        0 responses
        4 views
        0 likes
        Last Post giulyko00  
        Started by AttiM, 02-14-2024, 05:20 PM
        12 responses
        213 views
        0 likes
        Last Post DrakeiJosh  
        Started by cre8able, 02-11-2023, 05:43 PM
        3 responses
        238 views
        0 likes
        Last Post rhubear
        by rhubear
         
        Started by frslvr, 04-11-2024, 07:26 AM
        8 responses
        117 views
        1 like
        Last Post NinjaTrader_BrandonH  
        Started by stafe, 04-15-2024, 08:34 PM
        10 responses
        47 views
        0 likes
        Last Post stafe
        by stafe
         
        Working...
        X