Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Calling MarketData from DLL freezes Tradestation

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

    Calling MarketData from DLL freezes Tradestation

    I have create an study in tradestation that would plot the bid/ask from the connected data feed. I wrapped the following DLL symbols into TS functions:

    SubscribeMarketData
    UnsubscribeMarketData
    MarketData
    My indicator calls SubscribeMarketData then it calls the wrapper for MaketData passing the 0,1,2 for bid/ask/last.

    As soon as I load the indicator the whole tradestation freezes and I have to restart. I know the problem is in marketdata because when I comment/uncomment the problem shows/disappear.

    My MaketData is as follows:


    DefineDLLFunc: "NtDirect.dll", int, "MarketData", lpstr, double;
    inputs: PriceType(numericsimple);
    NTMarketData = MarketData(GetSymbolName, PriceType);


    Thanks,

    Moscu

    #2
    Incorrect declaration. Try
    DefineDLLFunc: "NtDirect.dll", int, "MarketData", lpstr, int;

    Where did you find the wrong one?

    Comment


      #3
      That did it

      Dierk,

      Thanks that help, but the return was also wrong so here is the correct version:

      DefineDLLFunc: "NtDirect.dll", double, "MarketData", lpstr, int;
      inputs: PriceType(numericsimple);
      NTMarketData = MarketData(GetSymbolName, PriceType);

      I think NT should wrap all this functions by default instead of the user having to do this.


      Moscu

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      111 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      60 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      38 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      43 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      79 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X