Donchian Channel with Fibonacci Zone Indicator for ThinkorSwim

BenTen

Administrative
Staff member
Staff
VIP
Lifetime
Mod Note:
For day traders, the primary challenge isn't finding entry signals—it's maintaining location awareness and avoiding bad risk-reward entries. The core goal is to avoid buying at the absolute top of a range and selling at the bottom.

Because this script dynamically anchors Fibonacci zones to a rolling 21-period Donchian Channel, it serves as an intuitive real-time location tool.

Fibonacci Zone Chart


Key Trading Rules:
  • The Value Zone: Treat the Gray Cloud (38.2% – 61.8%) as your primary fair-value area. In a strong intraday trend or gap-up, wait for price to pull back into this zone rather than chasing moves near the top blue cloud.
    Dynamic Risk Definition: The bands expand and contract with recent 21-bar volatility. If taking a long trade inside the 38.2%–61.8% zone, the 76.4% level (lf) or Lowest Low (ll) provides a natural, volatility-adjusted stop-loss target.
  • Anti-FOMO Guardrails: Avoid initiating new long positions inside the top extreme expansion zone (Blue Cloud) or short positions inside the bottom extreme zone (Orange Cloud). Use these zones strictly for scaling out profits or trailing stop losses.
How to Read the Fibonacci Zone Layers:

»Blue Area: Extreme upper expansion zone (Take Profit / Overextended)
»Gray Area: Fair value zone (Optimal Pullback / Entry Area)
»Orange Area: Extreme lower expansion zone (Take Profit / Overextended)
»Outer Bounds: In-between transitional space

Example Trade: The "Gray Zone Reversal" Setup

Direction: Confirm price is trading above the Daily VWAP (Bullish Bias).
Location: Wait for price to pull back into the Gray Cloud (38.2% – 61.8%).
Trigger: Look for a bullish confirmation bar (e.g., a hammer or strong engulfing bar) inside the gray cloud.
Entry: Break above the high of the confirmation bar.
Stop Loss: Placed just below the 76.4% band (lf).
Take Profit: Scale out as price approaches the top High (hl) Blue Cloud.

thinkScript Code

Rich (BB code):
# WalkingBallista
# Converted from: https://www.tradingview.com/script/FDTcR7e9-Fibonacci-Zone/

input length = 21;

plot hl = highest(high, length);
plot ll = lowest(low, length);
def range = hl-ll;
plot hf = hl-range*0.236;
plot cfh = hl-range*0.382;
plot cfl = hl-range*0.618;
plot lf = hl-range*0.764;

DefineGlobalColor("Dark_Blue", createColor(0,0,100));
DefineGlobalColor("Dark_Orange", createColor(150,100,0));
DefineGlobalColor("Dark_Gray", Color.Dark_Gray);
AddCloud(cfh,cfl,GlobalColor("Dark_Gray"));
AddCloud(hl,hf, GlobalColor("Dark_Blue"), GlobalColor("Dark_Blue"));
AddCloud(ll, lf, GlobalColor("Dark_Orange"), GlobalColor("Dark_Orange"));

cfh.setDefaultColor(Color.Dark_Gray);
cfh.setLineWeight(2);
cfl.setDefaultColor(Color.Dark_Gray);
cfl.setLineWeight(2);
hl.setDefaultColor(Color.Blue);
hl.setLineWeight(2);
hf.setDefaultColor(Color.Blue);
hf.setLineWeight(2);
ll.setDefaultColor(GlobalColor("Dark_Orange"));
ll.setLineWeight(2);
lf.setdefaultColor(GlobalColor("Dark_Orange"));
lf.setLineWeight(2);

Shareable Link

https://tos.mx/apRWcv

Thanks to WalkingBallista for converting the script.
 
Last edited by a moderator:

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
952 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top