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 StockTrader88, 03-06-2021, 08:58 AM
      45 responses
      3,992 views
      3 likes
      Last Post johntraderuser2  
      Started by TAJTrades, Today, 09:46 AM
      0 responses
      7 views
      0 likes
      Last Post TAJTrades  
      Started by rhyminkevin, Yesterday, 04:58 PM
      5 responses
      62 views
      0 likes
      Last Post dp8282
      by dp8282
       
      Started by realblubb, Today, 09:28 AM
      0 responses
      8 views
      0 likes
      Last Post realblubb  
      Started by AaronKoRn, Yesterday, 09:49 PM
      1 response
      19 views
      0 likes
      Last Post Rikazkhan007  
      Working...
      X