• Get $40 off VIP by signing up for a free account! Sign Up

/ES Index Futures Scalping System for ThinkorSwim


Staff member
Came across this archive in the thinkScript Lounge:

12:48 Mobius: I was recently asked to work up a scalping system for index futures trading. I agreed to do so as long as it could be shared. The criteria was

1) 1 to 3 point trades avg.
2) clear signals
3) 60% or better win rate

The trading method would be based on 2 contract entries. Risk defined by user but typically 2 to make 2. Risk Off defined by user but typically 2 points for one off and one runner. Sell signal for trade off at latest. I've been testing this for about a month. It works well with /ES. I've not tested it with anything else. Here is the study:


# Scalper
# Mobius
# V01.01
# Notes: Area between red and green horizontal plot lines (gray continuous cloud plot) represents body of trend. Area above and below red and green horizontal  plot lines represents tail accumulation and distribution. Price will be more volitile in tails. Trading at signals is good for quick scalping trades.

input n = 8;
input averageType = AverageType.WILDERS;
input upper = 90;
input lower = 10;
input signals = yes;

def h = high;
def l = low;
def c = close;
def x = barNumber();
def nan = double.nan;
script Range
     input c = close;
     input n = 8;
     def Min = lowest(close, n);
     def Max = highest(close, n);
     def hh = Highest(c, n);
     def ll = Lowest(c, n);
     plot R = (((Max - Min) * (c - ll)) /  (hh - ll)) + Min;
def a = close;
def b = CompoundValue(1, b[1] + (a-b[1]) / (n * Power(a/b[1], 4)), a);
def Avg = MovingAverage(averageType, b-b[1], n);
def AbsAvg = MovingAverage(averageType, AbsValue(b-b[1]), n);
def R = Avg / AbsAvg;
def Lpivot;
def Lbar;
def Hpivot;
def Hbar;
if 50 * (R + 1) crosses below lower
     Lpivot = h;
     Lbar = x;
     Lpivot = Lpivot[1];
     Lbar = Lbar[1];
if 50 * (R + 1) crosses above upper
     Hpivot = l;
     Hbar = x;
     Hpivot = Hpivot[1];
     Hbar = Hbar[1];
plot st = Range(50 * (R + 1), n);
     st.AssignValueColor(if 50 * (R + 1) < lower
                         then color.red
                         else if 50 * (R + 1) > upper
                         then color.green
                         else color.light_gray);
plot lp = if x >= highestAll(Lbar)
          then highestAll(if isNaN(c[-1])
                          then Lpivot
                          else nan)
          else nan;
plot hp = if x >= highestAll(Hbar)
          then highestAll(if isNaN(c[-1])
                          then Hpivot
                          else nan)
          else nan;
addCloud(lp, st, color.light_red, color.gray);
addCloud(st, hp, color.light_green, color.gray);
plot upSignal = if signals and
                   50 * (R + 1) crosses above lower
                then l - (3*tickSize())
                else nan;
plot up2Signal = if signals and
                   50 * (R + 1) crosses above upper
                then l - (5*tickSize())
                else nan;
plot dnSignal = if signals and
                   50 * (R + 1) crosses below upper
                then h + (3*tickSize())
                else nan;
plot dn2Signal = if signals and
                   50 * (R + 1) crosses below lower
                then h + (5*tickSize())
                else nan;
# End Code Scalper

A couple of notes from Mobius, the developer of this script:

12:49 Mobius: As always I suggest living with any study for a while until you understand it before trading it.

12:51 Mobius: The signals will not repaint. And they are not early or late. So you need to be comfortable pulling the trigger when you see the signal. It's scalping and thinking too much.

12:55 Mobius: I've been able to easily clear 6 to 10 points a day with that study over the testing period. With few bad trades more than a couple points

12:56 Mobius: Seems best trades are out of the gate at RTH open

12:57 Mobius: spoke.. I'll use 2min, 5min and 15min depending on how volatile the market is

13:00 Mobius: Good clue on how volatile the market is, is ORB. if the range is 10 points or less the market is probably melting up and 15min is easier. If 20 points or so 5min. Large Opening Ranges of 40 or 50 points and 2min and it's wise to lighten up in risk. I'll often trade down to 2 contracts if the market is super volatile. Even add to positions of we're getting 10point bars
Question - Do you short below the arrow or below the RED Line and same for GREEN ARROW AND GREEN LINE. . As I notice the arrow appears once it's already down. So I would like know you're thoughts ..Thank You for this great community.

Last edited:
@sbwcws I'm not too sure honestly. I hope there would be more to the indicator. But I was only able to locate a couple comments from Mobius which I already included above.

# Notes: Area between red and green horizontal plot lines (gray continuous cloud plot) represents body of trend. Area above and below red and green horizontal plot lines represents tail accumulation and distribution. Price will be more volitile in tails. Trading at signals is good for quick scalping trades.
Hi BenTen!

I have been testing this indicator out with moderate success. Thanks for sharing!

I am trying to add an alert for this every time an up arrow or down arrow prints. This is what I've tried so far with no success:

Alert(condition = upSignal or up2Signal, text = "Buy Signal", sound = Sound.Ring, "alert type" = Alert.BAR);

Alert(upSignal[1] or up2Signal[1], text = "Buy Signal", sound = Sound.Ring, "alert type" = Alert.BAR);

Alert(upSignal, "BUY", Alert.BAR, Sound.RING);

Alert(condition = upSignal, "BUY", Alert.BAR, Sound.RING);

Can you let me know what I am doing wrong? I'm a newbie at coding/thinkscript and I can't figure out what's wrong. Thanks!
@donger This should work:

# Alerts
Alert(upSignal, " ", Alert.Bar, Sound.Chimes);
Alert(up2Signal, " ", Alert.Bar, Sound.Bell);
Alert(dnSignal, " ", Alert.Bar, Sound.Chimes);
Alert(dn2Signal, " ", Alert.Bar, Sound.Bell);
"Area between red and green horizontal plot lines (gray continuous cloud plot) represents body of trend. Area above and below red and green horizontal plot lines represents tail accumulation and distribution."
upSignal and dnSignal are when price crosses green line
up2Signal and dn2Signal are when price crosses redline
@MerryDay Sounds good. Is price crossing to the red or green areas the entry signals. That’s what I am gathering looking at historical values.

@donger Which arrows do you go long and short?
The arrows are signals for this indicator. There are also different cloud colors that provides additional information depending on your strategy.
I only use the arrows as confirming signals for my various strategies so I cannot say whether they are good for entry in of themselves. I personally never enter my hard-earned cash into a trade based on any one signal alone.
Same here. Since I am new to this indicator, I don't fully understand all the arrows and regions. For example, if it is in accumulation phase, and you get white up arrow or green up arrow, what does it actually mean? How to you trade that scenario? Also, as you mentioned, there are 3 regions, green, red and gray, and arrows happening in these regions.

Mobius says he has been successful trading the signals, but doesn't say which signals in what regions.
@barbaros Again it depends on your strategy, as well as current market conditions and which assets you are trading; all of which are just some of the variables that drastically affect how I trade. There really is no Holy Grail.
I think I understand this better after watching it live. I took a very cautious trade this morning at 10:25am for /ES. I exited at +1 point gain but it could have ran to +4 if i let it. You definitely need to pair it with other indicators to confirm though.
Having a hard time figuring out stoploss levels. I didn't trade this. It would have been profitable shorting eventually, but would definitely stopped with a tight stoploss.

Last edited by a moderator:
You don’t trade on indicators. You trade on your strategy.
Looking for a trend/reversal on a higher agg chart is a common start of most strategies. I have a half-dozen strategies to spot trends and reversals but only saw one strong setup on the /ES today. There was a Stoch cross along w/ a PSAR cross at 10:45 today on the 15min chart. But nothing subsequently formed on the tick chart.
So I traded equities today. And surprising for the market conditions, many of my trades were long.
Here is one example. QDEL setup a strong bull trend on the 15min chart which was also reflected on the one minute chart:

The trend started at the Mobius scalper green line. I could have entered the trade when it crossed the red line but going long against market conditions is not my trading style. But as you can see all my indicators were pegged, so I decided the ride up the 2nd half of the scalping line…
I usually exit when the SMI crosses below the SMIavg and or the Derivative RSI Oscillator starts to drop; both of which happened in this trade.
My conditional sell order is set for when the scalper's helper's red candle appears but I usually leave the trade earlier than that.

I had 10 trades like this that made ~$100 each. I had 6 trades that didn’t span out which lost me ~$10 each.
My six losses aren’t a reflection of the scalping indicator or a reflection of my trading. There is no Holy Grail. Even the best setup goes south sometimes.
Last edited:
@MerryDay Thanks for your response. I trade on indicators, patterns and support/resistance to take out emotion as much as I can. I am just test driving this indicator to see if it fits well with my other indicators. If this indicator is meant for trend confirmation and not entry point identification, then it won't be able to replace my primary indicator to pinpoint entries. I thought the initial post was about mobius' experience of scalp entries using this indicator.

Later in the day, /ES rallied. My midterm indicators showed the trend reversal, but the long term indicators stayed bearish. The long trade had a more clear entry point with this scalper indicator and a less volatile trend following it. Although I traded the long reversal, it was going against my long term indicators. It worked out to 12 point reversal to 200SMA for $700 gain on 2 contracts (minus commissions, thanks TDA). I'm glad I had a runner to capture it.

It seems like you time your entries differently and we may have a different trading styles. And again, I understand that there is no Holly Grail of indicators. I'm just trying to understand the intent of this indicator and if I can adapt it to my style of trading. It has a lot of potential though.
Last edited:
The Indicator works exactly as Mobius said:
with clear signals and 60% or better win rate

As I mentioned only one setup was signaled at mid-morning today and the ROI wasn't worth it.

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
423 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.