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

How do I exit my position and prevent buying outside of intraday time frame?

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

    How do I exit my position and prevent buying outside of intraday time frame?

    Yesterday I was charged $50 fee because my strategy entered a position at 3:59PM. This wasn't because buying conditions were met though. This entry happened with "Exit on Session Close" which my strategy had enabled.
    MNQ 12-20 Buy 1 11284.25 9/28/2020 12:05:00 PM 371934801664 Entry 1 L 1564220184 Buy $0.00 1 My NinjaTrader Continuum
    MNQ 12-20 Sell 1 11399.00 9/28/2020 3:45:53 PM 372020562688 Exit - 1564626556 External $0.00 1 My NinjaTrader Continuum
    MNQ 12-20 Sell 1 11390.00 9/28/2020 3:59:31 PM 372021071872 Entry 1 S 1564631538 Exit on session close $0.00 1 My NinjaTrader Continuum
    MNQ 12-20 Buy 1 11391.00 9/28/2020 3:59:36 PM 372021076480 Exit - 1564597138 External $0.00 1 My NinjaTrader Continuum
    I had a position and then an external close happened. I don't know why this happened.
    Then, on the session close, it entered a position instead of exiting.
    External immediately closed that.

    I'm not entirely sure why this all happened, so explanation would be nice. But, how do I prevent this and just exit at 3:45, like that first exit which was "external". I dont want this fee to happen again.
    My guess was to just disable the "exit on session close" and let the external close happen. My assumption is that this close came from the broker.

    #2
    Hello brettcomardelle93,

    External orders are orders that were not submitted from NinjaTrader. These could be from another computer or submitted by your broker.
    Contact your broker to inquire about the Order Id numbers of the orders you to see marked as External in NinjaTrader.

    The 'Exit on session close' and 'Exit on session close seconds'are settings in the Strategy parameters window that will automatically close any position opened by that instance of the strategy at the specified number of seconds before the end of the trading hours seconds.


    Uncheck Exit on session close if you do not want the position closed at the end of the session.

    In code these are set with:
    IsExitOnSessionCloseStrategy - https://ninjatrader.com/support/help...sestrategy.htm
    ExitOnSessionCloseSeconds - https://ninjatrader.com/support/help...oseseconds.htm
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Waxavi, Today, 02:10 AM
    0 responses
    3 views
    0 likes
    Last Post Waxavi
    by Waxavi
     
    Started by TradeForge, Today, 02:09 AM
    0 responses
    7 views
    0 likes
    Last Post TradeForge  
    Started by Waxavi, Today, 02:00 AM
    0 responses
    2 views
    0 likes
    Last Post Waxavi
    by Waxavi
     
    Started by elirion, Today, 01:36 AM
    0 responses
    4 views
    0 likes
    Last Post elirion
    by elirion
     
    Started by gentlebenthebear, Today, 01:30 AM
    0 responses
    4 views
    0 likes
    Last Post gentlebenthebear  
    Working...
    X