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,


Ei3XUEM.png



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.BUY_AUTO, x equals 1, price=close, 100, Color.GREEN, Color.GREEN, "Buy");
AddOrder(OrderType.SELL_AUTO, y equals 1, price=close, 100, Color.RED, Color.RED, "Sell");

I thought it's too good to be true on the weekly chart so I checked the strategy a bit closer.
Crossover happens on barX, buy signal is placed on barX+1,

7x5zO71.png


Here's the shareable links

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
Charting Wealth Strategy: https://tos.mx/rHEQvap

Enjoy!! As always feedback welcome!!
 
Last edited by a moderator:

horserider

Well-known member
VIP
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.

2019-12-25-TOS-CHARTS.png
 

tomsk

Well-known member
VIP
@markos That chart sure looks like it has some sort of a Bollinger Band on it. The standard bollinger band has a SMA(20) as the middle plot. In the lower SMA study it looks like the SMA(50) is used with another EMA(8) plot. At least that's what I surmised.
 

horserider

Well-known member
VIP
@tomsk Good eyes. I have the B3 study on the chart just hid the plots to avoid confusion and yes BB on upper at 21 to match Trading Wealth and 8 and 50 SMA on lower. I am revising to better match the Trading Wealth strategy and will have it up soon.
 

mailbagman2000

Member
VIP
Just wondering if anyone can convert the lower study MACD_and_MAs_Charting Wealth _Study into a scan? here is the indicator.

Code:
# MACD and MA 8  crosses with MA 50. Plots intended to match the Charting Wealth strategy when used along with the Derivative RSI Oscillator.  Also should add the LRC s 30 and 34 and Bollinger bands at 21 to upper chart.
# By Horserider 12/25/2019
declare lower;
#---------- MACD
input fastLength = 10;
input slowLength = 24;
input macdLength = 1;
input macdAverageType = AverageType.EXPONENTIAL;
def value = MovingAverage(macdAverageType, close, fastLength) - MovingAverage(macdAverageType, close, slowLength);
def avg = MovingAverage(macdAverageType, value, macdLength);
plot MACDAVG =avg;
MACDAVG.setPaintingStrategy(PaintingStrategy.POINTS);
#---------- MA 8
input displace = 0;
input length = 8;
input AverageType = AverageType.Simple;
plot Line8 = MovingAverage(AverageType, data = avg[-displace], length = length);
Line8.SetDefaultColor(GetColor(2));
#----------- MA 50
input length50 = 50;
input averageType1 = AverageType.Simple;
plot line50 = MovingAverage(averageType1, data = avg[-displace], length = length50) ;
line50.SetDefaultColor(GetColor(7));
 
Last edited:

TrueDepth

Member
VIP
Ok, got it. I see where you changed the default price = open[-1] to price = close. I have been using the default strategies, and it was annoying me that it was starting at the open of the next bar. This helps me. Thanks.
 

soary

Member
Hi @theelderwand, thanks for presenting this. I had been wondering about their system. I watched the program today and it looks interesting to follow and I’m going to test it against several stocks. The explanation on the site about the derivative oscillator is that it is a triple smooth derivative of RSI for overbought/oversold conditions plotted as a histogram and it’s formulated by incorporating 2 EMAs and 1 SMA. Did you figure it out their derivative oscillator? Have you been using CW’s system? If so, what has been your experience with it?
 

opsjesse

New member
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.
 

MerryDay

Administrative
Staff member
Staff
VIP
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.​
3. Load Scanner:​
Shared Scanner Link: http://tos.mx/tpI5hib

a2.png
 
Last edited:

Similar threads

Top