Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

exit position - new entry

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

    exit position - new entry

    Hello,

    I have in my script Exitshort() before doing the enterlong when conditions are true. But there are more short positions closed than have been in the trade. Thats strange and cant find the reason.In the attached screenshot one can see that the short rS1a and rS1b from a trade and they are closed with Buy-To-Cover and Close Position. Where might this Close Position come from, is this maybe by default from NinjaTrader before doing a trade in the other direction?

    Thank you!
    Tony​
    Attached Files
    Last edited by tonynt; 01-24-2024, 04:31 PM. Reason: translation error

    #2
    Hello tonynt,

    Thank you for your post.

    In the Unmanaged Approach, an Enter() method in the opposite direction will automatically reverse the position. The internal order handling rules attempt to prevent the unwanted position you have described, though the rules do not apply to market orders, such as ExitShort() and ExitLong(). In your script, you can remove the ExitShort() and the new entry will result in two orders - one to close the short position and another to enter the long position. This is noted in the help guide here:
    • https://ninjatrader.com/support/help...d_approach.htm
      • "Entry() methods will reverse the position automatically. For example if you are in a 1 contract long position and now call EnterShort() -> you will see 2 executions, one to close the prior long position and the other to get you into the desired 1 contract short position."
    Please let us know if we may be of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Today, 05:17 AM
    0 responses
    51 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    127 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    69 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    42 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X