# Gann-OverExtended Indicator for ThinkorSwim

#### BenTen

Staff member
Staff
VIP
This indicator is developed from Gann overextended (Gann's square of nine).

### thinkScript Code

Code:
``````# Gann-OverExtended
# Assembled by BenTen at useThinkScript.com

declare lower;

input MAS = 15;
def SMA = simpleMovingAvg(close, MAS);
def Price_adjust = close * 10;
def SMA_adjust = SMA * 10;
def Diff_angel = (Diff_sqr * 360) / 2;
def g8 = simpleMovingAvg(Diff_angel, 2);
plot gann = Diff_angel;

plot h = 90;
plot ZeroLine = 0;
plot l = -90;``````

#### kelvin

VIP
how to use it?

##### New member
I am looking for a Gann Square of 9 Buy / Sell Indicator available.

#### sinistralleo

##### Well-known member
VIP

@sinistralleo Generally, when the Gann becomes overextended there is a greater possibility of a reversal, just as with most other indicators... I would suggest doing a Google search to research the whole Gann Square of Nine and other associated concepts...

#### sinistralleo

##### New member
I'm familiar with Gann Sq of 9's . I use the calculator frequently. Not sure what the overextended meant...
Usually you input a price and it gives you targets and SL values.

#### MerryDay

Staff member
Staff
VIP
Welcome to the Forum @sinistralleo. This Gann is an oscillator. Oscillators have high and low bands between two extreme values, the indicator fluctuates within these bounds. When it exceeds the top or lower band (in this case, >90 or <-90) an oscillator is said to be overextended. This is thought to signal a reversal.

Last edited:

#### sinistralleo

##### New member
Welcome to the Forum @sinistralleo. This Gann is an oscillator. Oscillators have high and low bands between two extreme values, the indicator fluctuates within these bounds. When it exceeds the top or lower band (in this case, >90 or <-90) an oscillator is said to be overextended. This is thought to signal a reversal.
Thank you. I'm learning SO much here.

#### cabe1332

##### Active member
Welcome to the Forum @sinistralleo. This Gann is an oscillator. Oscillators have high and low bands between two extreme values, the indicator fluctuates within these bounds. When it exceeds the top or lower band (in this case, >90 or <-90) an oscillator is said to be overextended. This is thought to signal a reversal.
I would like to share an alternative, which works for me very well, an extended Keltner channel on a chart. Similar to like a Bollinger band, it provides a wedge up or down signal when price action has overextended. It saves on real estate on your TOS chart. Code below and screenshot. Good luck! @cabe1332

# Extended Keltner Channels on chart
# @cabe1332
# credit to TOS Indicators
# provides wedge up or down when price action is overextended

# code start

input kcfactor = 3.0;

#plot extendedLong = close > keltnerChannels(factor = kcfactor).UpperBand;
plot extendedLong = close > keltnerChannels(factor = kcfactor).UpperBand and RSI() > 70;
#plot extendedshort = close < keltnerChannels(factor = kcfactor).LowerBand;
plot extendedshort = close < keltnerChannels(factor = kcfactor).LowerBand and RSI() < 30;

extendedLong.setPaintingStrategy(PaintingStrategy.Boolean_Wedge_Up);
extendedShort.setPaintingStrategy(PaintingStrategy.Boolean_Wedge_Down);
extendedLong.setDefaultColor(Color.pink);
extendedShort.setDefaultColor(Color.Light_green);

# code end

Last edited by a moderator:

## The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
• Exclusive indicators
• Proven strategies & setups
• Private Discord community
• Exclusive members-only content
• 1 full year of unlimited support

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?