I am working on a buy/hold/sell indicator for the stock market. I have a tricky formula to code. What I need is to determine when the last order to buy or sell was. The newest dates are on the bottom. If yesterday was a buy then use that info to calculate the formula, but if it is a hold, then I need the range recorded until there was a buy or sell order. If it was a buy order then I need the max(dynamic range). If it was a sell order then I need the min(dynamic range).
So it should look like this.
Formula(If last change action was a Buy then IF(B5>Max(A2:A4)-C5),A6="Hold",A6="Sell") If it was a Sell order then IF(B5<Min(A2:A4)+C5,A6="Hold",A6="Buy") Also if it is a hold then leave D6 blank. I'm assuming it will need to be blank to use the counta function to figure out how far up to go when calculating the dynamic range. If not then this formula could take place in column A if you can figure out how to do it. I hope this is specific enough. If not ask me questions!
A B C D 1 Buy/Sell Close ARC Change Action 2 Buy 13 1 Buy (Calculated by formula) 3 Hold 13.5 1.2 4 Hold 13.7 1 6 ? 12 1.1 Formula
A2:A4 needs to be dynamically calculated based on how far it has to go to detect that change action.
Bookmarks