Hi,
I couldn't get the example below from knowledge base to work:
function preMain () {
}
var depthID = 0;
function main()
{
var SourceList = MarketDepth.getSources();
if (SourceList !=null)
{
depthID = MarketDepth.subscribe(SourceList[0]);
debugPrintln("DepthbidSize: " + MarketDepth.bidSize( depthID, 0 ));
debugPrintln("DepthaskSize: " + MarketDepth.askSize( depthID, 0 ));
}
MarketDepth.unsubscribe(DepthID);
}
SourceList comes out to be Null because MarketDepth.getSources() isn't giving a value. I subscribed to nasdaq total view and i'm getting data from esignal instead of other brokerage so am I suppose to get a value back when I call getsources()?. there's not enough explanation for these marketdepth functions.
ultimately i'm trying to save to a txt file level II data, ie bid/ask size and price and market maker ID to file for offline analysis. i'm new and I thought this is the way to go. I figure if I get this working I can build on it.
thanks for anyone's help.
I couldn't get the example below from knowledge base to work:
function preMain () {
}
var depthID = 0;
function main()
{
var SourceList = MarketDepth.getSources();
if (SourceList !=null)
{
depthID = MarketDepth.subscribe(SourceList[0]);
debugPrintln("DepthbidSize: " + MarketDepth.bidSize( depthID, 0 ));
debugPrintln("DepthaskSize: " + MarketDepth.askSize( depthID, 0 ));
}
MarketDepth.unsubscribe(DepthID);
}
SourceList comes out to be Null because MarketDepth.getSources() isn't giving a value. I subscribed to nasdaq total view and i'm getting data from esignal instead of other brokerage so am I suppose to get a value back when I call getsources()?. there's not enough explanation for these marketdepth functions.
ultimately i'm trying to save to a txt file level II data, ie bid/ask size and price and market maker ID to file for offline analysis. i'm new and I thought this is the way to go. I figure if I get this working I can build on it.
thanks for anyone's help.
Comment