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 manueldecastro, Yesterday, 10:26 AM
|
5 responses
24 views
0 likes
|
Last Post Today, 05:06 AM | ||
Started by memonic, 05-01-2024, 01:23 PM
|
5 responses
30 views
0 likes
|
Last Post
by memonic
Today, 04:55 AM
|
||
Started by dcriador, Yesterday, 10:45 AM
|
2 responses
18 views
0 likes
|
Last Post
by dcriador
Today, 04:42 AM
|
||
Started by SnailHorn, Yesterday, 10:49 PM
|
1 response
10 views
0 likes
|
Last Post
by SnailHorn
Today, 03:59 AM
|
||
Started by TraderIqbal, 10-20-2023, 10:12 AM
|
2 responses
121 views
0 likes
|
Last Post
by Funnywo
Today, 02:03 AM
|
Comment