Thank you in advance.
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Time and Sales and DOM data
Collapse
X
-
time and sales data differentiation
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?
Comment
-
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
Comment
-
lamass, for your use : have you already looked into the PowerVolume indicators, specifically the BuySellVolume we ship per default with our NinjaTrader?
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 ...) -
BertrandNinjaTrader Customer Service
Comment
-
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.BertrandNinjaTrader Customer Service
Comment
-
my system was not ok- on reinstallation it worked
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.
Comment
-
Dear Bertrand,
Thank you for your reply.
My problem is that after usindg this code :
protectedoverridevoid 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!
pssCan I compare it to something like 'Price' of 'last sale' or 'current price'?)
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by suroot, 02-25-2017, 04:43 AM
|
11 responses
2,548 views
0 likes
|
Last Post
by Zilvercat
Today, 05:36 PM
|
||
Started by Rogers101, 05-05-2024, 11:30 AM
|
16 responses
50 views
0 likes
|
Last Post
by Rogers101
Today, 04:44 PM
|
||
Started by ninza33, Today, 12:31 PM
|
2 responses
10 views
0 likes
|
Last Post
by ninza33
Today, 03:52 PM
|
||
Started by Bobin, 03-12-2024, 08:51 AM
|
15 responses
482 views
0 likes
|
Last Post
by fiddich
Today, 03:41 PM
|
||
Started by Skifree, Today, 11:21 AM
|
4 responses
15 views
0 likes
|
Last Post
by Skifree
Today, 03:41 PM
|
Comment