9/30 Trading Setup Indicator for ThinkorSwim

BenTen

BenTen

Administrative
Staff
VIP
Warehouse
This is a simple moving average trading setup shared by Mike Bruns. I read it on Trading Setups Review and decided to give it a try. The concept was fairly simple to understand and turn into an indicator.

Buy Setup:
  • 9 EMA must be above the 20 EMA or 30 WMA
  • Close below 9 EMA (More conservatively, entire bar below 9 EMA)
  • Place buy stop order above the high of the bar that closes below 9 EMA
Sell Setup:
  • The 9 EMA must be below the 20 EMA or 30 WMA
  • Close above 9 EMA (More conservatively, entire bar above 9 EMA)
  • Place sell stop order below the low of the bar that closes above 9 EMA



You should read this to learn more about the strategy, where to place your entry and exit.

thinkScript Code

Code:
# 9/30 Trading Setup Indicator
# Concept by Mike Bruns of Trading Naked
# Assembled by BenTen at useThinkScript.com

# You are free to use this code for personal use, and make derivative works from it.
# You are NOT GRANTED permission to use this code (or derivative works) for commercial
# purposes which includes and is not limited to selling, reselling, or packaging with
# other commercial indicators. Headers and attribution in this code should remain as provided,
# and any derivative works should extend the existing headers.

# Start EMA
input price = close;
input length = 9;
input displace = 0;
def AvgExp = ExpAverage(price[-displace], length);
def emaBull = price < AvgExp;
def emaBear = price > AvgExp;

# Start Weighted Moving Average
input WMAlength = 30;
def AvgWtd = wma(price, WMAlength)[-displace];
def anotherBull = price > AvgWtd;
def anotherBear = price < AvgWtd;

# Plot Signals
plot longEntry = emaBull and anotherBull;
longEntry.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
longEntry.SetDefaultColor(Color.CYAN);
longEntry.SetLineWeight(2);
plot shortEntry = emaBear and anotherBear;
shortEntry.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
shortEntry.SetDefaultColor(Color.MAGENTA);
shortEntry.SetLineWeight(2);

Shareable Link

 

Top