Bjorgum Triple EMA Strat-This script uses a triple EMA strategy to establish trend direction and reversal points
-Inputs are smoothed with Heiken Ashi values to reduce whipsaws, while providing timely execution
-Buy and sell indications are dictated by bar color
-Bar color is dictated by the candle close value in relation to the EMAs, specifically the faster of the 3
(If candle closes above or below the fast and intermediate averages, a buy or sell signal is indicated by bar color change)
-If the close falls between the two a cautionary signal is given. The viewer can hold, or take profit, or evaluate other indicators for clues
-Best results are obtained when coupled with Bjorgum TSI and Bjorgum RSI for confirmation of signals (see TradingView profile)
@Bjorgum on Stocktwits
Strategy
Implied Volatility PercentileThis script calculates the Implied Volatility (IV) based on the daily returns of price using a standard deviation. It then annualizes the 30 day average to create the historical Implied Volatility. This indicator is intended to measure the IV for options traders but could also provide information for equities traders to show how price is extended in the expected price range based on the historical volatility.
The IV Rank (Green line) is then calculated by looking at the high and low volatility over the number of days back specified in the input parameter, default is 252 (trading days in 1 year) and then calculating the rank of the current IV compared to the High and Low. This is not as reliable as the IV Percentile as the and extreme high or low could have a side effect on the ranking but it is included for those that want to use.
The IV Percentile is calculated by counting the number of days below the current IV, then returns this as a % of the days back in the input
You can adjust the number of days back to check the IV Rank & IV Percentile if you are not wanting to look back a whole year.
This will only work on Daily or higher timeframe charts.
Support and Resistance StrategySupport and resistance Strategy (FX and Crypto)
Description: This strategy uses “support” S and “resistance” R levels, which can be computed
using the “pivot point” (a.k.a. the “center”) C as follows:
C = (PH + PL + PC) / 3
R = 2 × C - PL
S = 2 × C - PH
Here PH, PL and PC are the previous day’s high, low and closing prices.
One way to define a trading signal is as follows (as above, P is the current price):
Signal:
Establish long position if P > C
Liquidate long position if P ≥ R
Establish short position if P < C
Liquidate short position if P ≤ S
Other definitions of the pivot point (e.g., using the current trading day’s open price) and
higher/lower support/resistance levels exist.
Style tags: Trend Following, Trend Analysis
Asset class: Equities, Futures, ETFs, Currencies and Commodities
Dataset: FX Minutes/Hours/Days
Simple Moving Average + ADX + DMI + Time Range Test
Use long and short moving average to look for a potential price in/out. (default as 14 and 7, bases on the history experience)
ADX and DMI to prevent the small volatility and tangling MA.
This script allows you to set the beginning & end time to test the bullish & bearish market.
If you want an indicator version, here is it.
Thanks.
Combo Backtest 123 Reversal & Volume SMA This is combo strategies for get a cumulative signal.
First strategy
This System was created from the Book "How I Tripled My Money In The
Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
The strategy buys at market, if close price is higher than the previous close
during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
The strategy sells at market, if close price is lower than the previous close price
during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
Second strategy
Volume and SMA
WARNING:
- For purpose educate only
- This script to change bars colors.
EMA_cumulativeVolume_crossover[Strategy]This strategy is back test for EMA_cumulativeVolume_crossover
BUY
When ema50 crossover cumulative volume of 100 period
Exit
When ema50 cross down cumulative volume of 100 period
Partial Exit
for the partial profit I have used stopLoss value , but up side. When price is above partial profit and crossing down EMA 50 , exit 1/3 position
Please note when you select this setting, you see spike number of trades, that is because you closing partial number of trades. which increases the winning rate but reduces the total net profit.
Stop Loss
Defaulted to 8%
Added parameter to take LONG or SHORT trades ... on SHORT side not very good results ... you can review it and provide feedback how to improve the performance.
Short Selling
Reverse above BUY conditions
I have tested LONG trades on SPY , QQQ and AAPL on 1 Hour and 30 mins timeframes. for AAPL on DAY timeframe it shows crazy results :-)
Note
For the use of educational purposes only.
Stepped trailing strategy exampleThis is a stepped trailing exit example for educational purpose .
Short brief.
There are 1 stop loss and 3 profit levels.
When first tp is reached we move stop loss to break-even.
When second tp is reached we move stop loss to first tp.
When third tp is reached we exit by profit.
Logistic RSI, STOCH, ROC, AO, ... by DGTExperimental attemt of applying Logistic Map Equation for some of widly used indicators.
With this study "Awesome Oscillator (AO)", "Rate of Change (ROC)", "Relative Strength Index (RSI)", "Stochastic (STOCH)" and a custom interpretation of Logistic Map Equation is presented
Calculations with Logistic Map Equation makes sense when the calculated results are iterated many times within the same equation.
Here is the Logistic Map Equation : Xn+1 = r * Xn * (1 - Xn)
Where, the value of r is the key for this equation which changes amazingly the behaviour of the Logistic Map.
The value we have asigned for r is less then 1 and greater than 0 ( 0 < r < 1) and in this case the iterations performed with the maximum number of output series allowed by Pine is quite enough for our purpose and thanks to arrays we can easiliy store them for further processing
What we have as output:
Each iteration result is then plotted (excluding plotting the first iteration), as circles or line based on user preference
Values above and below zero level (0) are coloured differently to emphasis bull and bear power
Finally Standard Deviation of Array's Elements is ploted as line. Users may choose to display this line only
So where it comes the indicators "Awesome Oscillator (AO)", "Rate of Change (ROC)", "Relative Strength Index (RSI)", "Stochastic (STOCH)".
Those are the indicators whose values are assigned to our key varaiable in the Logistic Map equation forulma which is r
Further details regarding Logistic Map can found under the description of “Logistic EMA w/ Signals by DGT” study
Disclaimer:
Trading success is all about following your trading strategy and the indicators should fit within your trading strategy, and not to be traded upon solely
The script is for informational and educational purposes only. Use of the script does not constitute professional and/or financial advice. You alone have the sole responsibility of evaluating the script output and risks associated with the use of the script. In exchange for using the script, you agree not to hold dgtrd TradingView user liable for any possible claim for damages arising from any decision you make based on use of the script
Combo Strategy 123 Reversal & Gann Swing Oscillator This is combo strategies for get a cumulative signal.
First strategy
This System was created from the Book "How I Tripled My Money In The
Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
The strategy buys at market, if close price is higher than the previous close
during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
The strategy sells at market, if close price is lower than the previous close price
during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
Second strategy
The Gann Swing Oscillator has been adapted from Robert Krausz's book,
"A W.D. Gann Treasure Discovered". The Gann Swing Oscillator helps
define market swings.
WARNING:
- For purpose educate only
- This script to change bars colors.
TEMA/DEMA/HMA StrategyThe TEMA/DEMA/HMA strategy is a basic trend follower looking for when the TEMA crosses above the DEMA as a buy signal and the opposite for the sell.
The HMA is used as a longer more Dynamic MA to confirm the wider trend to filter out bad trades.
This is a basic idea that can be expanded on using different indicator types to either add signals or filter out more bad signals!
Combo Strategy 123 Reversal & FX Sniper: T3-CCI This is combo strategies for get a cumulative signal.
First strategy
This System was created from the Book "How I Tripled My Money In The
Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
The strategy buys at market, if close price is higher than the previous close
during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
The strategy sells at market, if close price is lower than the previous close price
during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
Second strategy
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...
WARNING:
- For purpose educate only
- This script to change bars colors.
EMA_HMA_RSI_StrategyThis strategy BUYS when HMA is below EMA (default setting is 200) and HMA turning to green and RSI 13 is below 70
Adds to existing position when current price is below BUY price and RSI crossing above 30 or 40
Exits the long position when HMA crosses down EMA
when you select Take Profit setting , partial profits are taken when current price > BUY price and RSI 13 crossing down 80
Bar color changes to purple when RSI13 is above 80 (if only in Long position exists)
Tested for SPY QQQ AAPL on hourly and 30 mins chart
Warning : For educational purposes only
Combo Strategy 123 Reversal & Volatility Finite Volume ElementsThis is combo strategies for get a cumulative signal.
First strategy
This System was created from the Book "How I Tripled My Money In The
Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
The strategy buys at market, if close price is higher than the previous close
during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
The strategy sells at market, if close price is lower than the previous close price
during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
Second strategy
This is another version of FVE indicator that we have posted earlier
in this forum.
This version has an important enhancement to the previous one that`s
especially useful with intraday minute charts.
Due to the volatility had not been taken into account to avoid the extra
complication in the formula, the previous formula has some drawbacks:
The main drawback is that the constant cutoff coefficient will overestimate
price changes in minute charts and underestimate corresponding changes in
weekly or monthly charts.
And now the indicator uses adaptive cutoff coefficient which will adjust to
all time frames automatically.
WARNING:
- For purpose educate only
- This script to change bars colors.
72s: Adaptive Hull Moving Average+One challenging issue for beginner traders is to differentiate market conditions, whether or not the current market is giving best possibility to stack profits, as earliest, in shortest time possible, or not.
On intraday, we've seen some big actions by big banks are somewhat can be defined --or circling around-- by HMA 200 . I've been thinking on to make the visuals more conform to price dynamics (separating major movement and minor noise) to get clearer signs of when it starts to happen. So it will be easier to see in a glance when the strength starts really taken place, with less cluttered chart.
This Adaptive HMA is using the new Pine Script's feature which now support Dynamic Length arguments for several Pine functions. ( read: www.tradingview.com). It hasn't support the built-in HMA() directly, but thankfully we can use its wma() formula to construct. (Note: I tweaked a bit HMA formula already popular here by using plain int() instead of round() on its wma's length, since I find it precisely match tradingview's built-in HMA).
You can choose which aspect the Adaptive HMA period will adapt to.
In this study I present it with two options: Volume and Volatility . It will "moves" faster or slower depends on which situation the aspect is currently into. ie: When volume is generally low or volatile readings is not there, price won't move very much, so the adapting MA will slow down by dynamically lengthen the lookback period, and vice versa, and so on.
Colour-markings in the Adaptive resembles which situation explained above. In addition, I also combine it with slope calculation of the MA to help measuring trend-strength or sideway/choppy conditions.
This way when we use it as dynamic support/resistance it will be more visually-reliable.
Secondly, and more important, it might help us traders with better probability info of whether or not a trade should even worth to be made . ie: If in the mean time market won't give much movement, any profit would also only as much. In most cases, we might better save our dime for later or place it somewhere else.
HOW TO USE:
Aside from better dynamic support/resistance and clearer breakout confirmation, MA is coloured as follow:
YELLOW:
Market is in consolidation or flat. Be it sideways, choppy, or in relatively small movements. If it shows up in a trending market, it may be an earlier sign that current trend might about to change its direction, or confirming a price broke-out to another side.
LIGHT GREEN or LIGHT RED:
Tells if a trend is forming but still relatively weak (or getting weaker), as it doesn't have volume or volatility to support.
DARKER GREEN ot DARKER RED:
This is where we can expect some good and strong price movement to ride. If it's strong enough, many times it marks a start of new long-lasting major trend.
SETTINGS:
Charger:
Choose which aspect your HMA should plug itself into, thus it will adapt to it.
Minimum Period, Maximum Period:
172 - 233 is just my own setting to outmatch the static HMA 200 for intraday. I find it --in my style of trading-- best in 15m tf in almost any pair, and 15m to 1H for some stocks. It also works nicely with conventional EMA 200, sometimes as if they somewhat work hand-in-hand in defining where the price should go. But you can, ofcourse, experiment with other ranges, broader or narrower. Especially if you already have an established strategy to follow to. As you might do with:
Consolidation area threshold:
This has to do with slope calculation. The bigger the number means your MA needs bigger degree to define the market is out of flat (yellow) area. This can be useful if needed to lighten up the filter or vice-versa.
Background colouring:
Just another colouring to help highlighting the difference in market conditions.
ALERTS:
There are two alerts:
Volume Break: when volume is breaking up above average, and
Volatility Meter: when the market more likely is about to have its moment of the big wiggling brush.
USAGE:
Very very nice BUY entry to catch big up-movement if:
1. Price is above MA. (It is best when price is also not to far distance from the MA, or you can also use distance oscillator to help out too)
2. HMA's color is in darker green. Means it's on the charging plug with your chosen aspect.
3. RSI is above 50. This is to help as additional confirmation.
Clear SELL entry signal is same as above, just the opposite.
-------------------------------------------------------
Note:
Lower timeframe of course means more noise to be filtered. Depends on the instrument, you might need to tweak the settings a bit till it conform nicely and shows lots of good trades in history. Here's another example on GBPUSD 5m timeframe:
For exit/take-profit point, you can use a second faster period static HMA. Or you can also use RSI. Here's an example:
Don't get me wrong, on few occasions I found it's still best using static MA to spot fakeouts, breakouts, etc, especially ones that's been already use widely. If that's the case or price actions seems suspicious, simply put the same value for minimum and maximum period settings, and there you have the original HMA with extra features.
For developer, check in the code if you need to customise your own charger.
-------------------------------------------------------
That's it. Hopefully this Adaptive HMA+ could at least be a good sidekick to your own strategy, as it does mine. ;)
VWAP + Fibo Dev Extensions StrategyBased on my VWAP + Fibo deviations indicator, I tested some strategies to see if the indicator can be profitable; and I got it !
This strategy uses:
H1 timeframe
Weekly VWAP
+1.618 / +2.618 / -1.618 / -2.618 Deviations Extensions to create 2 bands
The value of the deviation
First, the 2 bands are plotted : +1.618/+2.618 painted in red and -1.618/-2.618 painted in lime.
Then, we wait for the deviation value to reach at least 150 (see thumbnail) to avoid littles moves when the gaps between bands are too short.
Entry long position :
first candle must crossunder the -1.618 level and low have to stay over the -2.618
low of the second one must stay in the lime band
enter the third one if the deviation value is over limit (150)
Exit long position :
TP : when a high crossover VWAP
SL : when a low crossunder -2.618
Entry short position :
first candle must crossover the +1.618 level and high have to stay under the +2.618
high of the second one must stay in the red band
enter the third one if the deviation value is over limit (150)
Exit short position :
TP : when a low crossunder VWAP
SL : when a high crossover +2.618
Notes :
this strategy uses pyramiding (5), be careful and calculate your risk management
the comission value is set to 0.08% to include slippages when entering a trade because of market orders
This strategy is not an advice to invest, make your own decisions.
Combo Strategy 123 Reversal & FSK (Fast and Slow Kurtosis) This is combo strategies for get a cumulative signal.
First strategy
This System was created from the Book "How I Tripled My Money In The
Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
The strategy buys at market, if close price is higher than the previous close
during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
The strategy sells at market, if close price is lower than the previous close price
during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
Second strategy
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).
WARNING:
- For purpose educate only
- This script to change bars colors.
Inferential Statistics And Quick Metrics For Strategy Analysis.Part of this script is used to calculate inferential statistics and metrics not available through the built in variables in the strategy tester.
A label will be created on the last bar displaying important strategy results, so you can test and analyze strategies quicker.
The built in strategy itself is just an example. You can copy and paste the metrics into any existing version 4 strategy and instantly use it**
**Just be sure all the variable names are unique in your target script.
I am looking for critique and would appreciate input on the statistical functions. I am aware that some of these functions are based on the assumption that the data is normally distributed. It's not meant to be perfect, but it is meant to be helpful. So if you think I can add or improve something to make it more helpful, let me know.
Cycles StrategyThis is back-testable strategy is a modified version of the Stochastic strategy. It is meant to accompany the modified Stochastic indicator: "Cycles".
Modifications to the Stochastic strategy include;
1. Programmable settings for the Stochastic Periods (%K, %D and Smooth %K).
2. Programmable settings for the MACD Periods (Fast, Slow, Smoothing)
3. Programmable thresholds for %K, to qualify a potential entry strategy.
4. Programmable thresholds for %D, to qualify a potential exit strategy.
5. Buttons to choose which components to use in the trading algorithm.
6. Choose the month and year to back test.
The trading algorithm:
1. When %K exceeds the upper/lower threshold and then hooks down/up, in the direction of the Moving Average (MA). This is the minimum entry qualification.
2. When %D exceeds the lower/upper threshold and angled in the direction of the trade, is the exit qualification.
3. Additional entry filters include the direction of MACD, Signal and %D. Also, the "cliff", being a long entry is a higher high or a short entry is a lower low.
4. Strategy can only go "Long" or "Short" depending on the selected setting.
5. By matching the settings in the "Cycles" indicator, you can (almost) see what the strategy is doing.
6. Be sure to select the "Recalculate" buttons, to recalculate on every new Tick, for best results.
Please click the Like button and leave a comment if you appreciate this script. Improvements will be implemented as time goes on.
I am not a licensed trade advisor. This strategy is for entertainment only. Use at your own risk!
Combo Strategy 123 Reversal & Fractal Chaos OscillatorThis is combo strategies for get a cumulative signal.
First strategy
This System was created from the Book "How I Tripled My Money In The
Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
The strategy buys at market, if close price is higher than the previous close
during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
The strategy sells at market, if close price is lower than the previous close price
during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
Second strategy
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.
WARNING:
- For purpose educate only
- This script to change bars colors.
RSI on VWAP Upgraded strategyFirst of all, the idea of apply RSI to VWAP was inspired by XaviZ; at least, that where I first saw that.
I simply applied the idea and searched for apply this on lower timeframe (M15) to increase the number of positions and improve the profit factor.
The conditions to enter are the same :
long : enter on RSI crossover oversold level
short : enter on RSI crossunder oversell level
To close position, I found a little change to apply :
long : close position when RSI(VWAP) went in overbought zone and crossunder the overbought level OR after being at least x bars in the overbought zone (parameter is 28 by default) => when the first condition happens
short : close position when RSI(VWAP) went in oversold zone and crossover the oversold level OR after being at least x bars in the oversell zone (parameter is 28 by default) => when the first condition happens
With this change, I got better results specially on BTCUSDTPERP (M15) where I reach a 6.8 profit factor with 119 trades closed. Not BAD !
The defaults parameters are the best found for BTCUSDTPERP (M15), but the strategy works fine for other pairs if you take time to find the rights combinations.
In this strategy you can change (with defaults in () ):
RSI length (28)
RSI overbought level (85)
RSI oversell level (30)
Number of bars before leaving as explain above (28)
The choice to take longs only, shorts only or both
The number of coin/token by position
The start date for backtesting
Please note that the script use a pyramiding parameter of 3 (can be changed in the first line of the script); that means that you can take up to 3 positions before closing. It lets you improve average enter price but increase the risk. 3 is the best I found to improve profit factor without expose myself too much.
This script would be better if automated because of the conditions of buy and sell.
It's only for educative purpose, not an advice to invest.
All my free scripts here : fr.tradingview.com
Leave a message and don't forget to follow me ;) !
Lagged Donchian Channel + EMAThis strategy is based on a lagged 24 periods Donchian Channel and a 200 periods EMA .
The enter positions are calculated this way :
Bull entry
1. we wait for the close of a candle below the channel and it must be below the 200 EMA
2. the following candle must be a green one and close in the lagged channel
3. we put a long order at the close of the second candle, a stop loss at the low of last 3 candles and a x3 take profit
Bear entry
1. we wait for the close of a candle above the channel and it must be above the 200 EMA
2. the following candle must be a red one and close in the lagged channel
3. we put a short order at the close of the second candle, a stop loss at the high of last 3 candles and a x3 take profit
For both long or short positions :
If the order is not filled, it's cancelled if the price reach 50% of the TP or if the price reach the stop loss level
The position is closed if a new bear/bull condition appears in the other side of the position (if a bear appears when you're long and inversement)
Features :
Position calculator's included with leverage option
Labels of position can be plotted or not
Bull/Bear channels can be plotted with red and green filled
All parameters can be changed for backtesting
Better results have been got with defaults parameters on LTCUSDTPERP in H1 timeframe => profit factor of 2.84 with almost 100 positions.
Hope this strategy will be useful and it would be cool if I could get feedback, comments or better combinations of parameters !!
Don't hesitate to like and leave a comment ;)
@Mysteriown
Super Guppy StrategyCM Super Guppy with Long/Short signals, backtesting, and additional options. Updated for PineScript v4.
COINBASE:BTCUSD
Features 2 primary modes, depending on your risk profile. These options are available in the settings:
"Early Signals" ON (default):
Prints a "long" on grey to green transitions AND red to gray transitions.
Prints a "short" on green to grey transitions AND gray to red transitions.
Will not print back-to-back repeated positions (i.e. green → grey → red will only print the first green → gray "short" signal and not print "short" twice).
Rotates long and short positions with no delay.
"Early Signals" OFF
Will close trades, but never open new ones, when guppy transitions to from any color to gray.
Open long: guppy transitions gray to green.
Close long: guppy transitions green to gray.
Open short: guppy transitions gray to red.
Close short: guppy transitions red to gray.
Does not rotate long and short positions back to back.
Additionally:
Can toggle on/off the 200EMA. Default is off.
Can toggle on/off short positions. Default is on.
In development: alerts
Reversal closing priceThe reversal closing price (RCP) is a candlestick pattern which follows two simples rules:
the low price of current candle needs to be lower than the low price of the last 2 candles
the closing price of current candle needes to be higher than the closing price of the last candle
This generates a signal for a long position. For a short position, the conditions are inverted:
the high price of current candle needs to be higher than the high price of the last 2 candles
the closing price of current candle needes to be lower than the closing price of the last candle
Since RCP is a trend follower indicator, the strategy is programmed in such a way that long positions are only placed if the short period EMA is above the long period EMA, and short positions are only placed if the short EMA is bellow the long EMA. Both periods are configurable, and should be ajusted for each asset.
This strategy uses a fixed stop loss and take profit, and the it's ratio is configurable. The stop price is one tick lower than the lowest price of X candles prior to the order execution for long positions, while in short positions it's one tick higher than the higher price. The amount of candles to lookback (X) is configurable. Both stop and take profit prices are displayed, the first as a red line, and the second as a green line.
This is the setting that I've found to work best with TVC:SPX , but you may find a better setting. While the RCP is universal, it's placement depends on the trend and it's strenght, something that is very heterogeneous among assets.
I really wish that I was able to place images, but I don't have PRO, so text will have to do.
This strategy was designed by Alexandre Wolwacz, a.k.a. Stormer.