Open Close Cross Strategy R5 revised by JustUncleLThis revision is an open Public release, with just some minor changes. It is a revision of the Strategy "Open Close Cross Strategy R2" originally published by @JayRogers.
*** USE AT YOUR OWN RISK ***
JayRogers : "There are drawing/painting issues in pinescript when working across resolutions/timeframes that I simply cannot fix here.. I will not be putting any further effort into developing this until such a time when workarounds become available."
NOTE: Re-painting has not been observed with the default set up, nor with Alternate resolution multiplier up to 5.
Description:
Strategy based around Open-Close Moving Average Crossovers optionally from a higher time frame.
Setup:
I have generally found that setting the strategy resolution to 3-5x that of the chart you are viewing tends to yield the best results, regardless of which MA option you may choose (if any) BUT can cause a lot of false positives - be aware of this. JustUncleL: using one of the Smoothed MA helps reduce false positives.
Don't aim for perfection. Just aim to get a reasonably snug fit with the O-C band, with good runs of green and red. JustUncleL: using SMMA (8 to 10) gives a good fit.
Option to either use basic open and close series data, or pick your poison with a wide array of MA types.
Optional Stop Loss and Target Profit for damage mitigation if desired (can be toggled on/off)
Positions get taken automatically following a crossover - which is why it's better to set the resolution of the script greater than that of your chart, so that the trades get taken sooner rather than later.
If you make use of the stops/target profit, be sure to take your time tweaking the values. Cutting it too fine will cost you profits but keep you safer, while letting them loose could lead to more draw down than you can handle.
Revsion R5 Changes by JustUncleL
Corrected cross over calculations, sometimes gave false signals.
Corrected Alternate Time calculation to allow for Daily,Weekly and Monthly charts.
Open Public release.
Revision R4 By JustUncleL
Change the way the Alternate resolution in selected, use a Multiplier of the base Time Frame instead, this makes it easy to switch between base time frames.
Added TMA and SSMA moving average options. But DEMA is still giving the best results.
Using "calc_on_every_tick=false" ensures results between back testing and real time are similar.
Added Option to Disable the coloring of the bars.
Updated default settings.
R3 Changes by JustUncleL:
Returned a simplified version of the open/close channel, it shows strength of current trend.
Added Target Profit Option.
Added option to reduce the number of historical bars, overcomes the too many trades limit error.
Simplified the strategy code.
Removed Trailing Stop option, not required and in my option does not work well in Trading View, it also gives false and unrealistic performance results in back testing.
R2 Changes by @JayRogers:
Simplified and cleaned up plotting, now just shows a Moving Average derived from the average of open/close.
Tried very hard to alleviate painting issues caused by referencing alternate resolution.
Strategy!
Fisher Transform Indicator by Ehlers Backtest v 2.0 Market prices do not have a Gaussian probability density function
as many traders think. Their probability curve is not bell-shaped.
But trader can create a nearly Gaussian PDF for prices by normalizing
them or creating a normalized indicator such as the relative strength
index and applying the Fisher transform. Such a transformed output
creates the peak swings as relatively rare events.
Fisher transform formula is: y = 0.5 * ln ((1+x)/(1-x))
The sharp turning points of these peak swings clearly and unambiguously
identify price reversals in a timely manner.
For signal used zero.
You can change long to short in the Input Settings
Please, use it only for learning or paper trading. Do not for real trading.
RSI HistoAlert Strategy This simple indicator modified RSI
You can use in the xPrice any series: Open, High, Low, Close, HL2, HLC3, OHLC4 and ect...
You can change long to short in the Input Settings
Please, use it only for learning or paper trading. Do not for real trading.
High - EMA Strategy Backtest This indicator plots the difference between the High (of the previous period)
and an exponential moving average (13 period) of the Close (of the previous period).
You can use in the xPrice any series: Open, High, Low, Close, HL2, HLC3, OHLC4 and ect...
It buy if indicator above 0 and sell if below.
You can change long to short in the Input Settings
Please, use it only for learning or paper trading. Do not for real trading.
[STRATEGY]Renko Emulator OCC v1 by JustUncleLThis "Strategy" project has been created by request.
*** EXPERIMENTAL ***
*** USE AT YOUR OWN RISK ***
Description:
Strategy based around Renko Bar Chart emulator (ATR) with direction change used to signal long/short trades.
I have generally found that setting the strategy ATR resolution to 3-5x that of the chart you are viewing tends to yield the good results, regardless of which chart time used. Positions get taken automatically following THE Renko Bar after a crossover.
The emulated Renko bars can optionally be draw on the chart.
FX Sniper: T3-CCI Strategy Backtest This simple indicator gives you a lot of useful information - when to enter, when to exit
and how to reduce risks by entering a trade on a double confirmed signal.
You can use in the xPrice any series: Open, High, Low, Close, HL2, HLC3, OHLC4 and ect...
You can change long to short in the Input Settings
Please, use it only for learning or paper trading. Do not for real trading.
FSK (Fast and Slow Kurtosis) Backtest This indicator plots the Fast & Slow Kurtosis. The Kurtosis is a market
sentiment indicator. The Kurtosis is constructed from three different parts.
The Kurtosis, the Fast Kurtosis(FK), and the Fast/Slow Kurtosis(FSK).
You can change long to short in the Input Settings
Please, use it only for learning or paper trading. Do not for real trading.
Fisher Transform Indicator by Ehlers Backtest Market prices do not have a Gaussian probability density function
as many traders think. Their probability curve is not bell-shaped.
But trader can create a nearly Gaussian PDF for prices by normalizing
them or creating a normalized indicator such as the relative strength
index and applying the Fisher transform. Such a transformed output
creates the peak swings as relatively rare events.
Fisher transform formula is: y = 0.5 * ln ((1+x)/(1-x))
The sharp turning points of these peak swings clearly and unambiguously
identify price reversals in a timely manner.
You can change long to short in the Input Settings
Please, use it only for learning or paper trading. Do not for real trading.
Extracting The Trend Strategy Backtest The related article is copyrighted material from Stocks & Commodities Mar 2010
You can use in the xPrice any series: Open, High, Low, Close, HL2, HLC3, OHLC4 and ect...
You can change long to short in the Input Settings
Please, use it only for learning or paper trading. Do not for real trading.
Ergotic TSI Strategy Backtest r - Length of first EMA smoothing of 1 day momentum 4
s - Length of second EMA smoothing of 1 day smoothing 8
u- Length of third EMA smoothing of 1 day momentum 6
Length of EMA signal line 3
Source of Ergotic TSI Close
This is one of the techniques described by William Blau in his book "Momentum,
Direction and Divergence" (1995). If you like to learn more, we advise you to
read this book. His book focuses on three key aspects of trading: momentum,
direction and divergence. Blau, who was an electrical engineer before becoming
a trader, thoroughly examines the relationship between price and momentum in
step-by-step examples. From this grounding, he then looks at the deficiencies
in other oscillators and introduces some innovative techniques, including a
fresh twist on Stochastics. On directional issues, he analyzes the intricacies
of ADX and offers a unique approach to help define trending and non-trending periods.
You can use in the xPrice any series: Open, High, Low, Close, HL2, HLC3, OHLC4 and ect...
You can change long to short in the Input Settings
Please, use it only for learning or paper trading. Do not for real trading.
Ergotic MDI (Mean Deviation Indicator) Bactest This is one of the techniques described by William Blau in his book "Momentum,
Direction and Divergence" (1995). If you like to learn more, we advise you to
read this book. His book focuses on three key aspects of trading: momentum,
direction and divergence. Blau, who was an electrical engineer before becoming
a trader, thoroughly examines the relationship between price and momentum in
step-by-step examples. From this grounding, he then looks at the deficiencies
in other oscillators and introduces some innovative techniques, including a
fresh twist on Stochastics. On directional issues, he analyzes the intricacies
of ADX and offers a unique approach to help define trending and non-trending periods.
You can change long to short in the Input Settings
Please, use it only for learning or paper trading. Do not for real trading.
Ergotic MACD Strategy Backtest This is one of the techniques described by William Blau in his book
"Momentum, Direction and Divergence" (1995). If you like to learn more,
we advise you to read this book. His book focuses on three key aspects
of trading: momentum, direction and divergence. Blau, who was an electrical
engineer before becoming a trader, thoroughly examines the relationship
between price and momentum in step-by-step examples. From this grounding,
he then looks at the deficiencies in other oscillators and introduces some
innovative techniques, including a fresh twist on Stochastics. On directional
issues, he analyzes the intricacies of ADX and offers a unique approach to help
define trending and non-trending periods.
Blau`s indicator is like usual MACD, but it plots opposite of meaningof
stndard MACD indicator.
You can change long to short in the Input Settings
Please, use it only for learning or paper trading. Do not for real trading.
Elder Ray (Bull Power) Strategy Backtest Developed by Dr Alexander Elder, the Elder-ray indicator measures buying
and selling pressure in the market. The Elder-ray is often used as part
of the Triple Screen trading system but may also be used on its own.
Dr Elder uses a 13-day exponential moving average (EMA) to indicate the
market consensus of value. Bull Power measures the ability of buyers to
drive prices above the consensus of value. Bear Power reflects the ability
of sellers to drive prices below the average consensus of value.
Bull Power is calculated by subtracting the 13-day EMA from the day's High.
Bear power subtracts the 13-day EMA from the day's Low.
You can use in the xPrice any series: Open, High, Low, Close, HL2, HLC3, OHLC4 and ect...
You can change long to short in the Input Settings
Please, use it only for learning or paper trading. Do not for real trading.
Elder Ray (Bear Power) Strategy Backtest Developed by Dr Alexander Elder, the Elder-ray indicator measures buying
and selling pressure in the market. The Elder-ray is often used as part
of the Triple Screen trading system but may also be used on its own.
Dr Elder uses a 13-day exponential moving average (EMA) to indicate the
market consensus of value. Bear Power measures the ability of sellers to
drive prices below the consensus of value. Bear Power reflects the ability
of sellers to drive prices below the average consensus of value.
Bull Power is calculated by subtracting the 13-day EMA from the day's High.
Bear power subtracts the 13-day EMA from the day's Low.
You can use in the xPrice any series: Open, High, Low, Close, HL2, HLC3, OHLC4 and ect...
You can change long to short in the Input Settings
Please, use it only for learning or paper trading. Do not for real trading.
ECO Strategy Backtest We call this one the ECO for short, but it will be listed on the indicator list
at W. Blau’s Ergodic Candlestick Oscillator. The ECO is a momentum indicator.
It is based on candlestick bars, and takes into account the size and direction
of the candlestick "body". We have found it to be a very good momentum indicator,
and especially smooth, because it is unaffected by gaps in price, unlike many other
momentum indicators.
We like to use this indicator as an additional trend confirmation tool, or as an
alternate trend definition tool, in place of a weekly indicator. The simplest way
of using the indicator is simply to define the trend based on which side of the "0"
line the indicator is located on. If the indicator is above "0", then the trend is up.
If the indicator is below "0" then the trend is down. You can add an additional
qualifier by noting the "slope" of the indicator, and the crossing points of the slow
and fast lines. Some like to use the slope alone to define trend direction. If the
lines are sloping upward, the trend is up. Alternately, if the lines are sloping
downward, the trend is down. In this view, the point where the lines "cross" is the
point where the trend changes.
When the ECO is below the "0" line, the trend is down, and we are qualified only to
sell on new short signals from the Hi-Lo Activator. In other words, when the ECO is
above 0, we are not allowed to take short signals, and when the ECO is below 0, we
are not allowed to take long signals.
You can change long to short in the Input Settings
Please, use it only for learning or paper trading. Do not for real trading.
DiNapoli Detrended Oscillator Strategy Backtest DiNapoli Detrended Oscillator Strategy
You can change long to short in the Input Settings
Please, use it only for learning or paper trading. Do not for real trading.
DAPD - Strategy Backtest This indicator is similar to Bollinger Bands. It based on DAPD - Daily
Average Price Delta. DAPD is based upon a summation for each of the
highs (hod) for the 21 days prior to today minus the summation for
each of the lows (lod) for the last 21 days prior to today. The result
of this calculation would then be divided by 21.
It will be buy when high above previos DAPD high and sell if low below previos DAPD low
You can change long to short in the Input Settings
Please, use it only for learning or paper trading. Do not for real trading.
Chaikin Volatility Strategy Backtest Chaikin's Volatility indicator compares the spread between a security's
high and low prices. It quantifies volatility as a widening of the range
between the high and the low price.
You can use in the xPrice1 and xPrice2 any series: Open, High, Low, Close, HL2,
HLC3, OHLC4 and ect...
You can change long to short in the Input Settings
Please, use it only for learning or paper trading. Do not for real trading.
CCI Strategy Reversed Backtest The Commodity Channel Index (CCI) is best used with markets that display cyclical or
seasonal characteristics, and is formulated to detect the beginning and ending of these
cycles by incorporating a moving average together with a divisor that reflects both possible
and actual trading ranges. The final index measures the deviation from normal, which indicates
major changes in market trend.
To put it simply, the Commodity Channel Index (CCI) value shows how the instrument is trading
relative to its mean (average) price. When the CCI value is high, it means that the prices are
high compared to the average price; when the CCI value is down, it means that the prices are low
compared to the average price. The CCI value usually does not fall outside the -300 to 300 range
and, in fact, is usually in the -100 to 100 range.
You can change long to short in the Input Settings
Please, use it only for learning or paper trading. Do not for real trading.
USO - Adam Smith - Moving Average Cross StrategySimple Moving Average strategy for USO - United States Oil Fund . This strategy can be used on stocks and currencies but will need to tweak frequency on chart and backtest Max Draw Down to Net Profit ratios for maximum dollar gains.
Breakout Range Short Strategy BacktestBreakout Range Short Strategy
You can change long to short in the Input Settings
Please, use it only for learning or paper trading. Do not for real trading.
Breakout Range Long Strategy Backtest Breakout Range Long Strategy
You can change long to short in the Input Settings
Please, use it only for learning or paper trading. Do not for real trading.
Bill Williams. Awesome Oscillator (AC) Strategy Backtest This indicator plots the oscillator as a histogram where blue denotes
periods suited for buying and red . for selling. If the current value
of AO (Awesome Oscillator) is above previous, the period is considered
suited for buying and the period is marked blue. If the AO value is not
above previous, the period is considered suited for selling and the
indicator marks it as red.
You can make changes in the property for set calculating strategy MA, EMA, WMA
Please, use it only for learning or paper trading. Do not for real trading.