NexusFi: Find Your Edge


Home Menu

 





can one monitor time taken for each volume bar to complete?


Discussion in Sierra Chart

Updated
      Top Posters
    1. looks_one gidster with 6 posts (0 thanks)
    2. looks_two Sawtooth with 3 posts (2 thanks)
    3. looks_3 aslan with 2 posts (0 thanks)
    4. looks_4 Nicolas11 with 1 posts (0 thanks)
    1. trending_up 3,667 views
    2. thumb_up 2 thanks given
    3. group 4 followers
    1. forum 12 posts
    2. attach_file 0 attachments




 
Search this Thread

can one monitor time taken for each volume bar to complete?

  #1 (permalink)
gidster
London UK
 
Posts: 7 since Jun 2012
Thanks Given: 13
Thanks Received: 1

With Sierra Charts, is there a way by which one can 'see' how long it takes for each 'volume bar' to complete? I already have the 'remaining volume' study on my 'volume charts' (which shows how many contracts still remain till the current volume bar closes), but is there any feature within Sierra Charting which allows me to see the length of time it is taking for these 'volume bars' to 'close'?

Thanks,

gidster

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Futures True Range Report
The Elite Circle
Deepmoney LLM
Elite Quantitative GenAI/LLM
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
38 thanks
NexusFi site changelog and issues/problem reporting
27 thanks
GFIs1 1 DAX trade per day journal
19 thanks
The Program
18 thanks
  #2 (permalink)
 
aslan's Avatar
 aslan 
Madison, WI
 
Experience: Advanced
Platform: ALT
Trading: ES
Posts: 625 since Jan 2010
Thanks Given: 356
Thanks Received: 1,127

Sure, just look at the timestamps of the bars. SC bar timestamps are the beginning of the bar though. So for historical bars, you just need to compare the timestamp of a bar and the next timestamp to get the duration of the bar. Of course for the last bar on the chart that wont work. Instead for the last bar you can use sc.LatestDateTimeForLastBar, which is the timestamp of the last tick of the bar.

Reply With Quote
  #3 (permalink)
gidster
London UK
 
Posts: 7 since Jun 2012
Thanks Given: 13
Thanks Received: 1



aslan View Post
Sure, just look at the timestamps of the bars. SC bar timestamps are the beginning of the bar though. So for historical bars, you just need to compare the timestamp of a bar and the next timestamp to get the duration of the bar. Of course for the last bar on the chart that wont work. Instead for the last bar you can use sc.LatestDateTimeForLastBar, which is the timestamp of the last tick of the bar.

Aslan, thank you for this reply but as I am not an accomplished computer or even Sierra Charting expert, can you please describe more clearly how exactly I need arrange things such that I can monitor the time taken for each volume bar to complete?

Thanks,

gidster

Reply With Quote
  #4 (permalink)
 Sawtooth 
Prescott AZ USA
 
Experience: Advanced
Platform: SierraChart
Broker: Stage5, FCM:Dorman, Data:Denali, Routing:Teton
Trading: YM ES NQ
Posts: 474 since Nov 2009
Thanks Given: 216
Thanks Received: 603


gidster View Post
With Sierra Charts, is there a way by which one can 'see' how long it takes for each 'volume bar' to complete? I already have the 'remaining volume' study on my 'volume charts' (which shows how many contracts still remain till the current volume bar closes), but is there any feature within Sierra Charting which allows me to see the length of time it is taking for these 'volume bars' to 'close'?

Thanks,

gidster

Try this:

-Add the Spreadsheet Study study to your chart.
-Set the Chart Region to 2.
-Set the Scale to User Defined, Top of Range = to your volume bar period setting, Bottom of Range = 0.
-Give it a name in the Spreadsheet Name field.
-Set the Number of Rows to 10.
-Set the Draw Style to Bar, Width and Color to your choice.
-On the spreadsheet, put this in cell K3:
=IF(ROW()=3,F3,0)

This will grow a volume bar at the current bar only, as volume occurs.

Reply With Quote
  #5 (permalink)
 
aslan's Avatar
 aslan 
Madison, WI
 
Experience: Advanced
Platform: ALT
Trading: ES
Posts: 625 since Jan 2010
Thanks Given: 356
Thanks Received: 1,127

If you want to see the code or use a pre-done study, just check out the Bar Time Duration study.

The following is the code from studies7.cpp:

 
Code
SCSFExport scsf_BarTimeDuration(SCStudyInterfaceRef sc)
{
	SCSubgraphRef TimeDiff = sc.Subgraph[0];

	SCInputRef Multiplier = sc.Input[0];

	if (sc.SetDefaults)
	{
		sc.GraphName = "Bar Time Duration";
		sc.StudyDescription = "This study displays the time duration of a bar.";

		TimeDiff.Name = "Duration";
		TimeDiff.DrawStyle = DRAWSTYLE_BAR;

		sc.GraphRegion = 1;
		sc.ValueFormat = 20;
		sc.AutoLoop = 1;
	}

	if (sc.Index < sc.ArraySize - 1)
		TimeDiff[sc.Index] = (float)(sc.BaseDateTimeIn[sc.Index + 1] - sc.BaseDateTimeIn[sc.Index]);
	else
		TimeDiff[sc.Index] = (float)(sc.LatestDateTimeForLastBar - sc.BaseDateTimeIn[sc.Index]);
}

Reply With Quote
  #6 (permalink)
 
Nicolas11's Avatar
 Nicolas11 
near Paris, France
 
Experience: Beginner
Platform: -
Trading: -
Posts: 1,071 since Aug 2011
Thanks Given: 2,232
Thanks Received: 1,769

As a side-note, I think that the duration of the bar can also be shown as part of "Numbers Bars Calculated Values".

Visit my NexusFi Trade Journal Reply With Quote
  #7 (permalink)
gidster
London UK
 
Posts: 7 since Jun 2012
Thanks Given: 13
Thanks Received: 1


tomgilb View Post
Try this:

-Add the Spreadsheet Study study to your chart.
-Set the Chart Region to 2.
-Set the Scale to User Defined, Top of Range = to your volume bar period setting, Bottom of Range = 0.
-Give it a name in the Spreadsheet Name field.
-Set the Number of Rows to 10.
-Set the Draw Style to Bar, Width and Color to your choice.
-On the spreadsheet, put this in cell K3:
=IF(ROW()=3,F3,0)

This will grow a volume bar at the current bar only, as volume occurs.

Tomgilb many thanks for your suggestions which I just saw on returning from a short two days of golfing in sunny Wales. Can you please tell me which / where and what spreadsheet do I go to to enter the formula you provided? I would be most grateful for further clarification but in the meantime thanks a lot and I hope to hear further from you.

gidster

Reply With Quote
  #8 (permalink)
gidster
London UK
 
Posts: 7 since Jun 2012
Thanks Given: 13
Thanks Received: 1


aslan View Post
If you want to see the code or use a pre-done study, just check out the Bar Time Duration study.

The following is the code from studies7.cpp:

 
Code
SCSFExport scsf_BarTimeDuration(SCStudyInterfaceRef sc)
{
	SCSubgraphRef TimeDiff = sc.Subgraph[0];

	SCInputRef Multiplier = sc.Input[0];

	if (sc.SetDefaults)
	{
		sc.GraphName = "Bar Time Duration";
		sc.StudyDescription = "This study displays the time duration of a bar.";

		TimeDiff.Name = "Duration";
		TimeDiff.DrawStyle = DRAWSTYLE_BAR;

		sc.GraphRegion = 1;
		sc.ValueFormat = 20;
		sc.AutoLoop = 1;
	}

	if (sc.Index < sc.ArraySize - 1)
		TimeDiff[sc.Index] = (float)(sc.BaseDateTimeIn[sc.Index + 1] - sc.BaseDateTimeIn[sc.Index]);
	else
		TimeDiff[sc.Index] = (float)(sc.LatestDateTimeForLastBar - sc.BaseDateTimeIn[sc.Index]);
}

Aslan, I have no idea where I should be entering all you wrote ... if you could help a novice with step by step instructions I shall willingly try and see what I can do with your suggestions at my end. But many thanks for troubling to send me your response.
Gidster

Reply With Quote
  #9 (permalink)
 Sawtooth 
Prescott AZ USA
 
Experience: Advanced
Platform: SierraChart
Broker: Stage5, FCM:Dorman, Data:Denali, Routing:Teton
Trading: YM ES NQ
Posts: 474 since Nov 2009
Thanks Given: 216
Thanks Received: 603


gidster View Post
Tomgilb many thanks for your suggestions which I just saw on returning from a short two days of golfing in sunny Wales. Can you please tell me which / where and what spreadsheet do I go to to enter the formula you provided? I would be most grateful for further clarification but in the meantime thanks a lot and I hope to hear further from you.

gidster

Here is an even more explicit list of instructions:

-Focus your volume chart, press F6, add the Spreadsheet Study study from the left window to the right window.
On the Settings and Inputs tab:
-Set the Chart Region to 2.
-Press the Scale button and set the Scale Range to User Defined, the Top of Range = to the same value as your volume per bar setting (F5 >> Bar Period >> Volume per Bar), and the Bottom of Range = 0.
-Give it a name in the Spreadsheet Name field, e.g. Volume-o-meter.
-Set the Input Name >> Number of Rows to 10. No need to change any other Input Values.
On the Subgraphs tab:
-Set the Draw Style of K (SG1) to Bar
-Set the Color and Width to your choice.
-Press OK and OK.
When the spreadsheet appears, put this in cell K3:
=IF(ROW()=3,F3,0)

FYI re: spreadsheet studies:
-By default, the sheet#/tab position directly correlates to the chart number, so enter the formula on the sheet # that matches the chart #. Ignore the other sheets, if any.
-You can minimize the spreadsheet; it does not need to be visible.

Reply With Quote
Thanked by:
  #10 (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


SC offers a Bar Time Duration study . It will plot the duration of bars. Just click "F6" and add it to your chart.

Follow me on Twitter Reply With Quote




Last Updated on September 7, 2012


© 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