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 rhyminkevin, Today, 04:58 PM
      4 responses
      52 views
      0 likes
      Last Post dp8282
      by dp8282
       
      Started by iceman2018, Today, 05:07 PM
      0 responses
      5 views
      0 likes
      Last Post iceman2018  
      Started by lightsun47, Today, 03:51 PM
      0 responses
      7 views
      0 likes
      Last Post lightsun47  
      Started by 00nevest, Today, 02:27 PM
      1 response
      14 views
      0 likes
      Last Post 00nevest  
      Started by futtrader, 04-21-2024, 01:50 AM
      4 responses
      50 views
      0 likes
      Last Post futtrader  
      Working...
      X