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?
    BertrandNinjaTrader Customer Service

    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.
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by bmartz, 03-12-2024, 06:12 AM
        4 responses
        31 views
        0 likes
        Last Post bmartz
        by bmartz
         
        Started by Aviram Y, Today, 05:29 AM
        4 responses
        12 views
        0 likes
        Last Post Aviram Y  
        Started by algospoke, 04-17-2024, 06:40 PM
        3 responses
        28 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by gentlebenthebear, Today, 01:30 AM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by cls71, Today, 04:45 AM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Working...
        X