Anthony's VBA Forum Index Anthony's VBA Forum
Where the knowledge is shared
Menu
 Anthony's VBA Forum IndexHome Page
 Anthony's VBA Forum IndexForum Index
FAQFAQ
MemberlistMemberlist
UsergroupsUsergroups
RegisterRegister
ProfileProfile
Log in to check your private messagesMessages
Log inLogin/Out

Quick Search

Advanced Search

Links
Consulting
Products

Who's Online
[ Administrator ]
[ Moderator ]


Calculate Account value using different position size values

 
Post new topic   Reply to topic     Anthony's VBA Forum Index -> General Excel VBA
View previous topic :: View next topic  
Author Message
hkguy



Joined: 04 Dec 2008
Posts: 1

PostPosted: Thu Dec 04, 2008 4:52 am    Post subject: Calculate Account value using different position size values Reply with quote

Hi,

I'm looking for some help with the following problem:

In a spreadsheet I did for a running account total for a trading system, I have been able to automate everything using regular excel formulas EXCEPT the Equity of the account (column N). What I have done is use the formula

=(N95+((E95-Q95)*($P$94)))

Where N is Equity value, E is closing price, Q equals buy price, and P is position size.

This keeps the position size (cell P94) constant for the whole time the trade is on. However, after the 1st trade is exited, and the second trade is entered a new value for column P must be used.

Do you know of any way to do something like this:

IF Column K (is the trading signal column), changes from "-" (K93) to "+" (K94), THEN (N96):

=(N95+((E95-Q95)*($P$94)))

AND every col. N (i.e. N97, N98...) value after that

=(N96+((E96-E95)*($P$94))).

This goes until Col. K changes from "+" (K422) to "-" (K423) where (N425)

=(N424+((R424-E423)*$P$94))

Now that the trade is exited, the following col. N values do not change until a new "+" trading signal comes up in Col. K.

Now I need use a NEW Col. P value.

Does this make sense? Sorry it's long. Any help would be greatly appreciated.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Anthony's VBA Forum Index -> General Excel VBA All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group