NexusFi: Find Your Edge


Home Menu

 





Cumulative Volume Study


Discussion in Sierra Chart

Updated
      Top Posters
    1. looks_one omni72 with 12 posts (5 thanks)
    2. looks_two vegasfoster with 7 posts (7 thanks)
    3. looks_3 FGBL07 with 3 posts (6 thanks)
    4. looks_4 ChrisTinaBruce with 3 posts (1 thanks)
      Best Posters
    1. looks_one Jigsaw Trading with 3.5 thanks per post
    2. looks_two FGBL07 with 2 thanks per post
    3. looks_3 vegasfoster with 1 thanks per post
    4. looks_4 omni72 with 0.4 thanks per post
    1. trending_up 15,526 views
    2. thumb_up 36 thanks given
    3. group 13 followers
    1. forum 37 posts
    2. attach_file 8 attachments




 
Search this Thread

Cumulative Volume Study

  #11 (permalink)
 
josh's Avatar
 josh 
Georgia, US
Legendary Market Wizard
 
Experience: None
Platform: SC
Broker: Denali+Rithmic
Trading: ES, NQ, YM
Posts: 6,245 since Jan 2011
Thanks Given: 6,782
Thanks Received: 18,254


omni72 View Post
My eventual goal is to be able to filter by day types.

This type of statistical analysis is probably best for outside the trading platform, via excel or some other similar program. There are some resources on the forum for this kind of thing, including exporting data into a mysql and doing queries based on that for certain types of analysis.

Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
REcommedations for programming help
Sierra Chart
How to apply profiles
Traders Hideout
ZombieSqueeze
Platforms and Indicators
Trade idea based off three indicators.
Traders Hideout
What broker to use for trading palladium futures
Commodities
 
  #12 (permalink)
 
omni72's Avatar
 omni72 
Tulsa, OK
 
Posts: 348 since Jan 2012
Thanks Given: 582
Thanks Received: 624


josh View Post
This type of statistical analysis is probably best for outside the trading platform, via excel or some other similar program.

Agreed and thanks for bringing up that point. I'm envisioning more of a separate spreadsheet/database or possibly even a dashboard type interface. Either way, it's not something I think has to be on the chart itself.

Luck is what happens when preparation meets opportunity. ~ Seneca
Started this thread Reply With Quote
  #13 (permalink)
 
Jigsaw Trading's Avatar
 Jigsaw Trading  Jigsaw Trading is an official Site Sponsor
 
Posts: 2,988 since Nov 2010
Thanks Given: 831
Thanks Received: 10,393



omni72 View Post
Thanks for the input, but, as vegasfoster indicates, I'm using Sierra so I can't use Ninja indicators.
:

Understood but if you take a look @ the code.....

 
Code
      protected override void OnBarUpdate()
        {
            // Use this method for calculating your indicator values. Assign a value to each
            // plot below by replacing 'Close[0]' with your own formula.
			if (FirstTickOfBar) 
			{
				if (Bars.FirstBarOfSession)
				{
					barCounter = 0;
					cVol = 0;
				}
				else
				{
					cVol = cVol + Volume[1];
				}
				barCounter ++;
				tempNOC = numberOfOccurences[barCounter];
				tempVol = avgVolAtTime[barCounter] * numberOfOccurences[barCounter];
				averageVolume = (tempVol / tempNOC);				
			} 
			
            cumulativeVolume = (cVol + Volume[0]);
            numberOfOccurences[barCounter] = tempNOC + 1;
			avgVolAtTime[barCounter] = (cVol + Volume[0] + tempVol) / numberOfOccurences[barCounter];
			CumulativeVolumeDiff.Set(cumulativeVolume - avgVolAtTime[barCounter]);
		}
You'll see there is very little to it. I think you could port it to Sierra pretty easily

Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #14 (permalink)
 FGBL07 
Oberhausen, Germany
 
Experience: Advanced
Platform: Sierracharts
Broker: Interactive Brokers/DTN IQFeed
Trading: Bund Future
Posts: 277 since Aug 2011
Thanks Given: 100
Thanks Received: 311

Here is the spreadsheet I'm using. Though it is hard to use because I input the data each evening manually (copy and paste). Something people don't like.

Attached Files
Elite Membership required to download: MySCVolumeProfile.zip
Follow me on Twitter Reply With Quote
  #15 (permalink)
 
omni72's Avatar
 omni72 
Tulsa, OK
 
Posts: 348 since Jan 2012
Thanks Given: 582
Thanks Received: 624


DionysusToast View Post
Understood but if you take a look @ the code.....

 
Code
      protected override void OnBarUpdate()
        {
            // Use this method for calculating your indicator values. Assign a value to each
            // plot below by replacing 'Close[0]' with your own formula.
			if (FirstTickOfBar) 
			{
				if (Bars.FirstBarOfSession)
				{
					barCounter = 0;
					cVol = 0;
				}
				else
				{
					cVol = cVol + Volume[1];
				}
				barCounter ++;
				tempNOC = numberOfOccurences[barCounter];
				tempVol = avgVolAtTime[barCounter] * numberOfOccurences[barCounter];
				averageVolume = (tempVol / tempNOC);				
			} 
			
            cumulativeVolume = (cVol + Volume[0]);
            numberOfOccurences[barCounter] = tempNOC + 1;
			avgVolAtTime[barCounter] = (cVol + Volume[0] + tempVol) / numberOfOccurences[barCounter];
			CumulativeVolumeDiff.Set(cumulativeVolume - avgVolAtTime[barCounter]);
		}
You'll see there is very little to it. I think you could port it to Sierra pretty easily

Thanks DT, I may give it a shot. I'm not a coder though, so it doesn't take much to exhaust my programming skills


FGBL07 View Post
Here is the spreadsheet I'm using. Though it is hard to use because I input the data each evening manually (copy and paste). Something people don't like.

Thanks FB, appreciate your contribution and sharing. As I get my own into some reasonable state of usefulness, I will post it here as well.

Luck is what happens when preparation meets opportunity. ~ Seneca
Started this thread Reply With Quote
  #16 (permalink)
 vegasfoster 
las vegas
 
Experience: Intermediate
Platform: Sierra Chart
Broker: Velocity/IB
Trading: 6E
Posts: 1,145 since Feb 2010
Thanks Given: 304
Thanks Received: 844

I looked at this today and I looked at DT's code. DT's code looks like it just starts at the first bar of the session. I was going to make the time selectable, but I would need to do a for statement to reference prior days in a range of time, and I've never done that so not sure how it will work out. Was also thinking of having the option of comparing the current bar only to the previous average of the same prior days' bars as opposed to the cumulative for the time range, which I think will be simpler. To clarify, I'm pretty slow at this and am taking this on as a learning exercise, so again, if someone more proficient wants to crank this out, then I will not be offended.

Reply With Quote
Thanked by:
  #17 (permalink)
 vegasfoster 
las vegas
 
Experience: Intermediate
Platform: Sierra Chart
Broker: Velocity/IB
Trading: 6E
Posts: 1,145 since Feb 2010
Thanks Given: 304
Thanks Received: 844

I need help on this. To use time as I know how I need to correlate the sc.Index to the time somehow and I can't figure a way to do that. Below is my initial thought process, but right now the StartIndex integer is null.

 
Code
	SCDateTime& IndexDateTime =  sc.BaseDateTimeIn[sc.Index];
	        
        bool InputsReversed = (EndTime.GetTime() > StartTime.GetTime());
	if (InputsReversed)
	{
                Int StartIndex = ?????  <---Somehow identify the first sc.Index after the StartTime as StartIndex
                Int Length = sc.Index - StartIndex;
	
	        float Sum = 0.0f;
		for (int InIndex = sc.Index - (Length - 1); InIndex <= sc.Index; InIndex++)
		{
		Sum += sc.Volume[InIndex];
		}
	
	float Volume = Sum;
	CumulativeVolume[sc.Index] = Volume;
If @ktrader or @aslan or @pbeguin or someone else good could help that would be great. Thank you.

Reply With Quote
Thanked by:
  #18 (permalink)
 
ktrader's Avatar
 ktrader 
glostrup, denmark
 
Experience: Advanced
Platform: Custom platform
Broker: CQG
Trading: Futures, Options, Stocks
Posts: 249 since Aug 2011
Thanks Given: 152
Thanks Received: 275


vegasfoster View Post
I need help on this. To use time as I know how I need to correlate the sc.Index to the time somehow and I can't figure a way to do that. Below is my initial thought process, but right now the StartIndex integer is null.

 
Code
	SCDateTime& IndexDateTime =  sc.BaseDateTimeIn[sc.Index];
	        
        bool InputsReversed = (EndTime.GetTime() > StartTime.GetTime());
	if (InputsReversed)
	{
                Int StartIndex = ?????  <---Somehow identify the first sc.Index after the StartTime as StartIndex
                Int Length = sc.Index - StartIndex;
	
	        float Sum = 0.0f;
		for (int InIndex = sc.Index - (Length - 1); InIndex <= sc.Index; InIndex++)
		{
		Sum += sc.Volume[InIndex];
		}
	
	float Volume = Sum;
	CumulativeVolume[sc.Index] = Volume;

@vegasfoster, i think sc.GetNearestMatchForSCDateTime passing the current chart as chartnumber does it.

--ktrader

Reply With Quote
Thanked by:
  #19 (permalink)
 
omni72's Avatar
 omni72 
Tulsa, OK
 
Posts: 348 since Jan 2012
Thanks Given: 582
Thanks Received: 624

Still tinkering with this project, so I'm glad to see a few others are making their own go of it

Got a little sidetracked working on a trade-size study. I was actually able to get most of that one done, so I'm returning my focus to this task.

Luck is what happens when preparation meets opportunity. ~ Seneca
Started this thread Reply With Quote
  #20 (permalink)
 vegasfoster 
las vegas
 
Experience: Intermediate
Platform: Sierra Chart
Broker: Velocity/IB
Trading: 6E
Posts: 1,145 since Feb 2010
Thanks Given: 304
Thanks Received: 844


I'm making some progress with @ktrader idea, it's doing something, unfortunately just not what I want yet.

Reply With Quote
Thanked by:




Last Updated on August 13, 2018


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts