Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Shorting stocks

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

    Shorting stocks

    Hi,

    I have a strategy to short stocks. When testing with historical data everything is ok but when using the strategy at real-time short positions are automatically closed after 1 second and I do't see why.

    Is there anything I don't know I have to consider. Any tip?

    When entering a short position directly with TWS this doesn't happen.

    thanks

    #2
    Hello guillembm,

    Please enable TraceOrders by assigning TraceOrders = true; in the strategies Initialize() method. That will provide messaging related to strategy orders. Messaged are viewed in Tools > Output Window. There may also be messages you can see in the log tab of control center.

    Ryan M.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    39 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    19 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    26 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    35 views
    0 likes
    Last Post CarlTrading  
    Working...
    X