The Matrix Indicator for ThinkorSwim

To Use The Matrix Series Indicator in the Scan Hacker
To Filter For: when Matrix Indicator candle (in downtrend) touches -200 or candle (uptrend) touches +200.

Save the code below in your study tab

The scan filters are:
downtrend200 is true
or
uptrend200 is true

To set up the scan filters in the Scan Hacker, follow this tutorial:
https://usethinkscript.com/threads/how-to-use-thinkorswim-stock-hacker-scans.284/

60HsXj0.png

pZ1CFdJ.png


Ruby:
#Matrix Series Scanner ONLY
# To Filter For: when Matrix Indicator candle (in down trend) touches -200 or candle (uptrend) touches +200.

#INPUTS
input Smoother = 5;
input SupResPeriod = 50;
input SupResPercentage = 100;
input PricePeriod = 16;
input ob = 200;
input os = -200;

#LOGIC
def nn = Smoother;
def ys1 = (high + low + close * 2) / 4;
def rk3 = ExpAverage(ys1, nn);
def rk4 = StDev(ys1, nn);
def rk5 = (ys1 - rk3) * 200 / rk4;
def rk6 = ExpAverage(rk5, nn);
def up = ExpAverage(rk6, nn);
def down = ExpAverage(up, nn);
def Oo = If(up < down, up, down);
def Ll = If(up < down, down, up);
def Cc = Ll;

def trend =  if Oo > Cc then 0 else if up > down then 1  else 0;

plot downtrend200 = Cc crosses below -200; downtrend200.hide();
plot uptrend200 =  Cc crosses above 200 ; uptrend200.hide();

addchartbubble(downtrend200, high, " ", color.dark_green);
addchartbubble(uptrend200, high, " ", color.dark_red);

@Cedar
 

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

To Use The Matrix Series Indicator in the Scan Hacker
To Filter For: when Matrix Indicator candle (in downtrend) touches -200 or candle (uptrend) touches +200.

Save the code below in your study tab

The scan filters are:

or


To set up the scan filters in the Scan Hacker, follow this tutorial:
https://usethinkscript.com/threads/how-to-use-thinkorswim-stock-hacker-scans.284/

60HsXj0.png

pZ1CFdJ.png


Ruby:
#Matrix Series Scanner ONLY
# To Filter For: when Matrix Indicator candle (in down trend) touches -200 or candle (uptrend) touches +200.

#INPUTS
input Smoother = 5;
input SupResPeriod = 50;
input SupResPercentage = 100;
input PricePeriod = 16;
input ob = 200;
input os = -200;

#LOGIC
def nn = Smoother;
def ys1 = (high + low + close * 2) / 4;
def rk3 = ExpAverage(ys1, nn);
def rk4 = StDev(ys1, nn);
def rk5 = (ys1 - rk3) * 200 / rk4;
def rk6 = ExpAverage(rk5, nn);
def up = ExpAverage(rk6, nn);
def down = ExpAverage(up, nn);
def Oo = If(up < down, up, down);
def Ll = If(up < down, down, up);
def Cc = Ll;

def trend =  if Oo > Cc then 0 else if up > down then 1  else 0;

plot downtrend200 = Cc crosses below -200; downtrend200.hide();
plot uptrend200 =  Cc crosses above 200 ; uptrend200.hide();

addchartbubble(downtrend200, high, " ", color.dark_green);
addchartbubble(uptrend200, high, " ", color.dark_red);

@Cedar
Thank you very much!!
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
746 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