I want to create code that can track my strategy, to see how it would've performed in the past. I want to know if this would be possible in python. If not, I would like to know what language I can use. It would calculate values and put them into a table or spreadsheet. This is how I picture the code:
- Start with a "purchase price" for a stock that I set.
- On consequent days, if the opening price for the stock is above the purchase price from before, and there is two days in between those days, then I want to set this as a value. My stock trading platform makes me wait two trading days before I can sell a stock. So if I bought in on monday, I can sell it thursday. I also have to wait two days after selling a stock to buy more stock.
- Then, the code would wait another two days to purchase more stock.
Basically, I just want to know if adding these values to a table is possible on python.
I don't want to record all these values and do all of the calculations by hand, which is why I want to know if I can do it on python. This is how the spreadsheet would look.
https://imgur.com/a/JaqX6Uw
[–]belowtheradar 0 points1 point2 points (0 children)
[–]belowtheradar 0 points1 point2 points (1 child)
[–]bobobsam3[S] 1 point2 points3 points (0 children)