Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Change PositionSize when using Managed Approach

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

    Change PositionSize when using Managed Approach

    Hi there,

    I have the following general question:

    In the unmanaged approach for order methods there exits the method ChangeOrder(), which obviously allows to change certain characistics of an order (Quantity, LimitPrice, StopPrice).

    However I am working with the managed approach and would like to change just the quantity of the order. How can this best be done without closing the order and producing a new one?

    By the way to change to the unmanaged approach is not really an option for me, would need a lot of changes I assume. Is that correct?

    Best, Peter

    #2
    Hello unter821,

    Thank you for your post.

    You are correct, to change the order with the Managed Approach you will need to cancel the order and then resubmit the order.
    For a reference on using the CancelOrder() method please visit the following link: http://www.ninjatrader.com/support/f...ad.php?t=18890

    The Unmanaged Approach is reserved for experienced programmers, for more information on the Unmanaged Approach please visit the following link: http://www.ninjatrader.com/support/h...d_approach.htm

    Please let me know if I may be of further assistance.
    Last edited by NinjaTrader_PatrickH; 01-25-2012, 08:52 AM.

    Comment


      #3
      Ok, when I understand the concept correct I have to know already at the point of the entry, how I want to scale out later. In your case I EnterLONG 5 pieces two times to be able to scale out later with 5 pieces each. Is that correct?

      What can I do under the following scenario:
      - I enter a trade with a quantity of 2
      - During the trade my vola decreases and I add 1 quantity having a new total quantity of 3
      - For some reason my vola goes up dramatically and have to reduce my quantitiy by 2 to a total quantitiy of just 1

      Any way to handle that with the managed approach?

      Comment


        #4
        Hello unter821,

        Thank you for your response.

        With the Managed Approach each entry would need a specific signalName.

        So for your first condition you would enter with two separate EnterLong()s:
        if (Condition1)
        {
        EnterLong(1, "Signal1");
        EnterLong(1, "Signal2");
        }


        And then for your second condition you would enter once more with a specifc signalName:
        if (Condition2)
        {
        EnterLong(1, "Signal3");
        }


        Then once you need to reduce your quanitity by two, you can exit with the singalName:
        if (Condition3)
        {
        ExitLong(1, "Signal1");
        ExitLong(1, "Signal2");
        }


        For a reference on scaling out of a position using the Managed Approach please visit the following link: http://www.ninjatrader.com/support/f...ead.php?t=3751

        Please let me know if I may be of further assistance.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by AaronKoRn, Yesterday, 09:49 PM
        0 responses
        11 views
        0 likes
        Last Post AaronKoRn  
        Started by carnitron, Yesterday, 08:42 PM
        0 responses
        10 views
        0 likes
        Last Post carnitron  
        Started by strategist007, Yesterday, 07:51 PM
        0 responses
        12 views
        0 likes
        Last Post strategist007  
        Started by StockTrader88, 03-06-2021, 08:58 AM
        44 responses
        3,982 views
        3 likes
        Last Post jhudas88  
        Started by rbeckmann05, Yesterday, 06:48 PM
        0 responses
        10 views
        0 likes
        Last Post rbeckmann05  
        Working...
        X