Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Delta Buy/Sell Volume
Collapse
X
-
I've done quite a bit of work with this code, and believe it does miss some ticks / volume. It is very close, but might not catch 100% of transactions.
Not sure if this was due to my modifications or not, but the base code for determining and calculating buys, sells & corresponding volume was not changed. I made a version that reported the per bar delta, and displayed both buy & sell volume as bars. On a constant volume bar chart, you can soon see that the buy + sell bar total does not always equal the volume bar total.
Comment
-
FYI, I downloaded the code posted by Pepperdog on 11/28. I apologize if this has been discussed however I will assume it hasn't since the issue is still evident in the code. Long story short, the code is not correct. It is comparing the last sale to bid/ask incorrectly. Rather than determining the bid/ask prices *prior* to the sale, it is doing it at the time of the sale. Subtle but significant difference.
See this thread for the proper approach. http://www.ninjatrader-support2.com/...ad.php?t=10288
That being said, I've developed a cumulative delta indicator per NT instructions however I'm being told from someone using IRT this is still incorrect. Having double and triple checked my logic, I'm at a lost as to why NT remains inconsitent with the IRT display.
NT: please comment on this logic:
Grab ask/bid prices each time they change (using OnMarketData == Ask/Bid)
Grab sales each time they go through (using OnMarketData == Last)
Compare sale price to ask/bid price
Update delta with new sale. (e.g. if sale was @ bid, subtract vol from delta. Vice versa for ask)
Is this correct?
Comment
-
chuckt101,
We cannot comment on how this custom indicator is suppose to work or if it is working or not. This is a matter you need to bring up with the original author.
As far as delta logic goes, we are not delta experts either and could not advise you on how to calculate it.Josh P.NinjaTrader Customer Service
Comment
-
Originally posted by NinjaTrader_Josh View Postchuckt101,
We cannot comment on how this custom indicator is suppose to work or if it is working or not. This is a matter you need to bring up with the original author.
As far as delta logic goes, we are not delta experts either and could not advise you on how to calculate it.
Disregard delta logic; Am I grabbing ask vs. bid sales correctly? This is something you show in T&S and have previously addressed in the post I linked. Like I said, the result was not what I expected and hence was wondering if there is a bug or incorrect information passed by your staff previously.
Comment
-
Sbgtrading. Great job on the indicator.
However, some people on this forum have suggested it is not QUITE right.
I dont have a CLUE about coding ect, but someone posted the following hint on how to fix it:
if (e.MarketDataType == MarketDataType.Last){
curTick = e.Price;
if (curTick >= askPrice){
deltaVol += e.Volume;
}
if (curTick <= bidPrice){
deltaVol -= e.Volume;
}
}
else if (e.MarketDataType == MarketDataType.Ask){
askPrice = e.Price;
}
else if (e.MarketDataType == MarketDataType.Bid){
bidPrice = e.Price;
}
Can you make heads or tails of this?
If so, and you feel inclined to upgrade your version with the above code, would it also be possible to make the data candlesticks?
Thanks
Comment
-
New version of indicator posted
The calculation method of this indicator has been changed...and the new version is now residing at Post #1 of this thread.
Also, the new indicator does let you specify a Minimum Volume per transaction, thereby letting you eliminate low volume transactions from the accumulation.
NOTE: If you're running this indicator and find the plot is not moving from the zero line, then you may have your MinimumVolume parameter value up too high. If it's too high, you will "miss" all trades below that volume level.
Enjoy!
Comment
-
The cumulative line of this indicator does not update by tick . You can set the
" up date on bar close " to false and it still doesn't make any difference . Look
at it on a 1 min chart . The only time it moves is when a new bar starts . I
don't think it should be like this .
Comment
-
DeltaBuySellIndicator
You could open a small time-frame tick chart like 20 ticks or smaller and you would be able to capture the rhythm of the volume, please try.
Comment
-
Not a problem folks...I posted a new version that updates the cumulative line on every tick. The new indicator is attached to Post #1.
Enjoy!
Ben
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by morrnel, 05-12-2024, 06:07 PM
|
3 responses
34 views
0 likes
|
Last Post
by wzgy0920
Today, 12:23 AM
|
||
Started by FishTrade, Yesterday, 11:11 PM
|
0 responses
5 views
0 likes
|
Last Post
by FishTrade
Yesterday, 11:11 PM
|
||
Started by Austiner87, Yesterday, 03:42 PM
|
1 response
21 views
0 likes
|
Last Post Yesterday, 07:38 PM | ||
Started by cshox, Yesterday, 11:11 AM
|
2 responses
16 views
0 likes
|
Last Post
by cshox
Yesterday, 07:21 PM
|
||
Started by algospoke, Yesterday, 06:53 PM
|
0 responses
11 views
0 likes
|
Last Post
by algospoke
Yesterday, 06:53 PM
|
Comment