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 Mindset, 04-21-2026, 06:46 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        144 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        71 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        125 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        79 views
        0 likes
        Last Post PaulMohn  
        Working...
        X