BiasFlow Long System

“BiasFlow Long System” is an invite-only, long-only strategy designed to participate in bullish trends using a combination of:
• a directional “bias” filter based on price behaviour over time, and
• candle-structure conditions that confirm short-term strength before entering,
plus a simple risk-management layer (stop loss and optional take profit).
The system is intentionally selective: it aims to enter only when a clear upward bias and a cluster of bullish price action align, and then to exit on opposite conditions or risk-based levels. It is NOT a holy grail and NOT financial advice.
────────────────────────
0. Legal / risk disclaimer
────────────────────────
• This script is invite-only and for EDUCATIONAL and RESEARCH purposes only.
• It is NOT financial advice and does NOT guarantee profits.
• Backtest results can differ significantly from live trading results.
• Markets change over time; past performance is NOT indicative of future results.
• You are fully responsible for your own trading decisions and risk.
Do not trade with money you cannot afford to lose. Always start with demo / paper trading and make sure you understand how the strategy behaves on your own market and timeframe before risking real capital.
────────────────────────
1. About default settings and risk (very important)
────────────────────────
The internal `strategy()` call uses:
• `initial_capital = 100`
→ This is only a simple example account size for testing.
• `default_qty_type = strategy.percent_of_equity`
• `default_qty_value = 100`
→ This means 100% of equity per trade in the default properties.
→ This is EXTREMELY AGGRESSIVE and should be treated purely as a STRESS TEST of the logic, **not** as a realistic way to trade.
To align with TradingView’s Strategy Results guidelines and more realistic risk management, you should:
1. Open **Strategy Settings → Properties**.
2. Change:
• Order size type → **Percent of equity** (if not already).
• Order size (percent) → e.g. **1–2%** per trade (or any small risk that fits your plan).
3. Check that **commission & slippage** are realistic for your broker and market.
• The script uses a 0.1% example commission and a small slippage value as a starting point, but you must adapt them to your conditions.
If you decide to run 100% of equity per trade, treat it only as a stress scenario for backtesting the behaviour of the system, **never** as a recommended risk profile for live trading.
────────────────────────
2. What this strategy tries to do (conceptual overview)
────────────────────────
BiasFlow Long System is a **long-only, bias-based trend participation strategy**.
Conceptually, it tries to:
1. Detect when the market has a **sustained upward directional bias** using an internal bias filter applied directly to price behaviour over time.
2. Wait for a **short-term cluster of bullish candles** in that favourable environment before entering a long position.
3. Use **risk-based exits** (stop loss and optional take profit) together with a bearish candle-structure condition to close trades when the upward bias fails or local conditions deteriorate.
In other words, it is not trying to catch every small fluctuation. Instead, it waits for the market to **lean upward** and then demands a clear, short-term confirmation from the candles before committing capital, exiting either on a controlled risk level or on a structured bearish pattern.
────────────────────────
3. Components and how they work together
────────────────────────
BiasFlow Long System consists of three main building blocks:
(1) Time / backtest window control
• You can select a continuous start/end date range.
• You can also use a **year-selector** (checkboxes per year) to include or exclude specific calendar years.
• This allows you to:
- test the strategy across long histories,
- compare behaviour in different regimes (e.g. 2018 vs 2021),
- avoid accidentally cherry-picking a tiny, overly-optimistic window.
(2) Bias engine
• Internally, the strategy computes a **directional bias** from price.
• It classifies the environment into broad states like “up”, “down” (and internally handles flat conditions).
• Long entries are only allowed when the bias engine deems the environment favourable (an “up” state).
• This prevents the strategy from buying blindly into obvious downtrends.
(3) Candle-structure and risk module
• Entry signals require a **cluster of bullish candles** that meet strict internal conditions.
- Exact rules are deliberately not disclosed, but the idea is to demand multiple aligned bullish bars to confirm local strength before entering.
• Exits can be triggered by:
- a **cluster of bearish candles** under suitable conditions, signalling local weakness, and/or
- the risk module (stop loss / take profit) if those levels are hit first.
These components are designed to work together so that the strategy only participates when:
• the broader environment supports longs (bias engine), and
• the immediate price action confirms that bullish pressure is actually present (candle structure),
while exits are handled in a rule-based way either by candle structure or by pre-defined risk thresholds.
────────────────────────
4. Entry & Exit logic (high level)
────────────────────────
At a high conceptual level:
A) Time filter
• Only bars inside your chosen backtest window (date range or selected years) are considered for entries and exits.
• This helps you analyse specific periods (e.g. only post-2020 data) without changing the code.
B) Entry (long-only)
A long trade is considered only when all of the following conceptual conditions are met:
1. The bar is inside the allowed backtest window.
2. The **bias engine** classifies the environment as favourable for longs (up-bias).
3. The most recent candles form a **bullish sequence** according to internal rules (e.g. price closing strongly vs. open on several consecutive bars).
If these conditions align, the strategy opens a **single long position** with the sizing defined in your Strategy Properties (for example 1–2% of equity per trade).
C) Risk-based exit
Once in a position, the strategy maintains a basic risk framework:
• **Stop Loss (SL)**:
- Defined as a percentage distance below the average entry price.
- Enabled by default in the Inputs, but you can adjust the percentage or disable it if you want to test raw logic.
• **Take Profit (TP)**:
- Also defined as a percentage distance above the average entry price.
- By default, the TP module is optional and configured as a very wide level so it does not interfere unless you intentionally enable and tune it.
- You should set a realistic TP (for example a multiple of your risk) if you want to use it.
The SL/TP orders are managed as OCO exits by TradingView, so if one is hit first, the other is cancelled automatically.
D) Candle-based exit
In addition to risk exits:
• The strategy watches for a **structured bearish sequence** of candles while the bias is still acceptable for exits.
• When that bearish structure appears, the strategy closes the open long position.
• This allows the system to respond to a change in short-term price behaviour even if the stop loss or take profit have not been reached yet.
────────────────────────
5. Recommended backtest configuration (to avoid misleading results)
────────────────────────
To keep your results in line with TradingView’s Strategy Results guidelines and avoid misleading curves:
1. **Initial capital**
- You can keep 100 as in the code or choose any other realistic account size.
2. **Order size (RISK PER TRADE)**
- Type: **Percent of equity**.
- Recommended: **1–2% per trade** as a starting point.
- Avoid using more than 5–10% risk per trade if you want something that could be sustainable in real trading.
3. **Commission & slippage**
- Commission: for example 0.1% if that approximates your broker’s fee.
- Slippage: a few ticks (e.g. 3) to represent real fills.
- Always adjust these to your instrument and broker conditions.
4. **Timeframe & markets**
- The system is designed to work on trending instruments (for example major crypto pairs or indices).
- Typical timeframes: 1D is reasonable starting points but you can try with 1H / 4H.
- On higher timeframes, trades will be rarer but may aim at larger swings.
5. **Avoid “caution warning” backtests**
- If TradingView shows warnings like “too few trades” or “insufficient data” in your chosen configuration, consider:
- expanding the backtest period,
- switching to a more liquid / volatile instrument, or
- changing timeframe to produce a more meaningful sample.
────────────────────────
5a. About low trade count and selective signals
────────────────────────
BiasFlow Long System is **not** a high-frequency scalping algorithm. It is deliberately selective:
• It is long-only.
• It requires a favourable bias environment AND a specific pattern of bullish candles before entering.
• On higher timeframes (e.g. Daily) or very strict filter settings, the strategy can produce a **relatively low number of trades** over many years of data.
TradingView often recommends having 100+ trades for stronger statistics. In this particular system:
• A lower trade count is a **conscious design choice**, reflecting the goal of focusing on a smaller set of higher-conviction long setups rather than constant trading.
• Because of this, backtest metrics (profit factor, win rate, etc.) should NOT be interpreted as statistically “proven” – they are just one sample of how this logic would have behaved on past data.
Always use caution when drawing conclusions from a small number of trades.
────────────────────────
6. How to use this strategy (step-by-step)
────────────────────────
1. **Add the script to your chart**
- Choose your instrument and timeframe (e.g. BTCUSDT 1D, or any trending symbol you want to study).
2. **Configure the backtest window**
- In the Inputs, set either:
- a specific Start Date (e.g. 2018-01-01), or
- use the year checkboxes to include/exclude calendar years.
- This allows you to test different regimes (pre-/post-halving, bull vs. bear, etc.).
3. **Adjust risk settings**
- Open Inputs → Risk Management:
- Choose whether to use the Stop Loss and/or Take Profit.
- Set realistic percentages for your market and volatility.
- Open Strategy Properties:
- Set order size to a realistic % of equity (e.g. 1–2%).
- Verify commission and slippage.
4. **Run the backtest**
- Inspect:
- Net Profit, Max Drawdown, Profit Factor
- Number of trades and average trade duration
- Equity curve shape (smooth vs. choppy).
5. **Experiment carefully**
- Try different symbols, timeframes, and risk settings.
- Observe how the system behaves in different market regimes and how sensitive it is to your parameter choices.
6. **Forward-test in demo**
- Before even considering live usage, run the system on a paper account and watch how signals appear in real time.
- Make sure the behaviour matches your expectations from the backtest.
────────────────────────
7. Originality and usefulness (why this is more than a mashup)
────────────────────────
BiasFlow Long System is not just a visual mashup of common indicators on a chart. It is a **coherent, bias-driven framework** with:
• A dedicated **time / regime control** (year and date filters) to study behaviour across multiple cycles.
• An internal **bias engine** that only allows trades when the market structure supports longs.
• A **candle-structure layer** that requires a sequence of aligned bullish or bearish bars, rather than isolated single-bar signals.
• A simple but practical **risk module** that integrates percentage-based SL/TP exits.
The core logic is intentionally abstracted and not publicly disclosed, but the conceptual design is:
• to combine directional bias,
• with short-term confirmation,
• under explicit risk-management constraints,
in a way that is testable, repeatable, and suitable as a base for further private research and improvement.
────────────────────────
8. Limitations and good practices
────────────────────────
• No strategy performs well in all markets and all conditions.
• This system is **long-only**, so in prolonged bear markets it may spend long periods out of the market or perform poorly.
• Performance is sensitive to:
- timeframe,
- instrument volatility,
- risk settings (SL/TP, position size).
Good practices:
• Test on multiple instruments and timeframes.
• Focus on drawdowns, stability, and robustness, not just on maximum profit.
• Avoid overfitting by constantly re-optimising parameters to your last backtest window.
• Treat this as a **framework and research tool**, not a plug-and-play money printer.
────────────────────────
9. Licensing and credits
────────────────────────
• Code and logic:
- “BiasFlow Long System” created by Jokiniemi Marcin Arcisz.
• This script is invite-only.
• If you reuse or extend ideas from this system, please do so in a way that respects TradingView’s House Rules and the author’s intent.
────────────────────────
10. Invite-only / vendor information
────────────────────────
• This strategy is distributed on an **invite-only** basis.
• There is **no guarantee of profit** and no claim that this strategy will outperform the market.
• The description focuses on the conceptual design and risk considerations so that TradingView users and moderators can understand what it tries to do and how to use it responsibly.
• Any access, subscription, or collaboration outside TradingView, if it exists, should always comply with TradingView’s Vendor Requirements and general House Rules.
────────────────────────
11. Example backtest settings used in screenshots
────────────────────────
To avoid confusion about how example results were produced, here is one concrete configuration you can use as a starting point:
• Symbol: BTCUSDT (or another major, liquid trending pair)
• Timeframe: 1D
• Backtest period: from 2018-01-01 to the most recent available data
• Initial capital: 100
• Order size type: Percent of equity
• Order size: 2% per trade
• Commission: 0.1%
• Slippage: 3 ticks
• Risk settings:
- Stop Loss enabled with a moderate % distance from entry
- Take Profit disabled or set to a realistic multiple of the risk
• Filters:
- Backtest window: multiple years selected
- Bias engine and candle-structure logic enabled (as they are part of the core system)
If you change any of these parameters (symbol, timeframe, risk per trade, commission, slippage, backtest window, etc.), your results will look different. Always adapt the configuration to your own risk tolerance, market, and trading style.
סקריפט להזמנה בלבד
רק משתמשים שאושרו על ידי המחבר יכולים לגשת לסקריפט הזה. יהיה עליך לשלוח בקשת גישה ולקבל אישור לשימוש. בדרך כלל, הגישה ניתנת לאחר תשלום. למידע נוסף, עקוב אחר ההוראות של היוצר בהמשך או צור קשר עם jokiniemi ישירות.
TradingView לא ממליצה לשלם עבור סקריפט או להשתמש בו אלא אם כן אתה סומך לחלוטין על המחבר שלו ומבין כיצד הוא פועל. ייתכן שתוכל גם למצוא חלופות חינמיות וקוד פתוח ב-סקריפטים הקהילתיים שלנו.
הוראות המחבר
כתב ויתור
סקריפט להזמנה בלבד
רק משתמשים שאושרו על ידי המחבר יכולים לגשת לסקריפט הזה. יהיה עליך לשלוח בקשת גישה ולקבל אישור לשימוש. בדרך כלל, הגישה ניתנת לאחר תשלום. למידע נוסף, עקוב אחר ההוראות של היוצר בהמשך או צור קשר עם jokiniemi ישירות.
TradingView לא ממליצה לשלם עבור סקריפט או להשתמש בו אלא אם כן אתה סומך לחלוטין על המחבר שלו ומבין כיצד הוא פועל. ייתכן שתוכל גם למצוא חלופות חינמיות וקוד פתוח ב-סקריפטים הקהילתיים שלנו.