3 Bar Triangle Breakout Indicator for ThinkorSwim

BenTen

BenTen

Administrative
Staff
VIP
A simple indicator that looks for potential breakout based on the last 3 bars.

Current bar's High is less than the 3rd bar's High and Current bar's Low to be higher the 3rd bar's Low.
This then predicts the market might breakout to new levels within 2-3 of the next coming bars. Entry occurs when have two inside days and close break candle three high or low. If need more information recommend google search.

I have coded when candle conducts breakout the formation above is the setup criteria !!


thinkScript Code

Code:
# 3 Bar Triangle Breakout
# Assembled by BenTen at UseThinkScript.com
# Converted from https://www.tradingview.com/script/Y18AgFJS-3-Bar-Triangle-Breakout/

def PHIGH =(high[3]);
def PLOW =(low[3]);
def ENTRYLONG = (close>open and close>close[1] and close>high[1] and low[1]>low[3] and low[2]>low[3] and high[1]<high[3] and high[2]<high[3]);
def ENTRYSHORT= (close<open and close<close[1] and close<low[1]  and low[1]>low[3] and low[2]>low[3] and high[1]<high[3] and high[2]<high[3]);

# Plot Signals
plot bullish = ENTRYLONG;
bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
bullish.SetDefaultColor(Color.CYAN);
bullish.SetLineWeight(1);
plot bearish = ENTRYSHORT;
bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
bearish.SetDefaultColor(Color.CYAN);
bearish.SetLineWeight(1);
 
Top