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

Info on Multiple order variables

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

    Info on Multiple order variables

    I am curious about how NinjaTrader will respond to a scenario. I am running into an issue that I am trying to debug and not having success with yet. Therefore, I think it may be important to know the way NinjaTrader will handle this in case I am trying to debug something that is not even possible within the Managed approach.

    I have multiple FX IOrder variables. For now, let's just use two and call them

    LongEntry
    ShortEntry

    And, we will assume that on Monday LongEntry is triggered and is an active trade for 50,000 units. Then it stays on overnight and the next day ShortEntry is triggered and is now an active trade 75,000 units. The Stop Loss for LongEntry is well below the entry point for ShortEntry and therefore LongEntry would continue to be an active trade when ShortEntry is executed.

    Therefore, what would be the result of this:
    1. Close LongEntry's trade and Enter Short Entry giving a net value of Short 75,000 units?
    2. Leave LongEntry as it is until it hits it's profit target, meanwhile enter a trade under ShortEntry giving a net position of Short 25,000 units?
    3. Some other possibility that I have not thought of?


    Thank you very much for your help!

    #2
    Originally posted by jg123 View Post
    I am curious about how NinjaTrader will respond to a scenario. I am running into an issue that I am trying to debug and not having success with yet. Therefore, I think it may be important to know the way NinjaTrader will handle this in case I am trying to debug something that is not even possible within the Managed approach.

    I have multiple FX IOrder variables. For now, let's just use two and call them

    LongEntry
    ShortEntry

    And, we will assume that on Monday LongEntry is triggered and is an active trade for 50,000 units. Then it stays on overnight and the next day ShortEntry is triggered and is now an active trade 75,000 units. The Stop Loss for LongEntry is well below the entry point for ShortEntry and therefore LongEntry would continue to be an active trade when ShortEntry is executed.

    Therefore, what would be the result of this:
    1. Close LongEntry's trade and Enter Short Entry giving a net value of Short 75,000 units?
    2. Leave LongEntry as it is until it hits it's profit target, meanwhile enter a trade under ShortEntry giving a net position of Short 25,000 units?
    3. Some other possibility that I have not thought of?


    Thank you very much for your help!
    The short order will be ignored because of the Managed Approach processing rules. Specifically:
    Methods that generate orders to enter a position will be ignored if:
    A position is open and an order submitted by an exit method (ExitLongLimit() for example) is active and the order is used to open a position in the opposite direction
    A position is open and an order submitted by a set method (SetStopLoss() for example) is active and the order is used to open a position in the opposite direction
    The strategy position is flat and an order submitted by an enter method (EnterLongLimit() for example) is active and the order is used to open a position in the opposite direction
    The entry signal name is not unique
    from this page in the NT Help: http://www.ninjatrader.com/support/h...d_approach.htm

    Comment


      #3
      Hello Jg123,

      Thank you for your post.

      Koganam is correct here.

      More specifically, the short order will get ignored because you have a protective orders for your long entry and the managed approached rules will not allow an Entry order to be placed while those orders are active.
      Cal H.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by algospoke, 04-17-2024, 06:40 PM
      3 responses
      26 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by bmartz, 03-12-2024, 06:12 AM
      3 responses
      28 views
      0 likes
      Last Post NinjaTrader_Zachary  
      Started by Aviram Y, Today, 05:29 AM
      2 responses
      9 views
      0 likes
      Last Post Aviram Y  
      Started by gentlebenthebear, Today, 01:30 AM
      1 response
      8 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by cls71, Today, 04:45 AM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Working...
      X