Bollinger Bands and Stochastic Scalping Indicator for ThinkorSwim

BenTen

Administrative
Staff member
Staff
VIP
If you like to trade or scalp on the shorter time frame such as the 2m, 5m, and 15m, this indicator is for you. The Scalper indicator generates buy and sell signals based on the Bollinger Bands, Stochastic Full, RSI, MFI, and IMI (Intraday Momentum Index).

4ZfMTA9.png

ShjgpsP.png


thinkScript Code

Rich (BB code):
# Scalper
# Drew Griffith

#hint: Intraday Day mean reversion strategy. Used on 2min charts.

declare upper;

input price = close;
input BBlength = 12;
input FSOkperiod = 10;
input FSOdperiod = 6;
input FSOslowingperiod = 6;
input FSOob = 80;
input FSOos = 20;
input RSIlength = 12;
input RSIob = 70;
input RSIos = 30;
input MFILength = 12;
input MFIob = 80;
input MFIos = 20;
input IMILength = 12;
input IMIob = 70;
input IMIos = 30;

def BBupper = BollingerBands(length = BBlength).UpperBand;
def BBlower = BollingerBands(length = BBlength).LowerBand;

# StochasticFull
def FSO = StochasticFull("k period" = FSOkperiod, "d period" = FSOdperiod, "slowing_period" = FSOslowingperiod);

def RSI = RSI(length = RSIlength);

def MFI = MoneyFlowIndex(length = MFILength);

def IMI = IntradayMomentumIndex(length = IMILength);

plot bullish = close <= BBlower and RSI <= RSIos and FSO <= FSOos and MFI <= MFIos and IMI <= IMIob;

plot bearish = close >= BBupper and RSI >= RSIob and FSO >= FSOob and MFI >= MFIob and IMI >= IMIos;

#plot RATING = if bullish then 1 else if bearish then .5 else 0;

bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
bullish.AssignValueColor(Color.GREEN);

bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
bearish.AssignValueColor(Color.RED);

Shareable Link

https://tos.mx/AkH2ok
Credit:

Video Tutorial

 
Last edited:

San

Member
2019 Donor
Ben, After added this script. The chart shows shrink not able to see the candle but i see the arrows.

 
Last edited:

BenTen

Administrative
Staff member
Staff
VIP
@San Ahh I see, go into the indicator's setting and untick "Show Plot" for RATING.

 
Last edited:

San

Member
2019 Donor
Ben, My bad I looked arrows on other indicator not TTM_Scalper. But after untick "Show Plot" for RATING able to see the candle NOT arrow.



I have noticed in Indicator Bullish and Bearish tab "color: This plot's colors are dynamically set" I am not sure this is default because usually we see some color!

 
Last edited:

BenTen

Administrative
Staff member
Staff
VIP
@San The indicator don't often give you signals and the arrow's colors are set to default (down = red and up = green). This indicator will work on intra-day only. So from 1m to 15m max.

 
Last edited:

San

Member
2019 Donor
I have verified last 5 days chart for Amzn with 1mts/5mts/15mt but some reason I don't see any arrow for Feb15th.

 
Last edited:

BenTen

Administrative
Staff member
Staff
VIP
@San Do you see any arrows on the chart at all? If you do, then that means there was no signal given for AMZN on that specific day.

 
Last edited:

San

Member
2019 Donor
Thanks for your updates. Yes i see the arrow and thanks for your quick response...

 
Last edited:

jan_angel

New member
2019 Donor
Hello BenTen...first thank you for posting this script. I am having the same issue as San. Everytime i change the symbol, the chart shrinks

 
Last edited:

BenTen

Administrative
Staff member
Staff
VIP
@jan_angel Please see my reply above regarding the “Show Plot” option for RATING. In addition, you can also left click on the chart and unselect Fit Studies.

 
Last edited:

Shmandull

New member


Thank you! I have noticed if the trigger happens very early in the trading day, it could signal a reverse in the opposite direction for the rest of the trading day.

Also, i noticed if you wait for a double red or green bar in the signal direction, you can better "guesstimate" the reversal long term.

Just early observations. I am trying to find a good baseline / confirmation indicator to help support triggers.
 

Shmandull

New member
Hey Ben,

I am having trouble making a scan query. The stipulations I choose are correct to the video you linked. However, when it triggers on the list, i click on the chart and there is no arrow. How come it triggers but doesn't include the arrow in either direction?

I also noticed the arrow will be present on an active candle when the code is specified to CLOSE? Again, seems spotty, but can be pretty accurate!

Your response is greatly appreaciated!
 

Similar threads

Top