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
How to set up a dataseries of volume of first 5 minutes ?
Collapse
X
-
How to set up a dataseries of volume of first 5 minutes ?
I am wondering if I can setup a dataseries of the volume traded in first 5 minutes everyday such that I can compare those volumes to see, say, if today first 5 minutes volume is bigger than the average volume traded of previous 5 days?Last edited by randomwalker; 05-29-2010, 11:33 PM.Tags: None
-
randomwalker, you could set a dataseries for exmaple for the first bar on the 5 minute chart only and then average those datapoints, however I think it would be easier to just store the first 5 min bar volume from the prior days in a double value and then compare as needed in your code.BertrandNinjaTrader Customer Service
-
I tried to code as follows(suppose I have already setup dataseries fbv):
if (Bars.BarsSinceSession == 0){fbv.Set(Volume[0]);}
else {fbv.Set(0);}
However, by coding like above, I think I get dataseries of Volume[0],0,0,....0. Is there any way to only store the first 5 minutes volume for everyday?
Comment
-
Originally posted by NinjaTrader_Bertrand View Postrandomwalker, unfortunately not as a value had to be stored for each bar a dataseries is synched to. You could try storing those values in a custom ArrayList for example.
Comment
-
I suggest you check into threads on this more general C# topic here in the forums, since this is unfortunately outside of the scope we can support here - http://www.ninjatrader.com/support/f...ad.php?t=24801BertrandNinjaTrader Customer Service
Comment
-
[QUOTE=NinjaTrader_Bertrand;169800]randomwalker, you could set a dataseries for exmaple for the first bar on the 5 minute chart only and then average those datapoints, however I think it would be easier to just store the first 5 min bar volume from the prior days in a double value and then compare as needed in your code.[/QUOTE
How to set up a dataseries for first-30-minute-volume? For example, if the whole 30-minute-volume data for two days are 1 2 3 4 5 6 7 8 9 10 11 12 13(for the first day) and 13 12 11 10 9 8 7 6 5 4 3 2 1 (for the second day), and the dataseries I want to set up only stores 1 and 13, 1 is the first-30-minute-volume for the first day and 13 is the first- 30 - minute-volume for the second day.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by PaulMohn, Today, 05:00 AM
|
0 responses
6 views
0 likes
|
Last Post
by PaulMohn
Today, 05:00 AM
|
||
Started by ZenCortexAuCost, Today, 04:24 AM
|
0 responses
6 views
0 likes
|
Last Post Today, 04:24 AM | ||
Started by ZenCortexAuCost, Today, 04:22 AM
|
0 responses
3 views
0 likes
|
Last Post Today, 04:22 AM | ||
Started by SantoshXX, Today, 03:09 AM
|
0 responses
16 views
0 likes
|
Last Post
by SantoshXX
Today, 03:09 AM
|
||
Started by DanielTynera, Today, 01:14 AM
|
0 responses
5 views
0 likes
|
Last Post
by DanielTynera
Today, 01:14 AM
|
Comment