- I moved the "Close Positions" section below the "Open Positions Stats" section. It seemed more coherent to place it in that position. It now works as follows: If there are open positions and the symbol is changed, the "Close" button will be disabled if there are no open positions in the selected symbol, requiring the use of the "Panic" button instead. This helps prevent unexpected bugs.
- Additionally, I improved order handling, and it should now function correctly. I also added checks for available margin, whether the symbol is tradable, and a few other validations.
- Now, when a market order is placed, the checkbox is automatically disabled to prevent accidental clicks.
- I have also made minor improvements.
In one of the next updates, I will try to implement:
- Order stacking;
- A checkbox to close positions as soon as they return slightly profitable;
- Trailing stop;
- Partial closing with the option to move to breakeven;
- And possibly other features that I can't think of right now.
Of course, I also extend my gratitude to all the other contributors. It wouldn’t be fair to praise only one when there are many truly outstanding ones.
Please note: This is a test code and should only be used in a demo environment.
Best regards,
Thoth