#BigTrends BigTrendsBands Indicator input length = 30; def HH = Highest(high,length); def R = Highest(high,length) - lowest(low,length); plot UpperBand = HH - (R *.20); plot LowerBand = HH - (R *.80); UpperBand.SetDefaultColor(GetColor(9)); LowerBand.SetDefaultColor(GetColor(1)); #BigTrends Relative Strength Indicator declare lower; input correlationWithSecurity = "SPY"; def close2 = close (correlationWithSecurity); input displace = 0; input length1 = 5; input length2 = 10; input length3 = 20; input length4 = 50; plot RS = if close2 == 0 then 0 else close / close2; RS.SetDefaultColor(GetColor(6)); plot SMA = Average(RS[-displace],length1); plot SMA2 = Average(RS[-displace],length2); plot SMA3 = Average(RS[-displace],length3); plot SMA4 = Average(RS[-displace],length4); #BigTrends Acceleration Bands input Length = 20; plot UpperBand = Average(data = High * (1 + 4 * (High - Low) / (High + Low)), length = Length); plot MidPoint = Average(data = close, length = Length); plot LowerBand = Average(data = Low * (1 - 4 * (High - Low) / (High + Low)), length = Length); #BigTrends DMI Difference declare lower; input length = 14; input AvgLength = 10; input overBought = 30; input overSold = -30; input even = 0; Def Diff = DIPlus(length) - DIMinus(length); Plot "DMIDiff" = round(Diff); Plot "DMIAvg" = round(Average(Diff, AvgLength)); Plot OB = overbought; Plot OS = oversold; #BigTrends Effieciency Ratio plot Data = close; declare lower; input length = 20; input lowerERThreshold = -30; input upperERThreshold = 30; def NetChange = hl2 - hl2[length]; def incrementalTotalChange = AbsValue(hl2 - hl2[1]); def TotalChange = sum(incrementalTotalChange,length); def ERatio = (NetChange/TotalChange) * 100; plot ER = ERatio; ER.AssignValueColor(if ER >= upperERThreshold then Color.RED else if ER <= lowerERThreshold then Color.RED else Color.RED); ER.SetLineWeight(2); plot LowerThreshold = lowerERThreshold; LowerThreshold.SetDefaultColor(Color.BLUE); plot UpperThreshold = upperERThreshold; UpperThreshold.SetDefaultColor(Color.BLUE); #BigTrends PercentR declare lower; input length = 30; input overBought = 20; input overSold = 80; def hh = Highest(high, length); def ll = Lowest(low, length); def result = if hh == ll then -100 else ((hh - close) / (hh - ll) * (-100)) + 100; plot WR = result; WR.SetDefaultColor(GetColor(1)); plot Over_Sold = overSold; Over_Sold.SetDefaultColor(GetColor(8)); plot Over_Bought = overBought; Over_Bought.SetDefaultColor(GetColor(8)); #BigTrends % Over 200 Day MA declare lower; input price = close; input length = 200; input displace = 0; input overBought = 100; def SMA = Average(price[-displace], length); def PerAbove = ((price - SMA)/(SMA) * 100); Plot MonsterStocks = PerAbove; MonsterStocks.SetDefaultColor(GetColor(1)); Plot Over_Bought = overBought; Over_Bought.SetDefaultColor(GetColor(8)); #BigTrends MACD Divergence declare lower; input fastLength = 12; input slowLength = 26; def MACD = 9; def input2 = 50; plot BuyZone = 30; plot SellZone = 90; def Value1 = If (Highest(MACD(fastLength, slowLength,macd), input2) - Lowest(MACD(fastLength, slowLength,macd), input2) <> 0, Highest(MACD(fastLength, slowLength,macd), input2) - Lowest(MACD(fastLength, slowLength,macd), input2), 40); def Value2 = If (Highest(close, input2) - Lowest(close, input2) <> 0, Highest(close, input2) - Lowest(close, input2), 40); def percClose = (100*(close - Lowest(close, input2)) / Value2); plot plotpercclose = if Value2 == 0 then 0 else 100*(close - Lowest(close, input2))/ Value2; plot plottwo = (100 * (MACD(fastLength, slowLength,macd) - Lowest(MACD(fastLength, slowLength,macd), input2)) / Value1); #BigTrends %R Long Strategy input length = 30; input overBought = 80; def hh = Highest(high, length); def ll = Lowest(low, length); def result = if hh == ll then -100 else ((hh - close) / (hh - ll) * (-100)) + 100; addOrder(OrderType.BUY_AUTO, result [1] crosses above overBought and close > high[1] or result [2] crosses above overBought and close > high[2] or result [3] crosses above overBought and close > high[3] or result [4] crosses above overBought and close > high[4] or result [5] crosses above overBought and close > high[5], tickColor = GetColor(6), arrowColor = GetColor(6)); addOrder(OrderType.SELL_TO_CLOSE, result[2] > overBought and result[1] < overBought and close < low[1] or result[3] > overBought and result[2] < overBought and close < low[2] or result[4] > overBought and result[3] < overBought and close < low[3] or result[5] > overBought and result[4] < overBought and close < low[4] or result[6] > overBought and result[5] < overBought and close < low[5] or result[7] > overBought and result[6] < overBought and close < low[6] or result[8] > overBought and result[7] < overBought and close < low[7] or result[9] > overBought and result[8] < overBought and close < low[8] or result[10] > overBought and result[9] < overBought and close < low[9] or result[11] > overBought and result[10] < overBought and close < low[10] or result[12] > overBought and result[11] < overBought and close < low[11] or result[13] > overBought and result[12] < overBought and close < low[12] or result[14] > overBought and result[13] < overBought and close < low[13] or result[15] > overBought and result[14] < overBought and close < low[14] or result[16] > overBought and result[15] < overBought and close < low[15] , tickColor = GetColor(5), arrowColor = GetColor(5)); #BigTrends %R Short Strategy input length = 30; input overSold = 20; def hh = Highest(high, length); def ll = Lowest(low, length); def result = if hh == ll then -100 else ((hh - close) / (hh - ll) * (-100)) + 100; addOrder(OrderType.SELL_AUTO, result[1] crosses below overSold and close < low[1] or result[2] crosses below overSold and close < low[2] or result[3] crosses below overSold and close < low[3] or result[4] crosses below overSold and close < low[4] or result[5] crosses below overSold and close < low[5], tickColor = GetColor(6), arrowColor = GetColor(6)); addOrder(OrderType.BUY_TO_CLOSE, result[2] < overSold and result[1] > overSold and close > high[1] or result[3] < overSold and result[2] > overSold and close > high[2] or result[4] < overSold and result[3] > overSold and close > high[3] or result[5] < overSold and result[4] > overSold and close > high[4] or result[6] < overSold and result[5] > overSold and close > high[5] or result[7] < overSold and result[6] > overSold and close > high[6] or result[8] < overSold and result[7] > overSold and close > high[7] or result[9] < overSold and result[8] > overSold and close > high[8] or result[10] < overSold and result[9] > overSold and close > high[9] or result[11] < overSold and result[10] > overSold and close > high[10] or result[12] < overSold and result[11] > overSold and close > high[11] or result[13] < overSold and result[12] > overSold and close > high[12] or result[14] < overSold and result[13] > overSold and close > high[13] or result[15] < overSold and result[14] > overSold and close > high[14] or result[16] < overSold and result[15] > overSold and close > high[15], tickColor = GetColor(5), arrowColor = GetColor(5)); #BigTrends Donchian Arrows Study input length = 7; input avg = 200; input AverageON = {Yeh, default Ney}; plot Bearish; plot Bullish; def IsShortAvg = Close > highest(High, length)[1] and Close < Average(Close, Avg) ; def IsLongAvg = Close < Lowest(Low,length)[1] and Close > Average(Close, Avg); def IsShort = Close > highest(High, length)[1]; def IsLong = Close < Lowest(Low,length)[1]; switch (AverageON) { case Yeh: Bearish = IsShortAvg; Bullish = IsLongAvg; case Ney: Bearish = isshort; Bullish = islong; } Bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN); Bearish.SetDefaultColor(GetColor(0)); Bearish.SetLineWeight(2); Bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP); Bullish.SetDefaultColor(GetColor(1)); Bullish.SetLineWeight(2); #BigTrends Donchian Channel Strategy input length = 7; input avg = 200; input AverageON = {Yeh, default Ney}; plot Bearish; plot Bullish; def IsShortAvg = Close > highest(High, length)[1] and Close < Average(Close, Avg) ; def IsLongAvg = Close < Lowest(Low,length)[1] and Close > Average(Close, Avg); def IsShort = Close > highest(High, length)[1]; def IsLong = Close < Lowest(Low,length)[1]; switch (AverageON) { case Yeh: Bearish = IsShortAvg; Bullish = IsLongAvg; case Ney: Bearish = isshort; Bullish = islong; } Bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN); Bearish.SetDefaultColor(GetColor(0)); Bearish.SetLineWeight(2); Bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP); Bullish.SetDefaultColor(GetColor(1)); Bullish.SetLineWeight(2); def ll = Lowest(low, length); def hh = Highest(high, length); def result = if hh == ll then -100 else ((hh - close) / (hh - ll) * (-100)) + 100; def overSold = ll within 7 bars; def overBought = hh within 7 bars; addOrder(OrderType.BUY_AUTO, result [1] crosses below overSold and close < low[1] or result [2] crosses below overSold and close < low[2] or result [3] crosses below overSold and close < low[3] or result [4] crosses below overSold and close < low[4] or result [5] crosses below overSold and close < low[5] or result [6] crosses below overSold and close < low[6], tickColor = GetColor(6), arrowColor = GetColor(6)); addOrder(OrderType.SELL_TO_CLOSE, result[2] > overBought and result[1] < overBought and close < low[1] or result[3] > overBought and result[2] < overBought and close < low[2] or result[4] > overBought and result[3] < overBought and close < low[3] or result[5] > overBought and result[4] < overBought and close < low[4] or result[6] > overBought and result[5] < overBought and close < low[5] or result[7] > overBought and result[6] < overBought and close < low[6] or result[8] > overBought and result[7] < overBought and close < low[7] or result[9] > overBought and result[8] < overBought and close < low[8] or result[10] > overBought and result[9] < overBought and close < low[9] or result[11] > overBought and result[10] < overBought and close < low[10] or result[12] > overBought and result[11] < overBought and close < low[11] or result[13] > overBought and result[12] < overBought and close < low[12] or result[14] > overBought and result[13] < overBought and close < low[13] or result[15] > overBought and result[14] < overBought and close < low[14] or result[16] > overBought and result[15] < overBought and close < low[15] , tickColor = GetColor(5), arrowColor = GetColor(5)); #Formulas for Scanning BigTrends Top 3 Indicators in Your TOS Platform  PercentR Bearish PercentR(30)[1] crosses below 20 and close < low or PercentR(30)[2] crosses below 20 and close < low[1] or PercentR(30)[3] crosses below 20 and close < low[2] or PercentR(30)[4] crosses below 20 and close < low[3] or PercentR(30)[5] crosses below 20 and close < low[4] or PercentR(30)[6] crosses below 20 and close < low[5]  PercentR Bullish PercentR(30)[1] crosses above 80 and close > high or PercentR(30)[2] crosses above 80 and close > high [1] or PercentR(30)[3] crosses above 80 and close > high [2] or PercentR(30)[4] crosses above 80 and close > high [3] or PercentR(30)[5] crosses above 80 and close > high [4] or PercentR(30)[6] crosses above 80 and close > high [5]  Acceleration Bands Bearish close is less than or equal to AccelerationBands(20)."LowerBand" or close is less than or equal to AccelerationBands(20)."LowerBand" [1] or close is less than or equal to AccelerationBands(20)."LowerBand" [2] or close is less than or equal to AccelerationBands(20)."LowerBand" [3] or close is less than or equal to AccelerationBands(20)."LowerBand" [4]  Acceleration Bands Bullish close is greater than or equal to AccelerationBands(20)."UpperBand" or close is greater than or equal to AccelerationBands(20)."UpperBand" [1] or close is greater than or equal to AccelerationBands(20)."UpperBand" [2] or close is greater than or equal to AccelerationBands(20)."UpperBand" [3] or close is greater than or equal to AccelerationBands(20)."UpperBand" [4]  CCI Bearish CCI(60)[1] crosses below -100 and close < low or CCI(60)[2] crosses below -100 and close < low [1] or CCI(60)[3] crosses below -100 and close < low [2] or CCI(60)[4] crosses below -100 and close < low [3] or CCI(60)[5] crosses below -100 and close < low [4] or CCI(60)[6] crosses below -100 and close < low [5]  CCI Bullish CCI(60)[1] crosses above 100 and close > high or CCI(60)[2] crosses above 100 and close > high [1] or CCI(60)[3] crosses above 100 and close > high [2] or CCI(60)[4] crosses above 100 and close > high [3] or CCI(60)[5] crosses above 100 and close > high [4] or CCI(60)[6] crosses above 100 and close > high [5]