TTM Grid Strategy by HamoonSoleimani
By HamoonSoleimani
Performance Metrics
- Author: HamoonSoleimani
- Symbol: FX:AUDCHF
- Timeframe: 4 hours
- Net P&L: +216.83 CHF (+2.16%)
- Win Rate: 64.0%
- Profit Factor: 2.407
- Max Drawdown: 95.81 CHF (0.96%)
- Total Trades: 25
- Sharpe Ratio: −0.551
Description
This strategy uses a TTM (based on EMAs of highs and lows) to determine the market's trend direction.It then deploys a grid trading system around a dynamically updated base price, with the grid's direction and levels adjusting based on the trend.Trades are executed as the price crosses the predefined grid levels, with the strategy risking a set percentage of equity per trade.Core Strategy Logic: TTM State Calculation (ttmState() function):* Calculates two EMAs based on the `ttmPeriod`: one for the lows (`lowMA`) and one for the highs (`highMA`).* Defines two threshold levels: `lowThird` (1/3 from the bottom) and `highThird` (2/3 from the bottom) of the range between `highMA` and `lowMA`.* Returns the current TTM state as an integer: + `1` if the close price is above `highThird` (indicating an uptrend). + `0` if the close price is below `lowThird` (indicating a downtrend). + `-1` if the close price is between `lowThird` and `highThird` (indicating a neutral state).