Risk Management Labels For ThinkOrSwim

justAnotherTrader

Active member
VIP
VIP Enthusiast
What Is This?
When day-trading speed is important, but risk management is even more important. I think the reason most accounts blow-up is because they have no idea how to choose size and stops so they "all-in" on hunches. These labels aim to prevent that and protect our money from emotionally charged decisions. The goal is to add a stop and choose a size that reflects the volatility of the instrument you are trading. For that I picked the ATR, because that is what I use.

What It Is Not
These labels should not be a buy or sell signal, there are plenty of indicators and strategies on usethinkscript for that. These are simply a quick and easy risk management tool.

Why They Are Useful:
They do the simple math of telling you where you should place your stop and the amount of shares you should consider based off the risk tolerance you decide.

User Options:
  • Risk Size in Dollars - Default = $50
  • Risk Multiplier - Default = 2x (The amount of volatility you are willing to risk)
Other Notes: I use this style with trend scalping, but there are many strategies that can earn at least 1xATR, if you design a system around this risk management then you can find many ways to keep your losses small with small gains and an occasional bigger run. 1x ATR for risk management is very conservative, the default is 2x which will catch you more of the runs but the choice is up to you

hn3SAuO.png


Code:
declare upper;

input length = 14;
input averageType = AverageType.WILDERS;
input risk = 50;
input riskMult = 2;

def ATR = Round(MovingAverage(averageType, TrueRange(high, close, low), length), 2);
def trailStop = Round(riskMult * ATR, 2);
def shares = Round(risk / trailStop, 0);

AddLabel(yes, "ATR: " + ATR, Color.ORANGE);
AddLabel(yes, "Risk: " + " $"+ risk, Color.ORANGE);
AddLabel(yes, "TrailStop: " + trailStop, Color.ORANGE);
AddLabel(yes, "Shares: " + shares, Color.ORANGE);
AddLabel(yes, "TotalCost: " + " $" + Round(shares*close,0), Color.ORANGE);
 
nice write up! @justAnotherTrader, do you have something like this but for options contract?
Try this, the values have been modified to represent the fact that you are buying a contract for 100 shares.

Code:
declare upper;

input length = 14;
input averageType = AverageType.WILDERS;
input risk = 10;
input riskMult = 1;

def ATR = Round(MovingAverage(averageType, TrueRange(high, close, low), length), 2);
def trailStop = Round(riskMult * ATR * 100, 2);
def shares = Round(risk / trailStop, 0);

AddLabel(yes, "ATR: " + ATR, Color.ORANGE);
AddLabel(yes, "Risk: " + " $"+ risk, Color.ORANGE);
AddLabel(yes, "TrailStop: " + trailStop/100, Color.ORANGE);
AddLabel(yes, "Contracts: " + shares, Color.ORANGE);
AddLabel(yes, "TotalCost: " + " $" + Round(100*shares*close,0), Color.ORANGE);
 

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
438 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