View Full Version : SplitVolume Indicator
On line 65 you have:
double tradeVol = previousVol == 0 ? Volume[0] : Volume[0] - previousVol;
I believe that this line can be simplified to:
double tradeVol = Volume[0] - previousVol;
but I'm guessing that you have a good reason why you've done it the way that you have - (or I've made a mistake and you can't simplify it like that).
NinjaTrader_Ray
04-12-2006, 12:34 PM
Thanks Guy,
If I am not mistaken, I believe this to initiliaze the value properly in the event that the indicator has not see a volume value before.
Ray
double tradeVol = previousVol == 0 ? Volume[0] : Volume[0] - previousVol;
Expanded out:
double tradeVol;
if(previousVol == 0) {
tradeVol = Volume[0];
} else {
tradeVol = Volume[0] - previousVol;
}
which implies that if previousVol was 0 then the tradeVol = Volume[0] - previousVol statement would result in the first assignment anyway.
Antraman
04-19-2006, 03:15 AM
The Split Vol indicator is a nice little tool. However, I notice that after opening the Indicator dialog window and pressing either OK or APPLY and when the chart screen resets, all the other price bars and indicators will flash back on as before, but all the volume bars have disappeared, and they begin to appear only from the time after pressing these buttons.
This means that hours of generated volume bar data is lost any time you wish to add or change any of the indicators on your chart window. Bummer...:X
Antraman
8-0
NinjaTrader_Ray
04-19-2006, 03:31 AM
Correct, the indicator is designed to work with real-time data only not historical.
Antraman
04-20-2006, 02:44 AM
Understood, but even in real time charting, is it supposed to blank out all the bars in the middle of a session if you simply open the indicator dialogue and press OK or APPLY?
It seems to me the chart refreshes and everything else stays but the vol bars start over anew...if thats the way it is supposed to be, so be it. I just thought it may have been an glitch.
cheers,
0
NinjaTrader_Ray
04-20-2006, 02:55 AM
That is the way it suppose to be. When you hit apply you are resetting all indicators. There is no way to get the data required historically to build this indicator.
Alfred
04-20-2006, 04:31 AM
How do you access this indicator ? Is it in the idicator list ?
Thanks....
NinjaTrader_Ray
04-20-2006, 06:20 AM
http://ninjatrader.mywowbb.com/forum14/873.html
Antraman
04-23-2006, 06:32 PM
Not meaning to sound like a pain, but the VOL and VOLColored indicator bars both remain showing after applying any changes within the Indicator Properties dialog...I don't understand why the Split Volume bars have to disappear...
cheers,
Antraman
0
NinjaTrader_Ray
04-24-2006, 01:13 AM
Split volume is calculated in realtime since it requires the current bid/ask price as part of its calculations. Current bid/ask price is not available as historical data from any data provider I know of therefore historical bars can't be calculated.
This could be partially resolved by writing this information to disk (I believe). Problem is that if you switch to a new instrument then there'd be no historic info.
Antraman
04-24-2006, 02:28 AM
But how come VOL and VolColoured are visible as historical data?
0