PROTECTED SOURCE SCRIPT

CBC Flip Strategy

8
CBC Flip Strategy is a trend-following strategy inspired by the price action logic originally shared by the TradingView user AsiaRoo This implementation formalizes the concept into a complete and backtestable framework with optional trend filtering and commission simulation.

Strategy Overview
The core idea is to capture directional shifts in market structure based on simple breakout conditions:

A bullish flip is defined when the current candle closes above the high of the previous candle.

A bearish flip is defined when the current candle closes below the low of the previous candle.

The strategy can optionally filter trades based on a 200-period Exponential Moving Average (EMA200):

Long trades are taken only when the price is above EMA200.

Short trades are taken only when the price is below EMA200.

Each entry is paired with a configurable Take Profit and Stop Loss, defined as a percentage of the entry price.

The script also supports commission modeling using either a percentage or fixed cash value.

User Inputs
Take Profit % – Sets the target profit level per trade.

Stop Loss % – Sets the maximum acceptable loss per trade.

Use EMA200 Filter – Enables/disables the trend direction filter.

Commission Type & Value – Simulates broker commissions to enhance backtest accuracy.

Visual Indicators
Green upward triangles mark bullish flips.

Red downward triangles mark bearish flips.

Yellow and blue background highlights indicate new bullish or bearish flips, respectively.

Attribution
This strategy is based on an idea originally shared by TradingView user AsiaRoo. The implementation here is a refined and extended version with added risk management and backtesting features.

Disclaimer
This script is provided for educational and informational purposes only. It does not constitute financial, investment, or trading advice. The strategy presented here is a tool to support analysis and learning, and should not be interpreted as a recommendation to buy or sell any security or financial instrument.

Trading involves substantial risk and may not be suitable for all investors. Users are solely responsible for their own trading decisions and for evaluating the suitability of this tool. Past performance is not indicative of future results.

Always conduct thorough backtesting and risk assessment before using any strategy in live trading environments.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.