Hello All,
I know this sounds easy, but I just can't figure out a way to do it accurately. Here's the simplified scenerio: I have column(B) with a current price of a stock, B is updated daily and always has a value. I have a column (C) that has the total number of shares currently held, C can sometimes be zero. I have a buy signal column(K) that is frequently zero, but sometimes gives me a buy signal in number of shares. And I have a sell column (M) that also is frequently zero, but gives sell signals in number of shares. Last I have a total cost of shares column (N) which *tries* to calculate the cost of shares currently held so I can divide that by the current stock price (B) to get average cost per share.
The main problem I have is when I get a sell signal, how do I calculate what amout to subtract form the total cost of shares? I tend to end up with a negative number because I pull shares out at higer prices and put them in at lower prices, so over time the total cost of shares goes negative. There must be a simple solution, but I just can't see it. Any help would be appreciated. Thanks,
Banjanxed
I know this sounds easy, but I just can't figure out a way to do it accurately. Here's the simplified scenerio: I have column(B) with a current price of a stock, B is updated daily and always has a value. I have a column (C) that has the total number of shares currently held, C can sometimes be zero. I have a buy signal column(K) that is frequently zero, but sometimes gives me a buy signal in number of shares. And I have a sell column (M) that also is frequently zero, but gives sell signals in number of shares. Last I have a total cost of shares column (N) which *tries* to calculate the cost of shares currently held so I can divide that by the current stock price (B) to get average cost per share.
The main problem I have is when I get a sell signal, how do I calculate what amout to subtract form the total cost of shares? I tend to end up with a negative number because I pull shares out at higer prices and put them in at lower prices, so over time the total cost of shares goes negative. There must be a simple solution, but I just can't see it. Any help would be appreciated. Thanks,
Banjanxed