STARC Bands Backtest A type of technical indicator that is created by plotting two bands around
a short-term simple moving average (SMA) of an underlying asset's price.
The upper band is created by adding a value of the average true range
(ATR) - a popular indicator used by technical traders - to the moving average.
The lower band is created by subtracting a value of the ATR from the SMA.
STARC is an acronym for Stoller Average Range Channels. The indicator is
named after its creator, Manning Stoller.
You can change long to short in the Input Settings
WARNING:
- For purpose educate only
- This script to change bars colors.
Algotrading
Rainbow Oscillator Backtest Ever since the people concluded that stock market price movements are not
random or chaotic, but follow specific trends that can be forecasted, they
tried to develop different tools or procedures that could help them identify
those trends. And one of those financial indicators is the Rainbow Oscillator
Indicator. The Rainbow Oscillator Indicator is relatively new, originally
introduced in 1997, and it is used to forecast the changes of trend direction.
As market prices go up and down, the oscillator appears as a direction of the
trend, but also as the safety of the market and the depth of that trend. As
the rainbow grows in width, the current trend gives signs of continuity, and
if the value of the oscillator goes beyond 80, the market becomes more and more
unstable, being prone to a sudden reversal. When prices move towards the rainbow
and the oscillator becomes more and more flat, the market tends to remain more
stable and the bandwidth decreases. Still, if the oscillator value goes below 20,
the market is again, prone to sudden reversals. The safest bandwidth value where
the market is stable is between 20 and 80, in the Rainbow Oscillator indicator value.
The depth a certain price has on a chart and into the rainbow can be used to judge
the strength of the move.
You can change long to short in the Input Settings
WARNING:
- For purpose educate only
- This script to change bars colors.
Qstick Indicator Backtest A technical indicator developed by Tushar Chande to numerically identify
trends in candlestick charting. It is calculated by taking an 'n' period
moving average of the difference between the open and closing prices. A
Qstick value greater than zero means that the majority of the last 'n' days
have been up, indicating that buying pressure has been increasing.
Transaction signals come from when the Qstick indicator crosses through the
zero line. Crossing above zero is used as the entry signal because it is indicating
that buying pressure is increasing, while sell signals come from the indicator
crossing down through zero. In addition, an 'n' period moving average of the Qstick
values can be drawn to act as a signal line. Transaction signals are then generated
when the Qstick value crosses through the trigger line.
You can change long to short in the Input Settings
WARNING:
- For purpose educate only
- This script to change bars colors.
Psychological line Backtest Psychological line (PSY), as an indicator, is the ratio of the number of
rising periods over the total number of periods. It reflects the buying
power in relation to the selling power.
If PSY is above 50%, it indicates that buyers are in control. Likewise,
if it is below 50%, it indicates the sellers are in control. If the PSY
moves along the 50% area, it indicates balance between the buyers and
sellers and therefore there is no direction movement for the market.
You can change long to short in the Input Settings
WARNING:
- For purpose educate only
- This script to change bars colors.
Prime Number Oscillator Backtest Determining market trends has become a science even though a high number or people
still believe it’s a gambling game. Mathematicians, technicians, brokers and investors
have worked together in developing quite several indicators to help them better understand
and forecast market movements.
Developed by Modulus Financial Engineering Inc., the prime number oscillator indicates the
nearest prime number, be it at the top or the bottom of the series, and outlines the
difference between that prime number and the respective series.
You can change long to short in the Input Settings
WARNING:
- For purpose educate only
- This script to change bars colors.
Prime Number Bands Backtest Determining market trends has become a science even though a high number
or people still believe it’s a gambling game. Mathematicians, technicians,
brokers and investors have worked together in developing quite several
indicators to help them better understand and forecast market movements.
The Prime Number Bands indicator was developed by Modulus Financial Engineering
Inc. This indicator is charted by indentifying the highest and lowest prime number
in the neighborhood and plotting the two series as a band.
You can change long to short in the Input Settings
WARNING:
- For purpose educate only
- This script to change bars colors.
Perfomance index Backtest The Performance indicator or a more familiar term, KPI (key performance indicator),
is an industry term that measures the performance. Generally used by organizations,
they determine whether the company is successful or not, and the degree of success.
It is used on a business’ different levels, to quantify the progress or regress of a
department, of an employee or even of a certain program or activity. For a manager
it’s extremely important to determine which KPIs are relevant for his activity, and
what is important almost always depends on which department he wants to measure the
performance for. So the indicators set for the financial team will be different than
the ones for the marketing department and so on.
Similar to the KPIs companies use to measure their performance on a monthly, quarterly
and yearly basis, the stock market makes use of a performance indicator as well, although
on the market, the performance index is calculated on a daily basis. The stock market
performance indicates the direction of the stock market as a whole, or of a specific stock
and gives traders an overall impression over the future security prices, helping them decide
the best move. A change in the indicator gives information about future trends a stock could
adopt, information about a sector or even on the whole economy. The financial sector is the
most relevant department of the economy and the indicators provide information on its overall
health, so when a stock price moves upwards, the indicators are a signal of good news. On the
other hand, if the price of a particular stock decreases, that is because bad news about its
performance are out and they generate negative signals to the market, causing the price to go
downwards. One could state that the movement of the security prices and consequently, the movement
of the indicators are an overall evaluation of a country’s economic trend.
You can change long to short in the Input Settings
WARNING:
- For purpose educate only
- This script to change bars colors.
Line Regression Intercept Backtest Linear Regression Intercept is one of the indicators calculated by using the
Linear Regression technique. Linear regression indicates the value of the Y
(generally the price) when the value of X (the time series) is 0. Linear
Regression Intercept is used along with the Linear Regression Slope to create
the Linear Regression Line. The Linear Regression Intercept along with the Slope
creates the Regression line.
You can change long to short in the Input Settings
WARNING:
- For purpose educate only
- This script to change bars colors.
Chande Forecast Oscillator Backtest The Chande Forecast Oscillator developed by Tushar Chande The Forecast
Oscillator plots the percentage difference between the closing price and
the n-period linear regression forecasted price. The oscillator is above
zero when the forecast price is greater than the closing price and less
than zero if it is below.
You can change long to short in the Input Settings
WARNING:
- For purpose educate only
- This script to change bars colors.
Center Of Gravity Backtest The indicator is based on moving averages. On the basis of these, the
"center" of the price is calculated, and price channels are also constructed,
which act as corridors for the asset quotations.
You can change long to short in the Input Settings
WARNING:
- For purpose educate only
- This script to change bars colors.
Moving Average Envelopes Backtest Moving Average Envelopes are percentage-based envelopes set above and
below a moving average. The moving average, which forms the base for
this indicator, can be a simple or exponential moving average. Each
envelope is then set the same percentage above or below the moving average.
This creates parallel bands that follow price action. With a moving average
as the base, Moving Average Envelopes can be used as a trend following indicator.
However, this indicator is not limited to just trend following. The envelopes
can also be used to identify overbought and oversold levels when the trend is
relatively flat.
You can change long to short in the Input Settings
WARNING:
- For purpose educate only
- This script to change bars colors.
Can someone please help me create an alert for this strategyHave tried a few different methods but just constantly get errors in different lines of code......been trying for hours *sigh*. Any help would be so greatly appreciated
Long when rsi overbought,
close trade when rsi oversold and < Vstop
//@version=3
strategy("Vstop and RSI", overlay=true)
//RSI Section
length = input(2, "RSI Period")
overSold = input(30, "Oversold Level")
overBought = input(70, "Overbought Level")
price = close
vrsi = rsi (price, length)
//VSTOP Section
vlength = input(2, "Vstop Length")
mult = input(2, "Vstop Mult")
atr_ = atr(vlength)
max1=0.0
min1=0.0
is_uptrend_prev = false
stop=0.0
vstop_prev=0.0
vstop1=0.0
is_uptrend=false
is_trend_changed=false
max_ = 0.0
min_ = 0.0
vstop=0.0
max1 := max(nz(max_ ), close)
min1 := min(nz(min_ ), close)
is_uptrend_prev := nz(is_uptrend , true)
stop := is_uptrend_prev ? max1 - mult * atr_ : min1 + mult * atr_
vstop_prev := nz(vstop )
vstop1 := is_uptrend_prev ? max(vstop_prev, stop) : min(vstop_prev, stop)
is_uptrend := close - vstop1 >= 0
is_trend_changed := is_uptrend != is_uptrend_prev
max_ := is_trend_changed ? close : max1
min_ := is_trend_changed ? close : min1
vstop := is_trend_changed ? is_uptrend ? max_ - mult * atr_ : min_ + mult * atr_ : vstop1
plot(vstop, color = is_uptrend ? green : red, style=cross, linewidth=2)
if vrsi > overBought
strategy.entry("Buy", strategy.long, comment="Buy")
if vrsi < overSold and vstop > price
strategy.entry("Sell", strategy.short, comment="Sell")
High Low Bands Backtest As the name suggests, High low bands are two bands surrounding the underlying’s
price. These bands are generated from the triangular moving averages calculated
from the underlying’s price. The triangular moving average is, in turn, shifted
up and down by a fixed percentage. The bands, thus formed, are termed as High
low bands. The main theme and concept of High low bands is based upon the triangular
moving average.
You can change long to short in the Input Settings
WARNING:
- For purpose educate only
- This script to change bars colors.
Fractal Chaos Oscillator Backtest The value of Fractal Chaos Oscillator is calculated as the difference between
the most subtle movements of the market. In general, its value moves between
-1.000 and 1.000. The higher the value of the Fractal Chaos Oscillator, the
more one can say that it follows a certain trend – an increase in prices trend,
or a decrease in prices trend.
Being an indicator expressed in a numeric value, traders say that this is an
indicator that puts a value on the trendiness of the markets. When the FCO reaches
a high value, they initiate the “buy” operation, contrarily when the FCO reaches a
low value, they signal the “sell” action. This is an excellent indicator to use in
intra-day trading.
You can change long to short in the Input Settings
WARNING:
- For purpose educate only
- This script to change bars colors.
Fractal Chaos Bands Backtest The FCB indicator looks back in time depending on the number of time periods trader selected
to plot the indicator. The upper fractal line is made by plotting stock price highs and the
lower fractal line is made by plotting stock price lows. Essentially, the Fractal Chaos Bands
show an overall panorama of the price movement, as they filter out the insignificant fluctuations
of the stock price.
You can change long to short in the Input Settings
WARNING:
- For purpose educate only
- This script to change bars colors.
Donchian Channel Width Strategy The Donchian Channel was developed by Richard Donchian and it could be compared
to the Bollinger Bands. When it comes to volatility analysis, the Donchian Channel
Width was created in the same way as the Bollinger Bandwidth technical indicator was.
You can change long to short in the Input Settings
WARNING:
- For purpose educate only
- This script to change bars colors.
Smoothened Williams Accumulation/Distribution (Williams AD) Accumulation is a term used to describe a market controlled by buyers;
whereas distribution is defined by a market controlled by sellers.
Williams recommends trading this indicator based on divergences:
Distribution of the security is indicated when the security is making
a new high and the A/D indicator is failing to make a new high. Sell.
Accumulation of the security is indicated when the security is making
a new low and the A/D indicator is failing to make a new low. Buy.
You can change long to short in the Input Settings
WARNING:
- For purpose educate only
- This script to change bars colors.
Williams Accumulation/Distribution (Williams AD) Backtest Accumulation is a term used to describe a market controlled by buyers;
whereas distribution is defined by a market controlled by sellers.
Williams recommends trading this indicator based on divergences:
Distribution of the security is indicated when the security is making
a new high and the A/D indicator is failing to make a new high. Sell.
Accumulation of the security is indicated when the security is making
a new low and the A/D indicator is failing to make a new low. Buy.
You can change long to short in the Input Settings
WARNING:
- For purpose educate only
- This script to change bars colors.
Combining Exponential And Volume Weighting Backtest The related article is copyrighted material from Stocks & Commodities 2009 Oct
You can change long to short in the Input Settings
WARNING:
- For purpose educate only
- This script to change bars colors.
Trend continuation factor Backtest Trend continuation factor, by M.H. Pee
The related article is copyrighted material from Stocks & Commodities.
You can change long to short in the Input Settings
WARNING:
- For purpose educate only
- This script to change bars colors.
Trend Analysis Index Backtest In essence, it is simply the standard deviation of the last x bars of a
y-bar moving average. Thus, the TAI is a simple trend indicator when prices
trend with authority, the slope of the moving average increases, and when
prices meander in a trendless range, the slope of the moving average decreases.
You can change long to short in the Input Settings
WARNING:
- For purpose educate only
- This script to change bars colors.
TFS: Volume Oscillator Backtest This is the second part of TFS trading strategy. The concept of this
indicator is similar to that of On-Balance Volume indicator (OBV). It
is calculated according to these rules:
If Close > Open, Volume is positive
If Close < Open, Volume is negative
If Close = Open, Volume is neutral
Then you take the 7-day MA of the results.
You can change long to short in the Input Settings
WARNING:
- For purpose educate only
- This script to change bars colors.
TFS: Tether Line Backtest Tether line indicator is the first component of TFS trading strategy.
It was named this way because stock prices have a tendency to cluster
around it. It means that stock prices tend to move away from the midpoint
between their 50-day highs and lows, then return to that midpoint at some
time in the future. On a chart, it appears as though the stock price is
tethered to this line, and hence the name.
You can change long to short in the Input Settings
WARNING:
- For purpose educate only
- This script to change bars colors.