View Full Version : Time and Sales and DOM data
SuzyG
12-17-2006, 06:21 PM
Is there a way to retrieve the activity in the Time and Sales window and the number of contracts sitting at each level in the DOM?
Thank you in advance.
NinjaTrader_Dierk
12-17-2006, 08:30 PM
Not supported at this point.
lamass
01-23-2012, 10:29 PM
Am I understanding well that NinjaTrader does not support a way to differentiate (in the Time and Sales window), while using the function OnMarketData (in the script window when making indicators) the difference between:
At Ask,
At Bid,
Below Bid and
Above Ask?
If so, what is the use. One of the most important finctions is omited. I am almost suspicious as to "WHY?
Please let me know if I can control how much shares have been sold or bought against the Last Price. That is so simple- that is confusing me as to why it is not supported (if so).
How can I solve that problem? Get another software?
lamass
01-23-2012, 11:04 PM
Dear Dierk/NT
I would like to make calculations on the actual sales data (what was sold/bought, and how much of it). That is the Time and Sales window. How can I translate its propertis into functions in the script? I also tried to use the OnMarketData but get either [mixed ask and bid entries] or altogether mixed [the ask/bid from Level II and the actual up/down sales]. I would like to differentiate them. The e.Price function gives it to me but all of them mixed. Is there a function that I can call and COMPARE WHAT IS ASK AND WHAT IS BID (from the sold shares) AGAINST THE LAST PRICE?
If so, please let me know. If not so, the I need to consider getting another software.
pss:
Also, is there a simple way to make a variable and find out whether the last sale was lower or higher then the LAST Price?
Thanks, lamass
NinjaTrader_Bertrand
01-24-2012, 03:22 AM
lamass, for your use : have you already looked into the PowerVolume indicators, specifically the BuySellVolume we ship per default with our NinjaTrader?
http://www.ninjatrader.com/support/helpGuides/nt7/power_volume_indicators.htm
Their code would be open as well so you could review for your own projects.
For working in OnMarketData / OnMarketDepth, please be sure to filter the events returned by what event arg called the method (i.e bid / ask / last ...) -
http://www.ninjatrader.com/support/helpGuides/nt7/marketdataeventargs.htm
lamass
01-24-2012, 04:06 AM
Thank you. Would you refer me to any reference as to how to filter the OnMarketData.Last ? Basically I get it all meshed with the ask/bid from level II- while I need just the bid/ask of the already bought/sold shares.
Thanks for your help.
lamass
NinjaTrader_Bertrand
01-24-2012, 04:11 AM
To work on the current .Last event only, just put your logic after this if () condition:
protected override void OnMarketData(MarketDataEventArgs e)
{
if (e.MarketDataType == MarketDataType.Last)
}
This would then not react then to any bid / ask / other args the OnMarketData() would normally be called for as well.
lamass
01-25-2012, 02:15 AM
Hi, Thanks for the tips!
I'm trying to convert an indicator (already existing from NT) to my needs and get an error that I can not. I also can not just copy and paste the code in a different file. Is there a way to use the existing indicators- and then experiment with adding code? And how?
thanks, lamass
this post is not relevant. On reinstallation it worked. One can copy and paste code form existing indicators- and work with them.
lamass
01-25-2012, 03:07 AM
Dear Bertrand,
Thank you for your reply.
My problem is that after usindg this code :
protected override void OnMarketData(MarketDataEventArgs e)
{
if (e.MarketDataType == MarketDataType.Last)
Print("Last = " + e.Price + " ....." + e.Volume);
//I get BOTH sales at the bid and at the ask price.
//If I add this code:
if (e.MarketDataType == MarketDataType.Ask)
Print("Ask = " + e.Price + " ....." + e.Volume);
}
then I get also the Level II, intermeshed- which is a chaos of data.
I want to just work with the bid and ask from the actual Sales window. How can I divide the 'MarketDataType.Last' into the 'ask' and 'bid' sales? That is the question Now!
Thank you for your help!
pss:(Can I compare it to something like 'Price' of 'last sale' or 'current price'?)
NinjaTrader_Bertrand
01-25-2012, 04:07 AM
lamass, I have just replied to your note sent directly to support this morning.