I would like to create a technical indicator to do backtest, however, I am still in learner stage and try to be intermediate level on coding. I hope I can get some helps and hints, please
the strategy is kind of momentum strategy that measure a stock for past 7 days
there are four criteria
1. if the price and volume today both are greater than yesterday, the stock get 2 points
2. if the price is greater than yesterday but the volume is lower than yesterday, the stock get 1 points
3.if the price is lower than yesterday but the volume is greater than yesterday, the stock get -2 points
4. if the price and volume today both are lower than yesterday, the stock get -1 points
then, the system will sum up the total point of a stock in past 7 days so that I can know which stock has better performance in past 7 days
Hope the explanation is clear. Please give me some hints.
Size:
Color:
Give this a try:
CODE:
Please log in to see this code.
Size:
Color:
Thank you so much.... it is exactly what I am looking for.
Size:
Color: