GOLD

Building the Kurdistan Roj indicator

Building the Kurdistan Roj indicator
☀️

Building the Kurdistan Roj indicator

☀️ 📊

Strategy overview

Kurdistani Roj is a backtestable strategy on TradingView that combines two independent trading engines:

🔹 Trendline breakout engine:
detects, scores and trades trendline breakouts, setting targets based on the length of candle moves using the "Body Way" method

🔹 Triangle and tunnel pattern engine:
detects converging patterns such as triangles and wedges, and parallel patterns such as channels and tunnels, using Mokri's five-zone method

Each engine can be used separately or alongside the other; however, only one position is open at a time so that trade risk does not pile up on a single move

🧭 1. Trendline breakout engine

Lines are built from multi-period pivots and remain valid as long as candle structure and price touches support them

✅ Entry occurs after a candle closes beyond the line and clears a minimum ATR-based distance

🔍 Optional filters include volume, breakout size, holidays, distance from the EMA, volatility spikes, higher-timeframe trend direction and simultaneous breakouts of multiple lines

🎯 The target is calculated from the body length of the move leading into the breakout; the main stop loss is placed at the start of that move, and an intra-candle emergency stop can also be used

📈 The exit method can be a single target, scaled exits, or a combination of profit-taking and trailing the continuation of the move

🔺 2. Mokri pattern engine

Pattern edges are built by regression over confirmed highs and lows

• A reduction of at least 30% in height signals a converging structure

• A change of at most 15% in height signals a parallel tunnel

• At least 6 touches are required; fewer than 10 touches are flagged with a caution warning

• A candle body closing outside the pattern before the breakout calls the structure's validity into question

⏳ The five-zone rule

The triangle is divided into five zones from the point where price enters to the apex. Breakouts in zones 1 to 3 are invalid, and only breakouts in zones 4 and 5 are tradeable

🎯 Triangle targets are calculated from one quarter to the full height of the pattern; in a tunnel, targets are based on half the height, the full height and, under specific conditions, the length of the flagpole

💰 Capital management and exits

In the trendline engine, the default risk per trade is 2% of capital and leverage is capped at 1x

In the pattern engine, position size depends on the breakout zone: zone 4 and tunnels usually use 20% of capital; zone 5 uses 80% at the breakout with the option to add 20% on the pullback

After the second target is reached, half the position is closed and the stop loss is moved to the entry point. A failed breakout, a price reversal or the expiry of the trade's time limit can also trigger an exit

🖥 Display and settings

The chart includes support and resistance lines, zones ① to ⑤, the pattern apex, the tunnel midline, golden targets, entry and exit points and a performance dashboard

🌐 Display languages: Persian, English, Sorani Kurdish and Arabic

⚙️ Backtest notes

The default initial capital is $1000, commission is 0.05% per side, slippage is one tick and leverage is capped at 1x. Set the commission to match your exchange and evaluate results with at least 100 trades and out-of-sample data

🛡 No repainting

Signals are issued on closed candles and pivots appear after confirmation; nevertheless, automatic detection does not replace visual review

🔒 The source code is protected because of the proprietary logic for line scoring, pattern fitting and the advanced filters

⚠️ A reminder for friends:

This strategy is the result of my 20 years of experience in various financial markets.
🕯 #Crypto #Technical_Analysis #Trendline #Coin_Kurd

Persian original · View this post on Telegram ↗ · Open in the archive · 💬 Discuss in the Coin_Kurd Telegram group · Educational, not financial advice.