Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Reverse a position by EnterLongLimit / EnterShortLimit order

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

  • NinjaTrader_ChelseaB
    replied
    Hello ManIp,

    If you are in a position and a stop loss created with set stop loss (or even if there were a working exit limit or stop order with exit methods) you would not be able to place an enter limit order. You can place market orders and immediately change the position, but this would not be possible with working orders.

    The issue is that since both orders are working, both orders could fill. This would cause the position to be double in the opposite direction which would be an unwanted position. Instead, when using the managed approach it is not allowed for two orders to be working if the second order is opposite to the position to prevent the possibility for the unwanted position if both orders were to fill at the same time.

    You would need to change to the unmanaged approach and code that logic manually.

    Below is a link to the help guide on the unmanaged approach.
    https://ninjatrader.com/support/help...d_approach.htm

    Leave a comment:


  • ManIp
    replied
    Hi Chelsea,

    Yes, I do have a SetStopLoss() set for my strategy. Is that means I can't use EnterLongLimit() if I have a SetStopLoss()? It seems not make sense and I think you must have some alternative solutions? Pls share the best practise, thanks!

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello ManIp,

    Are you checking the Output Window with TraceOrders enabled to see if you are getting orders ignored for violating the internal order handling rules?

    https://ninjatrader.com/support/help...antedPositions

    For example:
    "Methods that generate orders to enter a position will be ignored if:
    •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"

    Leave a comment:


  • Reverse a position by EnterLongLimit / EnterShortLimit order

    Hi,

    I have an automatic strategy developed for futures which allowed to Long or Short a futures, i.e. ES mini. At first I use the EnterLong() / EnterShort function for my strategy and it can automatically reverse my position. However, when I use the EnterLongLimit() / EnterShortLimit(), it can't reverse my position. It will stay with the initial position until it hit profit / stop loss order. Can anyone explain the reason and what should be done to make it happen?

    Because if use the EnterLong/EnterShort, it become market order which lead to higher execution price.

    Meantime, If I set an ExitShort + EnterLongLimit together under same condition, it happen theExitShort() executed on first bar then EnterLongLimit() executed at next bar. I actually want them execute at the same period! What can I do?

    Thanks!!


Latest Posts

Collapse

Topics Statistics Last Post
Started by ganeshkhere, Yesterday, 08:46 AM
3 responses
14 views
0 likes
Last Post NinjaTrader_Jason  
Started by REI140205, Yesterday, 06:17 PM
1 response
16 views
0 likes
Last Post NinjaTrader_Jason  
Started by prodigaltrader, Today, 12:18 AM
0 responses
9 views
0 likes
Last Post prodigaltrader  
Started by owenwong, Yesterday, 06:34 PM
2 responses
29 views
0 likes
Last Post owenwong  
Started by Gathem, Yesterday, 06:06 PM
1 response
21 views
0 likes
Last Post Gathem
by Gathem
 
Working...
X