Running totals based on single RTD cells updating.

DrLight

New Member
Joined
Jun 3, 2014
Messages
11
Hi.

Please forgive my inexperience - first post.

Im using RTD to pull in financial data from a stock simulator. My objective is to calculate Volume Weighted Average Price (VWAP) on a continual basis every time a trade occurs. VWAP = (Cumulative(Last price * Last volume) / cumulative Volume)

Here's what my RTD looks like:
BIDSIZEBIDASKASKSIZECummulative VOLUMELAST PriceLAST VOLPrice * QTYΣ (Price* QTY) Σ VOLCurrent VWAP
T.TO40046.7446.7510025106646.74

<colgroup><col span="2"><col span="2"><col><col><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>

Note: Columns Bidsize through Last Price update automatically as the simulator pushes data to RTD. The other columns are for illustration of how I've been approaching this problem.

I figure I need to manipulate the data comming from RTD as follows:

"New volume" - "old volume" = Last Vol
// since the simulator only sends cumulative volume i have to get Last Vol every time there is a trade.

Last Vol * Last Price
//multiply Last vol * last price every trade

Then I need a 1: cummaltive sum of all those Last vol * Last Price calculations. Σ (Price* QTY)

Then I need 2: cumulative sum of All the Last Volumes. Σ VOL

Then I need to divide 1/2 (above). and tada I have my Current VWAP calculation.

Easier said than done, I've tried formulas and 2 macros but cant figure out how to make this work given all the changes are happening in individual cells. I cant even get Last Vol. I think that would be a first step here.

Thanks for any help!!!

-DLight
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
If I could use a formula to do a running total in a cell that might work: like this =IF(CELL("address")="$F$7",F7+A8,A8) Where my running total goes in cell A8.
 
Upvote 0

Forum statistics

Threads
1,215,461
Messages
6,124,958
Members
449,200
Latest member
indiansth

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