SPX Trading Strategy for ThinkorSwim

Status
Not open for further replies.

Ben's Swing Trading Strategy + Indicator

I wouldn't call this a course. My goal is zero fluff. I will jump right into my current watchlist, tell you the ThinkorSwim indicator that I'm using, and past trade setups to help you understand my swing trading strategy.

I'm Interested

I wonder we can combine it with another indicator to filter out these days.
IMO, just sit on hands when when market is choppy/sideways. In other words, use price action as your filter. Admittedly, I feel like I have too many indicators on right now. I find each one useful but they distract from price action analysis. So I made a rule of starting all trade analysis with price action and find that is a good filter.

But if you want another indicator, I think supertrend does a good job of filtering out some bad signals. Only take signals in the direction of the current trend. That is actually one of my rules for this setup. I have not backtested it yet so I didn't want to necessarily share it yet. I could be wrong, but I'm experimenting. And perhaps that is a natural combination study. Simply use supertrend or cci version supertrend and add arrow signals based on the setup rules only when in agreement with supertrend.
 
thanks VictusJogi for your advice. very much appreciated. I had been doing lots of that lately. lol. At one point, i tot i had a good grasp n the next, i got crashed. Will continue to work on my eye power n the study. what time frame do u use besides the 10mins?
I use 2 min, 10 mins and daily
 
I don't use daily for this strategy but 10m and 2m too.
Been using 3 min, 5 min and 10 min charts. Interesting to note, I've been seeing some intraday divergences ( 3 and 5 min) with several indicators (RSI and Stochastics) when price gets extended from the moving averages, whether up or down. I'll try the 2 min as well next week. (y)
 
I wonder we can combine it with another indicator to filter out these days.
Well, the SPX pivot point today was 3932. When the BBMACD cross above the Zero line, the price was 3922. So we hardly had 10 points to play there on long side. I think we should add the daily standard support resistance (I use Dynamic Hiding Pivots) indicator. The other filter was 'True Momentum Indicator' which was at the overbought territory (>80%) at the time of MACD cross.
 
Well, the SPX pivot point today was 3932. When the BBMACD cross above the Zero line, the price was 3922. So we hardly had 10 points to play there on long side. I think we should add the daily standard support resistance (I use Dynamic Hiding Pivots) indicator. The other filter was 'True Momentum Indicator' which was at the overbought territory (>80%) at the time of MACD cross.
Is Dynamic Hiding Pivots available?

have you looked to see how TMI in a backtest?
 
@antojoseph Everyone can post images here, you just have to do it the correct way... Very few forums allow direct image posting these days, for a multitude of reasons - mainly storage space requiring pricier hosting packages... See How to insert image in a post thread? for information on posting images... I have used imgur.com almost daily for posting here using the BBCode option...

Also, it is very helpful to post the code for indicators rather than simply posting a shared link... The TOS shared link system breaks with almost every update and then we have to answer a bunch of complaints about them not working... Using Copy & Paste of Thinkscript code works the first time, virtually every time... Posting code also allows members to review code without having to import it into their TOS install just to see the code... It should be considered proper forum etiquette to always post code...
 

Hypoluxa and others interested,​


Instead of Ergonomic I have been analyzing MACD 3,10,36 (your settings) with the Hull average type and it appears to offer earlier signals to your wonderful post. Let me know if you all see a possible advantage.
 
@antojoseph Everyone can post images here, you just have to do it the correct way... Very few forums allow direct image posting these days, for a multitude of reasons - mainly storage space requiring pricier hosting packages... See How to insert image in a post thread? for information on posting images... I have used imgur.com almost daily for posting here using the BBCode option...

Also, it is very helpful to post the code for indicators rather than simply posting a shared link... The TOS shared link system breaks with almost every update and then we have to answer a bunch of complaints about them not working... Using Copy & Paste of Thinkscript code works the first time, virtually every time... Posting code also allows members to review code without having to import it into their TOS install just to see the code... It should be considered proper forum etiquette to always post code...
# Here is the source code for Dynamic Hiding Pivots:

# SOURCE: Unknown
# TYPE: Study Trendlines
# CREDITS: Unknown

input timeFrame = {default DAY, WEEK, MONTH};
input showOnlyCurrent = yes;
input DynamicHide = yes;
def h = dynamichide;
#
# Define lclose = last completed bar close:
#
rec lclose = if IsNaN(close) then lclose[1] else close;

plot R3;
plot R2;
plot R1;
plot PP;
plot S1;
plot S2;
plot S3;

if (showOnlyCurrent and !IsNaN(close(period = timeFrame)[-1]) or IsNaN(close))
then {
R1 = Double.NaN;
R2 = Double.NaN;
R3 = Double.NaN;
PP = Double.NaN;
S1 = Double.NaN;
S2 = Double.NaN;
S3 = Double.NaN;
} else {
PP = (high(period = timeFrame)[1] + low(period = timeFrame)[1] + close(period=timeframe)[1]) / 3;
R1 = 2 * PP - low(period = timeFrame)[1];
R2 = PP + high(period = timeFrame)[1] - low(period = timeFrame)[1];
R3 = R2 + high(period = timeFrame)[1] - low(period = timeFrame)[1];
S1 = 2 * PP - high(period = timeFrame)[1];
S2 = PP - high(period = timeFrame)[1] + low(period = timeFrame)[1];
S3 = S2 - high(period = timeFrame)[1] + low(period = timeFrame)[1];
}


#
# Formatting:
# Set color, line weight, style and hiding parameters
# for each pivot level
#
PP.SetDefaultColor(color.magenta);
pp.SetLineWeight(4);
pp.SetStyle(curve.long_DASH);
pp.setHiding(h and (lclose > r2 or lclose < s2));
pp.setpaintingStrategy(paintingStrategy.DASHES);
pp.setHiding();
#
r1.SetDefaultColor(color.red);
r1.SetLineWeight(4);
r1.SetStyle(curve.long_DASH);
r1.setHiding(h and lclose < s1);
r1.setpaintingStrategy(paintingStrategy.DASHES);
#
r2.SetDefaultColor(color.red);
r2.SetLineWeight(1);
r2.SetStyle(curve.long_DASH);
r2.setHiding(h and lclose < r1);
r2.setpaintingStrategy(paintingStrategy.DASHES);
#
r3.SetDefaultColor(color.red);
r3.SetLineWeight(1);
r3.SetStyle(curve.short_DASH);
r3.setHiding(h and lclose < r2);
r3.setpaintingStrategy(paintingStrategy.DASHES);
#
s1.SetDefaultColor(color.GREEN);
s1.SetLineWeight(4);
s1.SetStyle(curve.long_DASH);
s1.setHiding(h and lclose > r1);
s1.setpaintingStrategy(paintingStrategy.DASHES);
#
s2.SetDefaultColor(color.GREEN);
s2.SetLineWeight(1);
s2.SetStyle(curve.long_DASH);
s2.setHiding(h and lclose > s1);
s2.setpaintingStrategy(paintingStrategy.DASHES);
#
s3.SetDefaultColor(color.GREEN);
s3.SetLineWeight(1);
s3.SetStyle(curve.short_DASH);
s3.setHiding(h and lclose > s2);
s3.setpaintingStrategy(paintingStrategy.DASHES);
 
# Here is the source code for Dynamic Hiding Pivots:

# SOURCE: Unknown
# TYPE: Study Trendlines
# CREDITS: Unknown

input timeFrame = {default DAY, WEEK, MONTH};
input showOnlyCurrent = yes;
input DynamicHide = yes;
def h = dynamichide;
#
# Define lclose = last completed bar close:
#
rec lclose = if IsNaN(close) then lclose[1] else close;

plot R3;
plot R2;
plot R1;
plot PP;
plot S1;
plot S2;
plot S3;

if (showOnlyCurrent and !IsNaN(close(period = timeFrame)[-1]) or IsNaN(close))
then {
R1 = Double.NaN;
R2 = Double.NaN;
R3 = Double.NaN;
PP = Double.NaN;
S1 = Double.NaN;
S2 = Double.NaN;
S3 = Double.NaN;
} else {
PP = (high(period = timeFrame)[1] + low(period = timeFrame)[1] + close(period=timeframe)[1]) / 3;
R1 = 2 * PP - low(period = timeFrame)[1];
R2 = PP + high(period = timeFrame)[1] - low(period = timeFrame)[1];
R3 = R2 + high(period = timeFrame)[1] - low(period = timeFrame)[1];
S1 = 2 * PP - high(period = timeFrame)[1];
S2 = PP - high(period = timeFrame)[1] + low(period = timeFrame)[1];
S3 = S2 - high(period = timeFrame)[1] + low(period = timeFrame)[1];
}


#
# Formatting:
# Set color, line weight, style and hiding parameters
# for each pivot level
#
PP.SetDefaultColor(color.magenta);
pp.SetLineWeight(4);
pp.SetStyle(curve.long_DASH);
pp.setHiding(h and (lclose > r2 or lclose < s2));
pp.setpaintingStrategy(paintingStrategy.DASHES);
pp.setHiding();
#
r1.SetDefaultColor(color.red);
r1.SetLineWeight(4);
r1.SetStyle(curve.long_DASH);
r1.setHiding(h and lclose < s1);
r1.setpaintingStrategy(paintingStrategy.DASHES);
#
r2.SetDefaultColor(color.red);
r2.SetLineWeight(1);
r2.SetStyle(curve.long_DASH);
r2.setHiding(h and lclose < r1);
r2.setpaintingStrategy(paintingStrategy.DASHES);
#
r3.SetDefaultColor(color.red);
r3.SetLineWeight(1);
r3.SetStyle(curve.short_DASH);
r3.setHiding(h and lclose < r2);
r3.setpaintingStrategy(paintingStrategy.DASHES);
#
s1.SetDefaultColor(color.GREEN);
s1.SetLineWeight(4);
s1.SetStyle(curve.long_DASH);
s1.setHiding(h and lclose > r1);
s1.setpaintingStrategy(paintingStrategy.DASHES);
#
s2.SetDefaultColor(color.GREEN);
s2.SetLineWeight(1);
s2.SetStyle(curve.long_DASH);
s2.setHiding(h and lclose > s1);
s2.setpaintingStrategy(paintingStrategy.DASHES);
#
s3.SetDefaultColor(color.GREEN);
s3.SetLineWeight(1);
s3.SetStyle(curve.short_DASH);
s3.setHiding(h and lclose > s2);
s3.setpaintingStrategy(paintingStrategy.DASHES);
# Source code for True Momentum Oscillator

# TMO ((T)rue (M)omentum (O)scilator)
# Mobius
# V01.05.2018
# hint: TMO calculates momentum using the delta of price. Giving a much better picture of trend, tend reversals and divergence than momentum oscillators using price.

declare Lower;

input length = 14;
input calcLength = 5;
input smoothLength = 3;

def o = open;
def c = close;
def data = fold i = 0 to length
with s
do s + (if c > getValue(o, i)
then 1
else if c < getValue(o, i)
then - 1
else 0);
def EMA5 = ExpAverage(data, calcLength);
plot Main = ExpAverage(EMA5, smoothLength);
plot Signal = ExpAverage(Main, smoothLength);
Main.AssignValueColor(if Main > Signal
then color.green
else color.red);
Signal.AssignValueColor(if Main > Signal
then color.green
else color.red);
Signal.HideBubble();
Signal.HideTitle();
addCloud(Main, Signal, color.green, color.red);
plot zero = if isNaN(c) then double.nan else 0;
zero.SetDefaultColor(Color.gray);
zero.hideBubble();
zero.hideTitle();
plot ob = if isNaN(c) then double.nan else round(length * .7);
ob.SetDefaultColor(Color.gray);
ob.HideBubble();
ob.HideTitle();
plot os = if isNaN(c) then double.nan else -round(length * .7);
os.SetDefaultColor(Color.gray);
os.HideBubble();
os.HideTitle();
addCloud(ob, length, color.light_red, color.light_red, no);
addCloud(-length, os, color.light_green, color.light_green);
# End Code TMO
 
# Source code for True Momentum Oscillator

# TMO ((T)rue (M)omentum (O)scilator)
# Mobius
# V01.05.2018
# hint: TMO calculates momentum using the delta of price. Giving a much better picture of trend, tend reversals and divergence than momentum oscillators using price.

declare Lower;

input length = 14;
input calcLength = 5;
input smoothLength = 3;

def o = open;
def c = close;
def data = fold i = 0 to length
with s
do s + (if c > getValue(o, i)
then 1
else if c < getValue(o, i)
then - 1
else 0);
def EMA5 = ExpAverage(data, calcLength);
plot Main = ExpAverage(EMA5, smoothLength);
plot Signal = ExpAverage(Main, smoothLength);
Main.AssignValueColor(if Main > Signal
then color.green
else color.red);
Signal.AssignValueColor(if Main > Signal
then color.green
else color.red);
Signal.HideBubble();
Signal.HideTitle();
addCloud(Main, Signal, color.green, color.red);
plot zero = if isNaN(c) then double.nan else 0;
zero.SetDefaultColor(Color.gray);
zero.hideBubble();
zero.hideTitle();
plot ob = if isNaN(c) then double.nan else round(length * .7);
ob.SetDefaultColor(Color.gray);
ob.HideBubble();
ob.HideTitle();
plot os = if isNaN(c) then double.nan else -round(length * .7);
os.SetDefaultColor(Color.gray);
os.HideBubble();
os.HideTitle();
addCloud(ob, length, color.light_red, color.light_red, no);
addCloud(-length, os, color.light_green, color.light_green);
# End Code TMO
A picture explanation here.
 

Hypoluxa and others interested,​


Instead of Ergonomic I have been analyzing MACD 3,10,36 (your settings) with the Hull average type and it appears to offer earlier signals to your wonderful post. Let me know if you all see a possible advantage.
Is that the same as hull moving average that's in TOS? If so, which settings are you using?
 
Status
Not open for further replies.

New Indicator: Buy the Dip

Check out our Buy the Dip indicator and see how it can help you find profitable swing trading ideas. Scanner, watchlist columns, and add-ons are included.

Download the indicator

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
455 Online
Create Post

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