Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

TradeStation Reentrancy Error - places orders for wrong symbol

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

    TradeStation Reentrancy Error - places orders for wrong symbol

    I`m running a strategy in Tradestation build 1693 that uses the following code to place orders with IB:

    NewPositionID=NumToStr(BarNumber,0)+Symbol;

    if(LastBarOnChart and NTConnected(1)) then begin
    if(NTOrderStatus(NewPositionID)="") then begin

    Success=NTClosePosition(""); Success=NTBuyMarket(NewPositionID,NewPositionSize) ;

    When the order is triggered, Tradestation gives an error complaining about possible reentrancy issues. Worse than that however, is that if you have multiple charts running the same strategy on different symbols, it will mix up the symbol when it places the order. It just went short EURUSD when it should have gone short GBPUSD, and cost me several thousand dollars. The print statements I output indicate a real reentrancy problem, Is there a fix for this?

    #2
    Hi Idruna, to investigate this please send your log and trace files from this day to support at ninjatrader dot com Attn Bertrand and I will review them. In addition, TS is aware of the 'reentrancy issue' and is investigating at the moment. Did you run your strategies in separate workspaces?

    Comment


      #3
      I just emailed you the log and trace files. Am I supposed to run each strategy in a different workspace?

      Comment


        #4
        Thanks got the mail, you should not need a different workspaces when using the DLL interface.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        110 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        59 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        37 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        41 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        78 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X