![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Dec 2004
Location: , ,
Posts: 59
Thanks: 0
Thanked 0 times in 0 posts
|
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). |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
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
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: Dec 2004
Location: , ,
Posts: 59
Thanks: 0
Thanked 0 times in 0 posts
|
double tradeVol = previousVol == 0 ? Volume[0] : Volume[0] - previousVol;
Expanded out: Code:
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. |
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Aug 2005
Location: , ,
Posts: 258
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#5 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
Correct, the indicator is designed to work with real-time data only not historical.
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Aug 2005
Location: , ,
Posts: 258
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#7 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
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.
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#8 |
|
Senior Member
Join Date: Nov 2004
Location: Northern California
Posts: 981
Thanks: 14
Thanked 36 times in 30 posts
|
How do you access this indicator ? Is it in the idicator list ?
Thanks.... |
|
|
|
|
|
#9 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#10 |
|
Senior Member
Join Date: Aug 2005
Location: , ,
Posts: 258
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#11 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
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.
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#12 |
|
Member
Join Date: Dec 2004
Location: , ,
Posts: 59
Thanks: 0
Thanked 0 times in 0 posts
|
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.
|
|
|
|
|
|
#13 |
|
Senior Member
Join Date: Aug 2005
Location: , ,
Posts: 258
Thanks: 0
Thanked 0 times in 0 posts
|
But how come VOL and VolColoured are visible as historical data?
0 |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|