comparing contracts in the current minute with the previous

rpwagner

New Member
Joined
Feb 28, 2002
Messages
22
I trade stocks for a living. I am trying to build a formula to do the following: Assume for example, that during the previous minute 12:47:00 to 12:47:59, there were a total 200 stocks sold (actually contracts). I want to be able to tell at the end of the first 15 seconds in the current time period (12:48:00 to 12:48:15), how many were sold and compare that with the previous minute (12:47:00 to 12:47:59 (total was 200). if for example, there were 200 sold the previouse minute , and within the first 15 seconds of the current minute, there were 800 sold, that tells me very quickly something big is happening (volume increasing dramitacally as 800 in the current 15 seconds is 4 times more than the entire previous minute!) and I can react quicker. I then would like to compare the first 30 seconds (12:48:00 to 12:48:30) to the previous minute etc, until i have compared the 4 quarters of the current minute with the previous minutes. I want an alarm to be triggured (in this example 4 times more in the first 15 seconds than last. I already have the data coming in real time into an existing spread sheet and need the formulase, vba etc in other cells to act on the time and nr of contracts already in the worksheet. Any help would greatly be appreciated.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Would conditional formatting work for you?

Don't know how you have your spreadsheet set up, but if the previous minute counts are in a specific cell and the current counts are cumulating in a specific cell, you could have the current minute cell (or another cell for that matter) turn to red if the current cell is larger than the previous minute cell. The formula for the condition could be a simple larger than (B>A) or a multiple ((B>(4*A)).
 
Upvote 0
yes, that would help and thanks. However, I need to know by 15 second intervals. Ideally if I knew that this 15 second interval was larger in number than the previous corresponding 15 second interval it would tip me off that something is happening very quickly...but I will definetly put in your suggestion
 
Upvote 0

Forum statistics

Threads
1,214,806
Messages
6,121,672
Members
449,045
Latest member
Marcus05

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top