ChartArt

Stock Market Trend Analysis Trading System 101 (by ChartArt)

This is a very simple trading system which is measuring the core of uptrends and downtrends using three basic elements: Close price, HL2 price, Pivot price.

Depending if the uptrend or downtrend is strong, the buy/sell signals are shown in different colors. The stronger trends are in brighter colors (lime and fuchsia). If the trend just fully changed direction from uptrend to downtrend (or vice versa), there is a background color highlight in the color of the new trend direction.

The trend detection should work best on monthly charts. I have created this in under an hour. My goal was to use the least amount of rules possible, therefore there are many false signals and the code is quite lazy.

You can lose all your money if you rely on these buy/sell signals!
Remove from Favorite Scripts Add to Favorite Scripts
study("Stock Market Trend Analysis Trading System 101 (by ChartArt)", shorttitle="CA_-_TradingSystem101", overlay=true)

// ChartArt's Stock Market Trend Analysis Trading System 101 Indicator
//
// Version 1.0
// Idea by ChartArt on August 3, 2015.
//
// This indicator is measuring the essential core of
// uptrends and downtrends using three basic elements:
// Close price, HL2 price, Pivot price.
// 
// Potential stronger uptrends and downtrends are
// shown in a different brighter color. And if the
// trend changed from uptrend to downtrend (or vice versa)
// there is a background color highlight.
//
// List of my work: 
// https://www.tradingview.com/u/ChartArt/


// high, low band
lower = low
upper = high
l = plot(lower, color=silver)
u = plot(upper, color=silver)
fill(u, l, color=silver)

// pivot
pivot = (high + low + close ) / 3.0 

// bar color
TrendingUp() => close > close[1] and hl2 > hl2[1] and close > pivot 
TrendingDown() => close < close[1] and hl2 < hl2[1] and close < pivot 
barcolor(TrendingUp() ? green : TrendingDown() ? red : blue)

// background color
bgcolor(TrendingUp() and TrendingDown()[1] ? green : TrendingDown() and TrendingUp()[1] ? red : na)

// buy, sell signals
bearish = cross(close,pivot) == 1 and close[1] > close 
bullish = cross(close,pivot) == 1 and close[1] < close 
plotshape(bearish, color=maroon, style=shape.arrowdown, text="Sell", location=location.abovebar)
plotshape(bullish, color=olive, style=shape.arrowup, text="Buy", location=location.belowbar)

// strong buy, strong sell signals
verybearish = cross(close,pivot) == 1 and close[1] > close and TrendingDown()
verybullish = cross(close,pivot) == 1 and close[1] < close and TrendingUp()
plotshape(verybearish, color=fuchsia, style=shape.arrowdown, text="Sell", location=location.abovebar)
plotshape(verybullish, color=lime, style=shape.arrowup, text="Buy", location=location.belowbar)
ChartArt
a year ago
Cherry picked example where the script worked quite good on a daily chart of EURUSD. Most times the signals are wrong though on daily charts. Monthly charts work much better.

snapshot
Reply
ChartArt
a year ago
S&P 500 index, close price from August 21, 2015

snapshot
Reply
ChartArt ChartArt
a year ago
S&P 500 index, close price from Monday August 24, 2015

snapshot
Reply
ChartArt ChartArt
11 months ago
S&P 500 index, close price from December 31, 2015

snapshot
Reply
ChartArt ChartArt
9 months ago
S&P 500 index, close price from February 29, 2016

trend is neutral
snapshot
Reply
ChartArt
a year ago
DOW Industrials Index, close price from August 21, 2015

snapshot
Reply
ChartArt ChartArt
a year ago
DOW Industrials Index, close price from Monday August 24, 2015

snapshot
Reply
ChartArt ChartArt
11 months ago
DOW Industrials Index, close price from December 31, 2015

snapshot
Reply
ChartArt ChartArt
9 months ago
DOW Industrials Index, close price from February 29, 2016

trend is neutral
snapshot
Reply
ChartArt
a year ago
Nasdaq Composite, close price from August 21, 2015

snapshot
Reply
ChartArt ChartArt
a year ago
Nasdaq Composite, close price from Monday August 24, 2015

snapshot
Reply
ChartArt ChartArt
11 months ago
Nasdaq Composite, close price from December 31, 2015

snapshot
Reply
ChartArt ChartArt
11 months ago
Nasdaq 100 index, close price from December 31, 2015

snapshot
Reply
ChartArt
a year ago
DOW Transportations index, close price from August 21, 2015

snapshot
Reply
ChartArt ChartArt
a year ago
DOW Transportations index, close price from Monday August 24, 2015

snapshot
Reply
ChartArt ChartArt
11 months ago
DOW Transportations index, close price from December 31, 2015

snapshot
Reply
ChartArt ChartArt
9 months ago
DOW Transportations index, close price from February 29, 2016

trend is bullish
snapshot
Reply
ChartArt
a year ago
Stoxx Europe 600 (ETF), close price from August 21, 2015

snapshot
Reply
ChartArt ChartArt
a year ago
Stoxx Europe 600 (ETF), close price from Monday August 24, 2015

snapshot
Reply
ChartArt ChartArt
11 months ago
Stoxx Europe 600 (ETF), close price from December 31, 2015

snapshot
Reply
ChartArt
a year ago
Gold, real time price from early August 24, 2015

snapshot
Reply
ChartArt ChartArt
a year ago
Gold, real time price from early Tuesday August 25, 2015

snapshot
Reply
ChartArt ChartArt
11 months ago
Gold futures, close price from December 31, 2015

snapshot
Reply
ChartArt
a year ago
US Dollar Index, close price from August 21, 2015

snapshot
Reply
ChartArt ChartArt
a year ago
US Dollar Index, close price from Monday August 24, 2015

snapshot
Reply
ChartArt ChartArt
11 months ago
US Dollar Index, close price from December 31, 2015

snapshot
Reply
ChartArt
a year ago
EURUSD, real time price from early August 24, 2015

snapshot
Reply
ChartArt ChartArt
a year ago
EURUSD, real time price from early Tuesday August 25, 2015

snapshot
Reply
ChartArt ChartArt
11 months ago
EURUSD, close price from December 31, 2015

snapshot
Reply
ChartArt
a year ago
DAX 30 index, close price from August 21, 2015

snapshot
Reply
ChartArt ChartArt
a year ago
DAX 30 index, close price from Monday August 24, 2015

snapshot
Reply
ChartArt ChartArt
11 months ago
DAX 30 index, close price from December 31, 2015

snapshot
Reply
ChartArt ChartArt
9 months ago
DAX index, close price from February 29, 2016

trend is bearish
snapshot
Reply
ChartArt
a year ago
Shanghai A-Share Stock Price Index, close price from August 21, 2015

snapshot
Reply
ChartArt ChartArt
a year ago
Shanghai A-Share Stock Price Index, close price from Monday August 24, 2015

snapshot
Reply
ChartArt ChartArt
11 months ago
Shanghai A-Share Stock Price Index, close price from December 31, 2015

snapshot
Reply
ChartArt
a year ago
FTSE 100 index, close price from August 21, 2015

snapshot
Reply
ChartArt ChartArt
a year ago
FTSE 100 index, close price from Monday August 24, 2015

snapshot
Reply
ChartArt ChartArt
11 months ago
FTSE 100 index, close price from December 31, 2015

snapshot
Reply
ChartArt ChartArt
9 months ago
FTSE index, close price from February 29, 2016

trend is neutral
snapshot
Reply
ChartArt
a year ago
Nikkei 225 index, close price from August 21, 2015

snapshot
Reply
ChartArt ChartArt
a year ago
Nikkei 225 index, close price from Monday August 24, 2015

snapshot
Reply
ChartArt ChartArt
11 months ago
Nikkei 225 index, close price from December 30, 2015

snapshot
Reply
ChartArt ChartArt
9 months ago
Nikkei 225 index, close price from February 29, 2016

trend is bearish
snapshot
Reply
ChartArt
a year ago
DOW US Total Stock Market Index, close price from August 21, 2015

snapshot
Reply
ChartArt ChartArt
a year ago
DOW US Total Stock Market Index, close price from Monday August 24, 2015

snapshot
Reply
ChartArt ChartArt
11 months ago
DOW US Total Stock Market Index, close price from December 31, 2015

snapshot
Reply
ChartArt ChartArt
9 months ago
DOW US Total Stock Market Index, close price from February 29, 2016

trend is neutral
snapshot
Reply
ChartArt
a year ago
Nasdaq Biotech Index (ETF), close price from August 21, 2015

snapshot
Reply
ChartArt ChartArt
a year ago
Nasdaq Biotech Index (ETF), real-time price from early Tuesday August 25, 2015

snapshot
Reply
Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Billing Sign Out