OPEN-SOURCE SCRIPT

Buy in long term uptrend (Weekly and Daily)

Condition: in uptrend, EMA8 > EMA144 (User can change the EMA# from input);
Price Action: (Price crossover EMA144) or (price touched EMA144 and close above it);
Trading Plan: Buy at close or next open; Initial Stop below EMA144;

No Exit strategy in this study, trader needs to move stop by other rules; such as, uptrend line break;

Back test Weekly and daily chart for SPY, QQQ, TLT, GLD, IWM, XLF, XLK, XOP, GS, IBM, APPL, CAT, LVS
1. When side way move or price From uptrend to Down trend, Entry could be stopped quickly with small loss;
2. When buy in trending move, the position could be hold for few years.

The best sample is QQQ weekly chart.

This is my first tradingview script. I created this script file and tested in one week.
Maybe, this script is too simple, other people published similar code already; Sorry, I didn't Check that yet.
Exponential Moving Average (EMA)uptrend

开源脚本

本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受网站规则约束。 您可以收藏它以在图表上使用。

想在图表上使用此脚本?

免责声明