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 burtoninlondon, Today, 12:38 AM
      0 responses
      5 views
      0 likes
      Last Post burtoninlondon  
      Started by AaronKoRn, Yesterday, 09:49 PM
      0 responses
      14 views
      0 likes
      Last Post AaronKoRn  
      Started by carnitron, Yesterday, 08:42 PM
      0 responses
      11 views
      0 likes
      Last Post carnitron  
      Started by strategist007, Yesterday, 07:51 PM
      0 responses
      13 views
      0 likes
      Last Post strategist007  
      Started by StockTrader88, 03-06-2021, 08:58 AM
      44 responses
      3,982 views
      3 likes
      Last Post jhudas88  
      Working...
      X