# Charting Wealth Indicator for ThinkorSwim

#### theelderwand

##### Active member
2019 Donor
VIP
Hi,

This is the blog: http://chartingwealth.com/ where he talks about a weekly chart crossover going up for long and going down for short.

My apologies that I didn't post the indicators. It took me some money to figure out the indicators and finally get it working in ToS. Here's the indicator.

The Price Percent Oscillator he talks about:

Rich (BB code):
``````# Price Percent Oscillator
# Author theelderwand

declare lower;

input fast = 10;
input slow = 24;

def slowEMA = ExpAverage(close, slow);
plot ppo = 100 * (ExpAverage(close, fast) - slowEMA) / slowEMA;``````

The EMA that he talks about

Rich (BB code):
``````# Charting Wealth Exponential Moving Average
# Author theelderwand

input length = 8;

def ppo = WeeklyAndDailyPPO(10, 24, 10, 24).WeeklyPPO;
plot AvgExp = ExpAverage(ppo, length);``````

Here's the CrossOverSignal code

Rich (BB code):
``````# Charting Wealth CrossOver Signal
# Author theelderwand
declare lower;

input fast = 10;
input slow = 24;

def slowEMA = ExpAverage(close, slow);
def cwppo = 100 * (ExpAverage(close, fast) - slowEMA) / slowEMA;

input length = 8;

def ppo = WeeklyAndDailyPPO(10, 24, 10, 24).WeeklyPPO;
def cwavgexp = ExpAverage(ppo, length);

plot buy = (cwavgexp crosses below cwppo);
plot sell = (cwavgexp crosses above cwppo);``````

If you listen to the podcast, he called a weekly crossover on GLD, you can see below in the chart. He uses weekly two days and 4 hour charts. Here you go,

If you are looking for a strategy to get alerts and auto trade based on them, here's the strategy,

Rich (BB code):
``````# Charting Wealth Strategy
# Author theelderwand

input fast = 10;
input slow = 24;

def slowEMA = ExpAverage(close, slow);
def cwppo = 100 * (ExpAverage(close, fast) - slowEMA) / slowEMA;

input length = 8;

def ppo = WeeklyAndDailyPPO(10, 24, 10, 24).WeeklyPPO;
def cwavgexp = ExpAverage(ppo, length);

def x = (cwavgexp crosses above cwppo);
def y = (cwavgexp crosses below cwppo);

AddOrder(OrderType.SELL_AUTO, y equals 1, price=open[-1], 100, Color.RED, Color.RED, "Sell");``````

Charting Wealth PPO: https://tos.mx/18mB8nW
Charting Wealth EMA: https://tos.mx/8q5aTGU
Charting Wealth CrossOver signal: https://tos.mx/HlI3V9n
Charting Wealth Chart Setup: https://tos.mx/mwNSmOI

Enjoy!! As always feedback welcome!!

Last edited by a moderator:
Here is an attempt to match Trading Wealth. Hope it is close.

Just playing around with it. Not exact indicators but might be a workable copy of the overall strategy. Look and see what ya'll think.
https://tos.mx/x7VGtb1

Last edited by a moderator:
MBF
@horserider Nice to see someone else using MAs as a lower. I thought I might be loony for doing so.

Hi there, I'm new to thinkscript but very familiar with the chartingwealth strategy. Is the above script just for adding the indicator to thinkorswim for charting, or is there also a way to use this within the stock scanner? That would be incredibly helpful.

Welcome @opsjesse to the forum! With few exceptions, the studies found in this forum can be selected in the scanner just as the TOS built-in studies are selected.

I can walk you through setting up the scanner:
1. Create Study:​
Copy&Paste the Crossover Signal Study from the first post into your studies tab or if you are uncertain of that procedure, used this Shared Chart Link: http://tos.mx/wAGjdT1 And follow these instructions to automatically load the study --> Easiest way to load shared links
2. The MOST IMPORTANT step of this process is that when prompted in either method, you save the study under the name: ChartingWealth_crossover. That is the study name used in the scanner so if you miss this step the scanner won't work.​

Last edited:

@MerryDay @theelderwand could you kindly advise me the "strategy" from post #1 is suitable for which timeframe (3mWk, 3m2d, or 5d4h)? Or should it be applied to each timeframe? thanks in advance

@mansor Hi. This looks like an interesting twist to the moving average crossover.
I have a huge respect for @theelderwand's contributions and have in the past enjoyed podcasts of Charting Wealth.

While I haven't used this strategy, haven't listened to the podcasts, I can say that moving average crossovers can be used on all timeframes.
That being said, if you read post#1 and look at the charts. It does state, he looks for signals as follows:
If you listen to the podcast, he called a weekly crossover on GLD, you can see below in the chart. He uses weekly two days and 4 hour charts.
Caveat: Moving Averages strategies have their own pros & cons which should be googled before putting this strategy into use:

Last edited:

87k+ Posts
322 Online

## The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
• Exclusive indicators
• Proven strategies & setups
• Private Discord community
• Exclusive members-only content
• 1 full year of unlimited support

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?