I´m not expert at write code but i have some basic knowlodge of amibroker and Mestatock. I think i can translate the rules to both languages. Dont ask me about tradestation code.... i'm not that good.
Can you run your system on a random selection of other ETFs? Choose a period that is as long as possible.
#QQQIBSM1 system is on daily data. Entries are made on the open of next day after the signal. Exits are also on the next open day after the exit signal.
This is what you are competing against, QQQ buy and hold annual returns:
View attachment 189811
You are way under almost every year on your system so it is a lot of work and commission to underperform simple buy and hold. You started out beating it first 3 years then consistently underperformed so you need to rethink the strategy.