Hi everybody, I am having a bit of trouble with this algorithm. It's a simple buy low and sell high algorithm for a simple market ETF that I am testing out before I try on some fancier algorithms.
This algorithm seemed to just run 3-4 transactions and stopped.
In the code, I had the profit_ratio set to 1.05.
The final purchase was on 2012-05-21 for 160 shares of VTI at $66.71.
When the price of VTI later exceeded 70.0455, a sell order was not executed.
Would anybody be able to explain to me if there is anything in this code that is preventing it from selling again?
Furthermore, is this code checking the price of the stock at every minute? If not, is there a way to make it do so?
Thanks!