PROTECTED SOURCE SCRIPT

AlosAlgo V2 (BETA)

78
— V2 BETA —
V2 – 2025-11-21 (Update)
• Rebuilt the core signal engine to remove repainting – higher-timeframe Heikin Ashi / Renko now use confirmed bars only for more stable signals & alerts.
• Added Trend Filter MA so longs are only taken above the MA and shorts only below (optional).
• Added MACD momentum filter and Price Action filter (Higher Low for longs, Lower High for shorts) to cut a lot of chop.
• Introduced a loss-streak “circuit breaker” – after X consecutive losing trades the strategy pauses for a set number of bars.
• New TP/SL engine with 2 modes: ATR-based or Fixed % moves, with 4 staged TPs plus an optional runner and break-even SL after TP2.
• Cleaned up TP/SL lines & labels so levels are fixed per trade and easier to read.
• General refactor for more realistic backtests, better live behaviour and easier parameter tuning compared to V1.

ABOUT

AlosAlgo V2 is a multi-timeframe trend + momentum strategy designed for BTC and other high-liquidity markets. It takes directional bias from a higher timeframe, then filters that bias with volatility, momentum and simple price-action structure before it ever opens a trade.
Purely rule-based, no AI / Bayesian / ML.

Core idea
– Use higher-timeframe structure for direction.
– Only trade when trend, momentum and basic price action agree.
– Manage exits with multiple TPs, an optional runner and a hard SL so risk is defined from the start.

Setups
Two main engines:
• Open/Close – Higher-timeframe Heikin Ashi body direction (close vs open) as the core trend signal.
• Renko – ATR-based Renko feed with EMA cross (fast vs slow) as the core trend signal.

Classic sideways filters (ATR + RSI) can be layered on top if you want to only trade in trending or ranging conditions.

Filters added in V2
• Trend Filter MA – Longs only above the MA, shorts only below (length configurable).
• Momentum Filter – Optional MACD filter; only takes longs when MACD is bullish and shorts when MACD is bearish.
• Price Action Filter – Optional HL/LH logic using pivots: longs after a Higher Low, shorts after a Lower High.
• Loss-Streak Circuit Breaker – After N losing trades in a row, the strategy pauses entries for a set number of bars to avoid bad regimes / tilt.

Risk & exits
Two TP/SL modes:
• ATR mode – SL and TP1–TP4 based on ATR at entry (stopFactor / profitFactor).
• Fixed % mode – SL and TP1–TP4 defined as % moves from entry.

On entry the strategy:
• Opens a single position.
• Places 4 staged TPs (TP1–TP4) with user-defined % sizing.
• Optionally leaves a “runner” managed only by SL and trend changes.
• Can move SL to break-even automatically after TP2 (toggle).

All TP/SL levels are locked at entry and drawn on the chart with labels so you can see exactly what the trade is trying to do.

Non-repainting behaviour
V2 is refactored to avoid the repainting behaviour that V1 used. Higher-timeframe and Renko data are taken from confirmed bars only, and entries are based on state (e.g. > / <) instead of repaint-prone crosses. Backtests are much closer to what you’ll see live, and alerts line up with executed trades more reliably.

How to use (suggested defaults)
• Setup: Open/Close
• TPSType: Fixed %
• Trend Filter: ON
• Momentum Filter: ON
• Price Action Filter: ON
• Sideways Filter: No Filtering

Then tweak TP/SL distances and filters per asset + timeframe, and forward-test before sizing up.

Disclaimer
This is not financial advice, not a guarantee of profit and not a “set and forget” money printer. Always forward-test, paper trade and tune risk before using real capital or automation. Markets change – this is a tool, not a promise.

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน