Specification
Hi-
Project Goal:
Recreate a technical trading strategy currently running on TrendSpider. The strategy uses a rules-based entry/exit system built on three technical indicators and is fully backtestable in TrendSpider. This project involves porting the strategy over to MetaTrader 5, ensuring signal parity, and building a foundation for future enhancements such as smarter execution logic.
🧠 Concept Overview:
TrendSpider enables visual, no-code strategy creation using technical conditions. Once entry or exit conditions are met, trades are triggered at the open of the following bar (for entries) and exited at the close of the following bar (for exits).
We want to replicate this bar-based signal timing and indicator logic precisely in MT5 using MQL5.
There are 5 technical indicators that I track. We would need to capture the parameters for those indicators based on the user's preference. I have default values to provide. We would also have take profit and stop loss parameters in %, dollars, points, or ATR based which the user would enter during set up but again for which I will provide default values. The way that TrendSpider works is as follows; once the strategy entry conditions are met, the strategy looks to enter at the open of the following bar and similar for exit conditions, once the condition is met, the trade will exit at the close of the bar following the satisfaction of the exit conditions. Initial trade execution logic should be to simply buy/sell at market. Eventually, I want to introduce more sophisticated execution logic that prevents me from crossing the spread. I would like to try to exit at the offer (if long), if no fill after X seconds then place a mid mkt order, wait a few more X seconds and then execute at market in the worst case scenario.
🔁 Trade Management Rules:
-
Only 1 trade may be open at a time
-
Only 1 entry per signal/candle
-
Must hold trades for at least "X" bars - user's choice of parameter
-
Entry is at the next bar’s open
-
Exit is at the next bar’s close after conditions are met