Here are some of the indicators I use every day

Status
Not open for further replies.
I run a 1000t left chart and a 10-15min right-side chart my strategy is running the fighter scalper along with the take profit Indicator and the RSI Laguerre MTF Indicator and the accumulation swing Indicator and of course the Take Profit Indicator and those are my 5 main indicators for scalping. I wait for either a price high or low according to the fighter scalper and judge where this correlates on the time chart. So both charts should be at lo's/hi's before I take the trade and my entry decision is based on the lower RSI Laguerre and the oscillator, are they rising or falling do we have accumulation? the take profit is a very important part of the strategy. Using this system has been profitable over the last two weeks of testing it. Putting the system together would not have been possible if not for being a member of this site and all the wonderful work our coders produce.
======================================================================================================
My charts and interpretation for taking trades: Oscillator lows and highs


See AAPL and how it is setting up nicely:


Left Tic chart Share minus Take Profit:

https://tos.mx/wlfPXmV

Right Time Chart minus Take Profit:
Note the time chart will keep me in the trade

https://tos.mx/FvvEk9b

======================================================================================================
Fighter scalper indicator:

declare lower;

input price = hl2;
input length = 10;

def maxHigh = Highest(price, length);
def minLow = Lowest(price, length);
def range = maxHigh - minLow;
rec value = if IsNaN(price)
then Double.NaN
else if IsNaN(range)
then value[1]
else if range == 0
then 0
else 0.66 * ((price - minLow) / range - 0.5) + 0.67 * value[1];
def truncValue = if value > 0.99 then 0.999 else if value < -0.99 then -0.999 else value;
rec fish = 0.5 * (log((1 + truncValue) / (1 - truncValue)) + fish[1]);

plot FTOneBarBack = fish[1];
plot FT = fish;
plot ZeroLine = 0;

input emalength = 50;

plot ema2 = expAverage(fish, emalength);

FTOneBarBack.SetDefaultColor(GetColor(1));
FT.SetDefaultColor(GetColor(8));
ZeroLine.SetDefaultColor(GetColor(5));

def bullish = if ft > ema2 then 1 else 0;
def bearish = if ft < ema2 then 1 else 0;

assignpriceColor(if ft>ftonebarback and bullish then color.green else if ft>ftoneBarBack and bearish then color.blue else if ft<ftoneBarBack and bearish then color.red else if ft<ftOneBarBack and bullish then color.yellow else color.gray);

=====================================================================================================

Accumulation Swing Index Indicator:


# TOS MTF AccumulationSwingIndex
#global variables
input agg = AggregationPeriod.TEN_MIN ;
def cclose = close(period = agg);
def oopen = open(period = agg);
def hhigh = high(period = agg);
def llow = low(period = agg);
# ########################################################
input smaLength = 10;
def limit = 30;
def AbsHighClose = AbsValue(hhigh - cclose[1]);
def AbsLowClose = AbsValue(llow - cclose[1]);
def AbsCloseOpen = AbsValue(cclose[1] - oopen[1]);
def K = If(AbsHighClose >= AbsLowClose, AbsHighClose, AbsLowClose);
def R = If(AbsHighClose >= AbsLowClose,
If(AbsHighClose >= (hhigh - llow), AbsHighClose - 0.5 * AbsLowClose + 0.25 * AbsCloseOpen, (hhigh - llow) + 0.25 * AbsCloseOpen),
If(AbsLowClose >= (hhigh - llow), AbsLowClose - 0.5 * AbsHighClose + 0.25 * AbsCloseOpen, (hhigh - llow) + 0.25 * AbsCloseOpen));
def nRes = If(R != 0,
(50 * (((cclose - cclose[1]) + 0.50 * (cclose - oopen) + 0.25 * (cclose[1] - oopen[1])) / R ) * K / limit) + if !IsNaN(nRes[1]) then nRes[1] else 0,
0 + if !IsNaN(nRes[1]) then nRes[1] else 0);
def ASI = nRes;
def sma = SimpleMovingAvg(ASI,smaLength);
# ########################################################
# charting and formatting
declare lower;
plot pASI = ASI;
pASI.SetLineWeight(3);
pASI.AssignValueColor(if asi>sma then Color.Green else Color.RED);

plot pSMA = sma;
pSMA.SetPaintingStrategy(PaintingStrategy.DASHES);
pSMA.SetLineWeight(1);
pSMA.AssignValueColor(Color.VIOLET);

DefineGlobalColor("bear", CreateColor(225, 0, 0)) ;
DefineGlobalColor("bull", CreateColor(0, 165, 0)) ;
AddCloud(pASI, pSMA, GlobalColor("bull"), GlobalColor("bear"));
---------------------------------------------------------------------------------------------------------------------------------------------------------------

Fibs and Bubbles:

# are created by drawing a trendline between two extreme points and then dividing the
# vertical distance by the key Fibonacci ratios of: 23.6%, 38.2%, 50%, 61.8%, 78.6%, and 100%.

# CHANGE LOG
#
# V1.0 - 12.18.2018 - BenTen - Initial release of Auto Fib, created by Ryan Hendricks
# V1.1 - 11.15.2019 - theelderwand - As script was difficult to read, made the following enhancements
# Expands to right
# Doesn't expand to left
# Custom colors for Fibonacci bars (0.618 is GOLD color)
# Custom line weights
# Code is modularized so you can add extra plots as needed
# V1.2 - 11.15.2019 - tomsk - Added an input selector for the colors of the label. You
# can select from any of the colors listed - red, orange,
# green, etc and bubbles for all the fib retracements will
# utilize that color.
# V1.3 - 11.19.2019 - tomsk - Modified the AddChartBubbles to be displayed on the right
# side of the chart. Please ensure that you increase the
# expansion area to that the bubbles have room to be displayed
# Chart Settings > Time Axis > Expansion Area

#hint Price: Price used in the alerts on crossing retracement lines. <b>(Default is Close)</b>

#hint coefficient_0: Retracement Line 0: Retracement from the highest high to the lowest low.<b>(Default is 0%)</b>
#hint Coefficient_1: Retracement Line 1: Retracement from the highest high to the lowest low.<b>(Default is 23.6%)</b>
#hint Coefficient_2: Retracement Line 2: Retracement from the highest high to the lowest low.<b>(Default is 38.2%)</b>
#hint Coefficient_3: Retracement Line 3: Retracement from the highest high to the lowest low.<b>(Default is 50%)</b>
#hint Coefficient_4: Retracement Line 4: Retracement from the highest high to the lowest low.<b>(Default is 61.8%)</b>
#hint Coefficient_5: Retracement Line 5: Retracement from the highest high to the lowest low.<b>(Default is 78.6%)</b>
#hint Coefficient_6: Retracement Line 6: Retracement from the highest high to the lowest low.<b>(Default is 100%)</b>

#wizard input: Price
#wizard text: Inputs: Price:
#wizard input: coefficient_0
#wizard text: coefficient_0:
#wizard input: Coefficient_1
#wizard text: Coefficient_1:
#wizard input: Coefficient_2
#wizard text: Coefficient_2:
#wizard input: Coefficient_3
#wizard text: Coefficient_3:
#wizard input: Coefficient_4
#wizard text: Coefficient_4:
#wizard input: Coefficient_5
#wizard text: Coefficient_5:
#wizard input: Coefficient_6
#wizard text: Coefficient_6:

input price = close;
input high = high;
input low = low;
input coefficient_0 = 0.000;
input coefficient_1 = .236;
input Coefficient_2 = .382;
input Coefficient_3 = .500;
input Coefficient_4 = .618;
input Coefficient_5 = .786;
input Coefficient_6 = 1.000;

input LabelColor = {default "MAGENTA", "CYAN", "PINK", "LIGHT_GRAY", "ORANGE", "RED", "GREEN", "GRAY", "WHITE"};
input n = 3;

def n1 = n + 1;
def a = HighestAll(high);
def b = LowestAll(low);
def barnumber = BarNumber();
def c = if high == a then barnumber else Double.NaN;
def d = if low == b then barnumber else Double.NaN;
rec highnumber = CompoundValue(1, if IsNaN(c) then highnumber[1] else c, c);
def highnumberall = HighestAll(highnumber);
rec lownumber = CompoundValue(1, if IsNaN(d) then lownumber[1] else d, d);
def lownumberall = LowestAll(lownumber);

def upward = highnumberall > lownumberall;
def downward = highnumberall < lownumberall;

def x = AbsValue(lownumberall - highnumberall );

def slope = (a - b) / x;
def slopelow = (b - a) / x;

def day = GetDay();
def month = GetMonth();
def year = GetYear();
def lastDay = GetLastDay();
def lastmonth = GetLastMonth();
def lastyear = GetLastYear();
def isToday = If(day == lastDay and month == lastmonth and year == lastyear, 1, 0);
def istodaybarnumber = HighestAll(if isToday then barnumber else Double.NaN);
def line = b + (slope * (barnumber - lownumber));
def linelow = a + (slopelow * (barnumber - highnumber));
def currentlinelow = if barnumber <= lownumberall then linelow else Double.NaN;
def currentline = if barnumber <= highnumberall then line else Double.NaN;

plot FibFan = if downward then currentlinelow else if upward then currentline else Double.NaN;
FibFan.SetStyle(Curve.SHORT_DASH);
FibFan.AssignValueColor(Color.RED);
FibFan.HideBubble();

def range = a - b;

def value0 = range * coefficient_0;
def value1 = range * coefficient_1;
def value2 = range * Coefficient_2;
def value3 = range * Coefficient_3;
def value4 = range * Coefficient_4;
def value5 = range * Coefficient_5;
def value6 = range * Coefficient_6;

def condition1 = downward and barnumber >= highnumberall;
def condition2 = upward and barnumber >= lownumberall;

plot Retracement0 = if condition1 then HighestAll(b + value0) else if condition2 then HighestAll(a - value0) else Double.NaN;
plot Retracement1 = if condition1 then HighestAll(b + value1) else if condition2 then HighestAll(a - value1) else Double.NaN;
plot Retracement2 = if condition1 then HighestAll(b + value2) else if condition2 then HighestAll(a - value2) else Double.NaN;
plot Retracement3 = if condition1 then HighestAll(b + value3) else if condition2 then HighestAll(a - value3) else Double.NaN;
plot Retracement4 = if condition1 then HighestAll(b + value4) else if condition2 then HighestAll(a - value4) else Double.NaN;
plot Retracement5 = if condition1 then HighestAll(b + value5) else if condition2 then HighestAll(a - value5) else Double.NaN;
plot Retracement6 = if condition1 then HighestAll(b + value6) else if condition2 then HighestAll(a - value6) else Double.NaN;

Retracement0.AssignValueColor(CreateColor(255, 255, 255));
Retracement0.SetLineWeight(4);
Retracement0.HideBubble();
AddChartBubble((downward and close[n1]) and IsNaN(close[n]), Retracement0, Concat( (coefficient_0 * 100), "%"), GetColor(LabelColor), yes);
AddChartBubble((upward and close[n1]) and IsNaN(close[n]), Retracement0, Concat( (coefficient_0 * 100), "%"), GetColor(LabelColor), yes);

Retracement1.AssignValueColor(CreateColor(173, 216, 230));
Retracement1.SetLineWeight(2);
Retracement1.HideBubble();
AddChartBubble((downward and close[n1]) and IsNaN(close[n]), Retracement1, Concat( (coefficient_1 * 100), "%"), GetColor(LabelColor), yes);
AddChartBubble((upward and close[n1]) and IsNaN(close[n]), Retracement1, Concat( (coefficient_1 * 100), "%"), GetColor(LabelColor), yes);

Retracement2.AssignValueColor(CreateColor(0, 197, 49));
Retracement2.SetLineWeight(2);
Retracement2.HideBubble();
AddChartBubble((downward and close[n1]) and IsNaN(close[n]), Retracement2, Concat( (Coefficient_2 * 100), "%"), GetColor(LabelColor), yes);
AddChartBubble((upward and close[n1]) and IsNaN(close[n]), Retracement2, Concat( (Coefficient_2 * 100), "%"), GetColor(LabelColor), yes);

Retracement3.AssignValueColor(CreateColor(255, 64, 64));
Retracement3.SetLineWeight(3);
Retracement3.HideBubble();
AddChartBubble((downward and close[n1]) and IsNaN(close[n]), Retracement3, Concat( (Coefficient_3 * 100), "%"), GetColor(LabelColor), yes);
AddChartBubble((upward and close[n1]) and IsNaN(close[n]), Retracement3, Concat( (Coefficient_3 * 100), "%"), GetColor(LabelColor), yes);

Retracement4.AssignValueColor(CreateColor(255, 215, 0));
Retracement4.SetLineWeight(5);
Retracement4.HideBubble();
AddChartBubble((downward and close[n1]) and IsNaN(close[n]), Retracement4, Concat( (Coefficient_4 * 100), "%"), GetColor(LabelColor), yes);
AddChartBubble((upward and close[n1]) and IsNaN(close[n]), Retracement4, Concat( (Coefficient_4 * 100), "%"), GetColor(LabelColor), yes);

Retracement5.AssignValueColor(CreateColor(0, 255, 255));
Retracement5.SetLineWeight(2);
Retracement5.HideBubble();
AddChartBubble((downward and close[n1]) and IsNaN(close[n]), Retracement5, Concat( (Coefficient_5 * 100), "%"), GetColor(LabelColor), yes);
AddChartBubble((upward and close[n1]) and IsNaN(close[n]), Retracement5, Concat( (Coefficient_5 * 100), "%"), GetColor(LabelColor), yes);

Retracement6.AssignValueColor(CreateColor(255, 255, 255));
Retracement6.SetLineWeight(4);
Retracement6.HideBubble();
AddChartBubble((downward and close[n1]) and IsNaN(close[n]), Retracement6, Concat( (Coefficient_6 * 100), "%"), GetColor(LabelColor), yes);
AddChartBubble((upward and close[n1]) and IsNaN(close[n]), Retracement6, Concat( (Coefficient_6 * 100), "%"), GetColor(LabelColor), yes);

Alert((price crosses below Retracement0) , "Price crosses below Retracement Line 0");
Alert((price crosses above Retracement0) , "Price crosses above Retracement Line 0");
Alert((price crosses below Retracement1) , "Price crosses below Retracement Line 1");
Alert((price crosses above Retracement1) , "Price crosses above Retracement Line 1");
Alert((price crosses below Retracement2) , "Price crosses below Retracement Line 2");
Alert((price crosses above Retracement2) , "Price crosses above Retracement Line 2");
Alert((price crosses below Retracement3) , "Price crosses below Retracement Line 3");
Alert((price crosses above Retracement3) , "Price crosses above Retracement Line 3");
Alert((price crosses below Retracement4) , "Price crosses below Retracement Line 4");
Alert((price crosses above Retracement4) , "Price crosses above Retracement Line 4");
Alert((price crosses below Retracement5) , "Price crosses below Retracement Line 5");
Alert((price crosses above Retracement5) , "Price crosses above Retracement Line 5");
Alert((price crosses below Retracement6) , "Price crosses below Retracement Line 6");
Alert((price crosses above Retracement6) , "Price crosses above Retracement Line 6");
# End Auto Fib v1.3

====================================================================================
 
Last edited:
Are the 5-10-20 Echart settings for intraday timeframes? Also could you post the script for ECHART for watchlist, somehow I can load on the chart but not on the watchlist.
Yes, they are for whatever time frame you choose.

# E-Charts v3

declare upper;
input short_average = 5;
input medium_average = 10;
input long_average = 20;
input average_type = {default "SMA", "EMA"};
input showArrows = yes;

def MA1;
def MA2;
def MA3;
switch (average_type) {
case "SMA":
MA1 = Average(close, short_average);
MA2 = Average(close, medium_average);
MA3 = Average(close, long_average);
case "EMA":
MA1 = ExpAverage(close, short_average);
MA2 = ExpAverage(close, medium_average);
MA3 = ExpAverage(close, long_average);
}

# define e-signal and crossover point
def Eup = MA1 > MA2 && MA2 > MA3;
def Edn = MA1 < MA2 && MA2 < MA3;

def CrossUp = close > MA1 && Eup && !Eup[1];
def CrossDn = close < MA1 && Edn && !Edn[1];

# Define up and down signals
def higherHigh = close > Highest(Max(open, close), 3)[1];
def lowerLow = close < Lowest(Min(open, close), 3)[1];
def SignalUp = if (CrossUp && higherHigh)
then 1
else if (CrossUp[1] && higherHigh && !higherHigh[1])
then 1
else if (CrossUp[2] && higherHigh && !higherHigh[1] && !higherHigh[2])
then 1
else Double.NaN;
def SignalDn = if (CrossDn && lowerLow)
then 1
else if (CrossDn[1] && lowerLow && !lowerLow[1])
then 1
else if (CrossDn[2] && lowerLow && !lowerLow[1] && !lowerLow[2])
then 1
else Double.NaN;

# Plot the moving average lines
plot ln1 = MA1;
ln1.SetDefaultColor(CreateColor(145, 210, 144));
ln1.SetLineWeight(2);
plot ln2 = MA2;
ln2.SetDefaultColor(CreateColor(111, 183, 214));
ln2.SetLineWeight(2);
plot ln3 = MA3;
ln3.SetDefaultColor(CreateColor(249, 140, 182));
ln3.SetLineWeight(2);

# Show an arrow
plot ArrowUp = if SignalUp and showArrows then low * 0.997 else Double.NaN;
ArrowUp.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
ArrowUp.SetLineWeight(4);
ArrowUp.SetDefaultColor(Color.YELLOW);
plot ArrowDn = if SignalDn and showArrows then high * 1.003 else Double.NaN;
ArrowDn.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
ArrowDn.SetLineWeight(4);
ArrowDn.SetDefaultColor(Color.CYAN);

# Add label for Eup or Edn
AddLabel(Eup, "E Up", CreateColor(134, 202, 93));
AddLabel(Edn, "E Dn", CreateColor(232, 148, 157));

# Calculate Meter Values
def sl1 = ma1 > ma1[1];
def sl2 = ma2 > ma2[1];
def sl3 = ma3 > ma3[1];
def p1 = close > ma1;
def p2 = close > ma2;
def p3 = close > ma3;
def u1 = 2 * (close > open);
def u2 = 2 * (close > high[1]);
def d1 = 2 * (close < open);
def d2 = 2 * (close < low[1]);

def UPstr = sl1 + sl2 + sl3 + p1 + p2 + p3 + u1 + u2;
def DNstr = !sl1 + !sl2 + !sl3 + !p1 +!p2 + !p3 + d1 + d2;

# Add Strength Meter
AddLabel(Eup or Edn, " ", if Eup and UPstr >= 3 then CreateColor(128, 199, 94) else if Edn and DNstr >= 3 then CreateColor(232, 143, 153) else CreateColor(177,177,166));
AddLabel(Eup or Edn, " ", if Eup and UPstr >= 6 then CreateColor(99, 197, 72) else if Edn and DNstr >= 6 then CreateColor(238, 123, 136) else CreateColor(177,177,166));
AddLabel(Eup or Edn, " ", if Eup and UPstr >= 8 then CreateColor(65, 195, 50) else if Edn and DNstr >= 8 then CreateColor(245, 101, 117) else CreateColor(177,177,166));
AddLabel(Eup or Edn, " ", if Eup and UPstr == 10 then CreateColor(41, 192, 36) else if Edn and DNstr == 10 then CreateColor(249, 81, 101) else CreateColor(177,177,166));
 
ATR Channel :cool:

#channel with ATR
input price = close;
input length = 65;
input atrmod=2;
def bn = barnumber();
def lastBar = highestall(if isnan(close) then 0 else bn);
def offset = bn - lastbar;
plot MiddleLR = InertiaAll(price, length);
def dist = getvalue(ATR(length),offset);
plot UpperLR = MiddleLR + atrmod*dist;
plot LowerLR = MiddleLR - atrmod*dist;
 
Here is a Bolinger Band script titled "B4 Indicator" referenced to: https://usethinkscript.com/threads/balanced-bb-breakout.5708/

Code:
# B4 Indicator
#
# Free for use. Header credits must be included when any form of the code included in this package is used.
# User assumes all risk. Author not responsible for errors or use of tool.
# Copyright (c) 2021 B4 Signals
#
# Get support at: https://b4signals.com
# Join us at: https://discord.gg/kD3pKE2CQd
#
#
# v3.0 - barbros / chuck - official release

declare lower;

input ShowMarketForecastLabel = yes;        #hint ShowMarketForecastLabel: Show the intermediate Market Forecast label
input ShowMACDBBLabel = yes;                #hint ShowMACDBBLabel: Show the MACDBB based Trend label
input ShowMACDBBCloud = no;                 #hint ShowMACDBBCloud: Show the MACDBB cloud shaded between BB
input ShowRSMCloud = no;                    #hint ShowRSMCloud: Show the vertical cloud based on RSM
input ShowHMALabel = yes;                   #hint ShowHMALabel: Show HUll Moving Average based Divergence label
input ShowSTOCHSCALPERSqueezeLabel = yes;   #hint ShowSTOCHSCALPERSqueezeLabel: Show Stochastic Scalper based squeeze label
input ShowSTOCHSCALPERSqueezeCloud = yes;   #hint ShowSTOCHSCALPERSqueezeCloud: Show Stochastic Scalper based squeeze cloud between BB
input ShowBullBearVerticalLines = yes;      #hint ShowBullBearVerticalLines: Show vertical lines for bullish or bearish direction

AddLabel(yes, "B4 Indicator", Color.WHITE);

### Market Forecast

def pIntermediate = MarketForecast().Intermediate;

AddLabel(ShowMarketForecastLabel,
    "Market Forecast " +
    if pIntermediate >= 80 then "Bullish" else
    if pIntermediate <= 20 then "Bearish" else
    if pIntermediate > pIntermediate[1] then "Rising" else
    if pIntermediate < pIntermediate[1] then "Falling" else "Neutral",
    if pIntermediate >= 80 then Color.DARK_GREEN else
    if pIntermediate <= 20 then Color.DARK_RED else
    if pIntermediate > pIntermediate[1] then Color.GREEN else
    if pIntermediate < pIntermediate[1] then Color.RED else Color.GRAY
);

### MACDBB

input MACDBB_FastLength = 12;
input MACDBB_SlowLength = 26;
input MACDBB_BandLength = 15;
input MACDBB_NumDev = 1.0;

def MACDBB_Data = MACD(fastLength = MACDBB_FastLength, slowLength = MACDBB_SlowLength, MACDLength = 5);

plot MACDBB_Upper = reference BollingerBands(price = MACDBB_Data, length = MACDBB_BandLength,
                                             Num_Dev_Dn = -MACDBB_NumDev, Num_Dev_Up = MACDBB_NumDev).UpperBand;
MACDBB_Upper.SetDefaultColor(Color.RED);
MACDBB_Upper.HideTitle();
MACDBB_Upper.HideBubble();

plot MACDBB_Lower = reference BollingerBands(price = MACDBB_Data, length = MACDBB_BandLength,
                                             Num_Dev_Dn = -MACDBB_NumDev, Num_Dev_Up = MACDBB_NumDev).Lowerband;
MACDBB_Lower.SetDefaultColor(Color.GREEN);
MACDBB_Lower.HideTitle();
MACDBB_Lower.HideBubble();

plot MACDBB_Midline = reference BollingerBands(price = MACDBB_Data, length = MACDBB_BandLength,
                                               Num_Dev_Dn = -MACDBB_NumDev, Num_Dev_Up = MACDBB_NumDev).MidLine;
MACDBB_Midline.SetDefaultColor(Color.LIGHT_RED);
MACDBB_Midline.SetStyle(Curve.FIRM);
MACDBB_MidLine.HideTitle();
MACDBB_MidLine.HideBubble();

plot MACDBB_Line = MACDBB_Data;
MACDBB_Line.AssignValueColor(
    if MACDBB_Line > MACDBB_Line[1] and MACDBB_Line >= MACDBB_Upper then Color.GREEN
    else if MACDBB_Line < MACDBB_Line[1] and MACDBB_Line >= MACDBB_Upper then Color.DARK_GREEN
    else if MACDBB_Line < MACDBB_Line[1] and MACDBB_Line <= MACDBB_Lower then Color.RED else
    if MACDBB_Line > MACDBB_Line[1] and MACDBB_Line <= MACDBB_Lower then Color.DARK_RED
    else Color.GRAY
);
MACDBB_Line.SetLineWeight(1);

plot MACDBB_Dots = MACDBB_Data;
MACDBB_Dots.AssignValueColor(
    if MACDBB_Line > MACDBB_Line[1] and MACDBB_Line > MACDBB_Upper then Color.GREEN
    else if MACDBB_Line < MACDBB_Line[1] and MACDBB_Line > MACDBB_Upper then Color.DARK_GREEN
    else if MACDBB_Line < MACDBB_Line[1] and MACDBB_Line < MACDBB_Lower then Color.RED
    else if MACDBB_Line > MACDBB_Line[1] and MACDBB_Line < MACDBB_Lower then Color.DARK_RED
    else Color.GRAY
);
MACDBB_Dots.SetPaintingStrategy(PaintingStrategy.LINE_VS_POINTS);
MACDBB_Dots.SetLineWeight(1);
MACDBB_Dots.HideTitle();
MACDBB_Dots.HideBubble();

input MACDBB_CrossFromAboveAlert = {default "Zero", "Lower", "Middle", "Upper"};
input MACDBB_CrossFromBelowAlert = {default "Zero", "Lower", "Middle", "Upper"};

def MACDBB_CrossFromAboveVal = if MACDBB_CrossFromAboveAlert == MACDBB_CrossFromAboveAlert.Lower then MACDBB_Lower
                               else if MACDBB_CrossFromAboveAlert == MACDBB_CrossFromAboveAlert.Upper then MACDBB_Upper
                              else 0;
def MACDBB_CrossFromBelowVal = if MACDBB_CrossFromBelowAlert == MACDBB_CrossFromBelowAlert.Lower then MACDBB_Lower
                               else if MACDBB_CrossFromBelowAlert == MACDBB_CrossFromBelowAlert.Upper then MACDBB_Upper
                               else 0;

def MACDBB_Buy = MACDBB_Data > MACDBB_Upper;
def MACDBB_Sell = MACDBB_Data <= MACDBB_Lower;

AddLabel(ShowMACDBBLabel,
    "Trend " +
    if MACDBB_Line > MACDBB_Line[1] and MACDBB_Line > MACDBB_Upper then "Bullish"
    else if MACDBB_Line < MACDBB_Line[1] and MACDBB_Line > MACDBB_Upper then "Bullish (reversing)"
    else if MACDBB_Line < MACDBB_Line[1] and MACDBB_Line < MACDBB_Lower then "Bearish"
    else if MACDBB_Line > MACDBB_Line[1] and MACDBB_Line < MACDBB_Lower then "Bearish (reversing)"
    else "Neutral",
    if MACDBB_Line > MACDBB_Line[1] and MACDBB_Line > MACDBB_Upper then Color.GREEN
    else if MACDBB_Line < MACDBB_Line[1] and MACDBB_Line > MACDBB_Upper then Color.DARK_GREEN
    else if MACDBB_Line < MACDBB_Line[1] and MACDBB_Line < MACDBB_Lower then Color.RED
    else if MACDBB_Line > MACDBB_Line[1] and MACDBB_Line < MACDBB_Lower then Color.DARK_RED
    else Color.GRAY
);

AddCloud(if ShowMACDBBCloud then MACDBB_Upper else MACDBB_Lower, MACDBB_Lower, Color.LIGHT_RED);

### RSI/STOCASTIC/MACD CONFLUENCE COMBO

plot RSM_MACD_Diff = reference MACD("fast length" = 12, "slow length" = 26, "macd length" = 9).Diff;
RSM_MACD_Diff.SetDefaultColor(GetColor(5));
RSM_MACD_Diff.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
RSM_MACD_Diff.SetLineWeight(4);
RSM_MACD_Diff.DefineColor("Positive and Up", Color.GREEN);
RSM_MACD_Diff.DefineColor("Positive and Down", Color.DARK_GREEN);
RSM_MACD_Diff.DefineColor("Negative and Down", Color.RED);
RSM_MACD_Diff.DefineColor("Negative and Up", Color.DARK_RED);
RSM_MACD_Diff.AssignValueColor(
    if RSM_MACD_Diff >= 0 then
        if RSM_MACD_Diff > RSM_MACD_Diff[1] then RSM_MACD_Diff.Color("Positive and Up") else RSM_MACD_Diff.Color("Positive and Down")
    else
        if RSM_MACD_Diff < RSM_MACD_Diff[1] then RSM_MACD_Diff.Color("Negative and Down") else RSM_MACD_Diff.Color("Negative and Up")
);

plot RSM_MACD_ZeroLine = 0;
RSM_MACD_ZeroLine.SetDefaultColor(Color.DARK_GRAY);
RSM_MACD_ZeroLine.HideTitle();
RSM_MACD_ZeroLine.HideBubble();

def RSM_RSI = reference RSI(length = 7).RSI;

def RSM_Stoch_Val = 100 * (close - lowest(low, 14)) / (highest(high, 14) - lowest(low, 14));
def RSM_StochSlowK = SimpleMovingAvg(SimpleMovingAvg(RSM_Stoch_Val,3),3);

def RSM_rsiGreen = RSM_RSI >= 50;
def RSM_rsiRed = RSM_RSI < 50;
def RSM_stochGreen = RSM_StochSlowK >= 50;
def RSM_stochRed = RSM_StochSlowK < 50;
def RSM_macdGreen = RSM_MACD_Diff >= 0;
def RSM_macdRed = RSM_MACD_Diff < 0;
def RSM_Buy = RSM_rsiGreen and RSM_stochGreen and RSM_macdGreen;
def RSM_Sell = RSM_rsiRed and RSM_stochRed and RSM_macdRed;

# Shade areas based on criteria; adjust as needed

AddCloud(
    if ShowRSMCloud and RSM_rsiGreen and RSM_stochGreen and RSM_macdGreen then Double.POSITIVE_INFINITY else Double.NaN,
    if ShowRSMCloud and RSM_rsiGreen and RSM_stochGreen and RSM_macdGreen then Double.NEGATIVE_INFINITY else Double.NaN, Color.LIGHT_GREEN
);
AddCloud(
    if ShowRSMCloud and RSM_rsiRed and RSM_stochRed and RSM_macdRed then Double.POSITIVE_INFINITY else Double.NaN,
    if ShowRSMCloud and RSM_rsiRed and RSM_stochRed and RSM_macdRed then Double.NEGATIVE_INFINITY else Double.NaN, Color.LIGHT_RED
);

### Divergance
input HMA_Length = 55;
input HMA_Lookback = 2;

def HMA = HullMovingAvg(price = HL2, length = HMA_Length);
def HMA_delta = HMA[1] - HMA[HMA_Lookback + 1];
def HMA_delta_per_bar = HMA_delta / HMA_Lookback;
def HMA_next_bar = HMA[1] + HMA_delta_per_bar;
def HMA_concavity = if HMA > HMA_next_bar then 1 else -1;
def HMA_MA_Max = if HMA[-1] < HMA and HMA > HMA[1] then HMA else Double.NaN;
def HMA_MA_Min = if HMA[-1] > HMA and HMA < HMA[1] then HMA else Double.NaN;
def HMA_divergence = HMA - HMA_next_bar;

AddLabel(ShowHMALabel,
        "Divergence " +
        if HMA_concavity < 0 then
            if HMA_divergence[1] > HMA_divergence then "Bearish"
            else "Bearish (reversing)"
        else
            if HMA_divergence[1] < HMA_divergence then "Bullish"
            else "Bullish (reversing)",
        if HMA_concavity < 0 then
            if HMA_divergence[1] > HMA_divergence then Color.RED
            else Color.DARK_RED
        else
            if HMA_divergence[1] < HMA_divergence then Color.GREEN
            else Color.DARK_GREEN
);

### Stocastic Scalper

def STOCHSCALPER_oSS = (open[1] + close[1]) / 2;
def STOCHSCALPER_hSS = Max(high, close[1]);
def STOCHSCALPER_lSS = Min(low, close[1]);
def STOCHSCALPER_cSS = (STOCHSCALPER_oSS + STOCHSCALPER_hSS + STOCHSCALPER_lSS + close) / 4;

def STOCHSCALPER_mean = Average(STOCHSCALPER_cSS, 20);
def STOCHSCALPER_sd = StDev(STOCHSCALPER_cSS, 20);
def STOCHSCALPER_atr = Average(TrueRange(STOCHSCALPER_cSS, STOCHSCALPER_hSS, STOCHSCALPER_lSS), 20);
def STOCHSCALPER_squeeze = if (STOCHSCALPER_mean + (2 * STOCHSCALPER_sd)) < (STOCHSCALPER_mean + (1.5 * STOCHSCALPER_atr)) then yes else no;
def STOCHSCALPER_squeeze_signal = !STOCHSCALPER_squeeze[1] and STOCHSCALPER_squeeze;

AddCloud(if ShowSTOCHSCALPERSqueezeCloud and STOCHSCALPER_squeeze then MACDBB_Upper else Double.NaN,
         if ShowSTOCHSCALPERSqueezeCloud and STOCHSCALPER_squeeze then MACDBB_Lower else Double.NaN, Color.YELLOW);
AddLabel(ShowSTOCHSCALPERSqueezeLabel, "Scalper Squeeze", if STOCHSCALPER_squeeze then Color.WHITE else Color.GRAY);

### RSI IFT

def RSI_IFT_R = reference RSI(5, close) - 50;
def RSI_IFT_AvgRSI = MovingAverage(AverageType.Exponential,RSI_IFT_R,9);
def RSI_IFT_InverseRSI = (Power(Double.E, 2 * RSI_IFT_AvgRSI) - 1) / (Power(Double.E, 2 * RSI_IFT_AvgRSI) + 1);
def RSI_IFT_Direction = if BarNumber() == 0 then 0
                        else if (RSI_IFT_InverseRSI[1] > 0) and (RSI_IFT_InverseRSI < 0) then -1
                        else if (RSI_IFT_InverseRSI > 0) and (RSI_IFT_InverseRSI[1] < 0) then 1
                        else RSI_IFT_Direction[1];

### Fibonacci SuperTrend

input FST_Length = 11;
input FST_Retrace = 23.6;
input FST_UseHighLow = yes;

def FST_h = if FST_UseHighLow then high else close;
def FST_l = if FST_UseHighLow then low else close;
def FST_minL = Lowest(FST_l, FST_Length);
def FST_maxH = Highest(FST_h, FST_Length);

def FST_hh = if FST_h > FST_maxH[1] then FST_h else FST_hh[1];
def FST_ll = if FST_l < FST_minL[1] then FST_l else FST_ll[1];
def FST_trend = if FST_h > FST_maxH[1] then 1 else if FST_l < FST_minL[1] then -1 else FST_trend[1];
def FST_Direction = if BarNumber() == 0 then 0
                    else if FST_trend != 1 then -1
                    else if FST_trend == 1 then 1
                    else FST_Direction[1];

### Bar Color

input BarColor = { "None", default "RSM", "FibonacciSuperTrend" };    #hint BarColor: Paint bars with RSM or Fibonacci SuperTrend direction

AssignPriceColor(
    if BarColor == BarColor.FibonacciSuperTrend then
        if FST_trend == 1 then Color.GREEN else Color.RED
    else if BarColor == BarColor.RSM then
        if RSM_Buy then Color.GREEN
        else if RSM_Sell then Color.RED
        else Color.DARK_GRAY
    else Color.CURRENT
);

### Strategy

input BullBear_Include_FST = yes;       #hint BullBear_Include_FST: Include Fibonacci SuperTrend in the vertical line strategy
input BullBear_Include_RSI_IFT = yes;   #hint BullBear_Include_RSI_IFT: Include RSI IFT in the vertical line strategy

def BullBear_Buy = (!BullBear_Include_FST or FST_Direction == 1) and
                   (!BullBear_Include_RSI_IFT or RSI_IFT_Direction == 1);
def BullBear_Sell = (!BullBear_Include_FST or FST_Direction == -1) and
                    (!BullBear_Include_RSI_IFT or RSI_IFT_Direction == -1);

AddVerticalLine(ShowBullBearVerticalLines and BullBear_Buy and !BullBear_Buy[1],
                AsDollars(close),
                Color.GREEN, Curve.SHORT_DASH);
AddVerticalLine(ShowBullBearVerticalLines and BullBear_Sell and !BullBear_Sell[1],
                AsDollars(close),
                Color.RED, Curve.SHORT_DASH);

def Strategy_Buy = BullBear_Buy and MACDBB_Buy and RSM_Buy;
def Strategy_Sell = BullBear_Sell and MACDBB_Sell and RSM_Sell;
def Strategy_BuySignal = Strategy_Buy and !Strategy_Buy[1];
def Strategy_SellSignal = Strategy_Sell and !Strategy_Sell[1];

plot BuyArrow = if Strategy_BuySignal then 0 else Double.NaN;
BuyArrow.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
BuyArrow.SetDefaultColor(Color.WHITE);
BuyArrow.HideTitle();
BuyArrow.HideBubble();

plot SellArrow = if Strategy_SellSignal then 0 else Double.NaN;
SellArrow.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
SellArrow.SetDefaultColor(Color.WHITE);
SellArrow.HideTitle();
SellArrow.HideBubble();

### Alerts

Alert(Strategy_BuySignal, "Long Entry", Alert.BAR, Sound.DING);
Alert(Strategy_SellSignal, "Short Entry", Alert.BAR, Sound.DING);
Alert(MACDBB_Line crosses above MACDBB_CrossFromAboveVal, "MACDBB Crossed Up", Alert.BAR, Sound.DING);
Alert(MACDBB_Line crosses below MACDBB_CrossFromBelowVal, "MACDBB Crossed Down", Alert.BAR, Sound.DING);
Alert(STOCHSCALPER_squeeze_signal, "Scalper Squeeze", Alert.BAR, Sound.DING);
 
raider could you give us an example how you used b4 today
@poststreet, my trade plan calls for reduced risk on Mondays and Fridays, so I took only one trade today. Sold multiple MNQ contracts shortly after the US open. The B4 lower strategy signal (red dotted line) gave me the heads up around 9am. Hindsight shows that I would have been ok to enter then but I waited until the MACD BB dots turned red and crossed below the lower band. Because it was Monday, I also waited for the tea market cycle and confirmation candles to be in confluence as well. The instrument, day of week, and time of day influence whether I enter a trade based on B4 alignment with price action or whether I wait for other pieces of data to align before entry. Today was a reduced risk day so I waited. Hope that made sense.
 
This is a Bollinger Band script that Tomsk wrote Dec 2019 this script will color candles blue when above the upper band.
https://usethinkscript.com/threads/colored-candles-based-on-bollinger-bands.1265/

input price = close;
input displace = 0;
input length = 20;
input Num_Dev_Dn = -2.0;
input Num_Dev_up = 2.0;
input averageType = AverageType.Simple;

def sDev = stdev(data = price[-displace], length = length);

plot MidLine = MovingAverage(averageType, data = price[-displace], length = length);
plot LowerBand = MidLine + num_Dev_Dn * sDev;
plot UpperBand = MidLine + num_Dev_Up * sDev;

AssignPriceColor(if close > UpperBand then Color.BLUE else Color.CURRENT);

Example 5 min chart:
 
I am constantly refining my charts using "all the wonderful indicators found on_ thanks to our coders. So I am going to post this in hopes this chart will benefit others. the two indicators not included that are very helpful are Buy The Dip and Take Profit and those come with an annual membership to the site.

https://tos.mx/tKkSuhS

 
Last edited:
Here is an interesting script called Long Tailed Candle this inserts a blue dot on candles to show shorts and longs with alarms I cannot find this on-site.

Code:
# define long tail bar
def TailDown = (min(open, close) - low) > (high - low)*0.49;
def TailUp = (high - max(open, close)) > (high - low)*0.49;

# define high volume
def AvgVol = Average(volume, 6);
def VolUP = volume > AvgVol and volume > volume[1]*0.7;

# define trend
def MA1 = ExpAverage(close, 8);
def MA2 = ExpAverage(close, 21);
def MA3 = ExpAverage(close, 50);
def EUP = MA1 > MA2 && MA1 > MA3 && MA2 > MA3 && MA2 > MA2[2];
def EDN = MA1 < MA2 && MA1 < MA3 && MA2 < MA3 && MA2 < MA2[2];

# plot point at long bar or short bar
plot SignalBuy = if TailUp and EUP and VolUP then low - 0.03 else Double.nan;
plot SignalSell = if TailDown and EDN and VolUP then high + 0.03 else Double.nan;
SignalBuy.SetPaintingStrategy(PaintingStrategy.POINTS);
SignalBuy.AssignValueColor(color.BLUE);
SignalBuy.SetLineWeight(3);
SignalSell.SetpaintingStrategy(PaintingStrategy.POINTS);
SignalSell.AssignValueColor(color.BLUE);
SignalSell.SetLineWeight(3);

# show alert and make sound
alert(SignalBuy[1], " Buy above high of candle in uptrend: " + high[1], alert.BAR, sound.Bell);
alert(SignalSell[1], " Sell below low of candle in downtrend: " + low[1], alert.BAR, sound.Bell);
 
Hey, @J007RMC, thanks for posting that. I changed the color of the short signal to differentiate it from a long. Looks better to my eye now. Thanks for sharing! You test so many indicators I honestly don't know how you have time to trade 😆
The more I use it the more I like it. I also have a moving average study I came across I named it 3 Amigos I seem to rely on quite a bit.

Code:
#3_AMIGOS
#EDITED BY MCPHERSON J
#05/07/2021


##Code start

declare upper;

input fastPeriod = 3;
input slowPeriod = 10;
input signalPeriod = 5;
input price = close;

def fastEma = ExpAverage(price, fastPeriod);
def slowEma = ExpAverage(price, slowPeriod);

def _ppo = ((fastEma - slowEma) / slowEma) * 100;
def _signal = ExpAverage(_ppo, signalPeriod);

plot BUY = Crosses(_ppo, _signal, CrossingDirection.ABOVE);
plot SELL = Crosses(_ppo, _signal, CrossingDirection.BELOW);

BUY.setpaintingstrategy(paintingstrategy.BOOLEAN_ARROW_UP);
SELL.setpaintingstrategy(paintingstrategy.BOOLEAN_ARROW_DOWN);
##End
 
I just finished this MSFT short where the left grid is SPY a 1kt and the right time. Using the fighter scalper moving average oscillator it unlikely to be shaken out of a trade.


declare lower;

input price = hl2;
input length = 10;

def maxHigh = Highest(price, length);
def minLow = Lowest(price, length);
def range = maxHigh - minLow;
rec value = if IsNaN(price)
then Double.NaN
else if IsNaN(range)
then value[1]
else if range == 0
then 0
else 0.66 * ((price - minLow) / range - 0.5) + 0.67 * value[1];
def truncValue = if value > 0.99 then 0.999 else if value < -0.99 then -0.999 else value;
rec fish = 0.5 * (log((1 + truncValue) / (1 - truncValue)) + fish[1]);

plot FTOneBarBack = fish[1];
plot FT = fish;
plot ZeroLine = 0;

input emalength = 50;

plot ema2 = expAverage(fish, emalength);

FTOneBarBack.SetDefaultColor(GetColor(1));
FT.SetDefaultColor(GetColor(8));
ZeroLine.SetDefaultColor(GetColor(5));

def bullish = if ft > ema2 then 1 else 0;
def bearish = if ft < ema2 then 1 else 0;

assignpriceColor(if ft>ftonebarback and bullish then color.green else if ft>ftoneBarBack and bearish then color.blue else if ft<ftoneBarBack and bearish then color.red else if ft<ftOneBarBack and bullish then color.yellow else color.gray);
 
Can you explain the various indicators? I'm new to TOS and trying to understand the code and functions. Thx
Hi, Sledge honestly I'm not running this chart nowadays but the clouds represent moving averages. You may want to change your chart to my last post where I can better explain that one.:):)
 
I just finished this MSFT short where the left grid is SPY a 1kt and the right time. Using the fighter scalper moving average oscillator it unlikely to be shaken out of a trade.


declare lower;

input price = hl2;
input length = 10;

def maxHigh = Highest(price, length);
def minLow = Lowest(price, length);
def range = maxHigh - minLow;
rec value = if IsNaN(price)
then Double.NaN
else if IsNaN(range)
then value[1]
else if range == 0
then 0
else 0.66 * ((price - minLow) / range - 0.5) + 0.67 * value[1];
def truncValue = if value > 0.99 then 0.999 else if value < -0.99 then -0.999 else value;
rec fish = 0.5 * (log((1 + truncValue) / (1 - truncValue)) + fish[1]);

plot FTOneBarBack = fish[1];
plot FT = fish;
plot ZeroLine = 0;

input emalength = 50;

plot ema2 = expAverage(fish, emalength);

FTOneBarBack.SetDefaultColor(GetColor(1));
FT.SetDefaultColor(GetColor(8));
ZeroLine.SetDefaultColor(GetColor(5));

def bullish = if ft > ema2 then 1 else 0;
def bearish = if ft < ema2 then 1 else 0;

assignpriceColor(if ft>ftonebarback and bullish then color.green else if ft>ftoneBarBack and bearish then color.blue else if ft<ftoneBarBack and bearish then color.red else if ft<ftOneBarBack and bullish then color.yellow else color.gray);
@J007RMC thanks for sharing. Very interesting results with this one. I switched out the signal line and added some logic so i could visually see the uptrend/downtrend (fits my trading style). See what you think.

https://tos.mx/eh1OSLs
 
@J007RMC thanks for sharing. Very interesting results with this one. I switched out the signal line and added some logic so i could visually see the uptrend/downtrend (fits my trading style). See what you think.

https://tos.mx/eh1OSLs
@J007RMC thanks for sharing. Very interesting results with this one. I switched out the signal line and added some logic so i could visually see the uptrend/downtrend (fits my trading style). See what you think.

https://tos.mx/eh1OSLs
Your changes are a big improvement
 
Status
Not open for further replies.

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
261 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