I have a TradingView strategy written in Pine Script that executes market orders flawlessly, but as soon as a position should be opened by a pending order—limit or stop—it simply never fires. This happens under every trading condition I have tested, so the problem is systemic, not edge-case driven. Also there is 1 other bug with a statistic panel that requires modification with modification to a martingale multiple error. I need the script debugged and adjusted so that: • Pending trades actually trigger when price reaches the pre-defined levels. • Existing market-order functionality remains intact. • No new run-time errors or compilation warnings are introduced. The script will be shared Via TradingView so i can test prior to payment. Please deliver the corrected .pine file along with brief inline comments (or a short change log) outlining what you modified and why, so I can understand and maintain the code going forward. If additional inputs, user-defined settings, or structural changes are required, let me know early so we can keep the logic clean and transparent.