Basically I think my strategy is OK.
To rebalance the buy operation every day before trading start, buy stocks which meet the fundamental criteria and are in the bottom_triangle.
Sell stocks in the method of handle_data when the price is at top_triangle.
The overall performance is quite good in these two months. However, when I look into the transaction data, I noted that sometimes my algorithm keeps selling the same stock for several times and buy them back later. It's quite weird. Because I expect the program to sell it only if they have been bought before.
Could anyone have a look at my program and tell me the reason..I'm quite confused.
Many thanks :)