Research Article
Impact of Technical Indicators and Leading Indicators on Stock Trends on the Internet of Things
Algorithm 2
Simulate trades and calculate profit rate.
Input:: predict label; : closing price; | Output: Profit rate: | 1: initial , , , ; | 2: whiledo | 3: if then | 4: ; | 5: ; | 6: ; | 7: whiledo | 8: ifthen | 9: ; | 10: ; | 11: ; | 12: else | 13: ; | 14: end if | 15: end while | 16: end if | 17: ; | 18: end while | 19: if then | 20: | 21: end if | 22: |
|