Momentum Strategy (BTC/USDT; 30m) - STOCH RSI (with source code)Here's a strategy for low time frames (30min suggested) for BTC , based on momentum Analysis using Stochastic RSI
By default the strategy will use the 50% of the specified capital for each trade; if "Gamble Sizing" is enabled, it will add the specified amount of capital (25% by default, until reaching the 100% limit or lower) for the next trade after having detected a loss in the previous trade; if the next trade is successful, the size for the next trade comes back to 50%
• Trend Filter LONG: If the fast exponential moving average is UNDER the slow exponential moving average , it won't open LONG positions
• Trend Filter SHORT: If the fast exponential moving average is ABOVE the slow exponential moving average , it won't open SHORT positions
• Bars delay: the strategy will wait the specified amount of bars before closing the current position; the counter is triggered as soon as the closing trade condition is verified
BY MAKING USE OF THIS STRATEGY, YOU ACKNOWLEDGE AND AGREE THAT: (1) YOU ARE AWARE OF THE RISKS ASSOCIATED WITH TRANSACTIONS OF DIGITAL CURRENCIES AND THEIR DERIVATIVES; (2) YOU SHALL ASSUME ALL RISKS RELATED TO THE USE OF THIS STRATEGY AND TRANSACTIONS OF DIGITAL CURRENCIES AND THEIR DERIVATIVES; AND (3) I SHALL NOT BE LIABLE FOR ANY SUCH RISKS OR ADVERSE OUTCOMES.
SOURCE CODE BELOW
Moving Averages
Best Crypto DEMA Strategy Long onlyThis is a crypto strategy suited for big time frames like 3h+.
THIS IS A LONG ONLY STRATEGY , SUITED TO BEAT BUY AND HOLD !
It's a very risky strategy because it has no stop loss at all, so be extremely careful with it.
This strategy is made of 2 DEMA a fast and a slow one.
We have two rules : entry it's when we have a crossunder between the slow DEMA and the fast DEMA. We exit when the opposite happens, in this case, when the slow is above fast.
For this example I used an initial capital of 1000 eur, using 100% of it always, and a commission of 0.2% per each deal.
Phoenix085-Strategies==>MTF - Average True Range + MovAvgFIRSTLY, Here are a few who have influenced my pinescripting immensely recently:
@JustUncleL
@BigBitsIO
@TheArtofTrading
@QuantNomad
@SquigglesNiggles and many many many more.
Overview:
> This indicator is a simple crossover of Moving Averages.
> In addition I am using ATR rising as an indication for Trending Price.
> The entry is made once the smaller moving average crosses the bigger moving average, and also the Closes above the Smaller moving average.
> but the only twist here is,
- the ATR source is One timeframe Higher(In this case same as the session).whereas the source for the Moving averages is one Timeframe Lower.
>i.e., if the Session is 1D, the Indicator checks if the ATR is rising in the DAILY TIMEFRAME,
*_* the trade entry is made once the MOVING AVERAGE crossover happens on ONE TIME FRAME lower, as per example, ATR --> 1D = MA -->4H.
> Moving Average ->
- Thick -> Bigger MA,
- Thin and Transparent -> Smaller MA,
> Also, the Color of the Thicker MOVING AVERAGE Changes as Below:
- When LongCondition is satisfied --> Color=Lime
- When ShortCondition is satisfied --> Color=Red
- When neither condition is satisfied --> Color=Gray
NOTE:
1) There is a limitation in using the Securities function for FREE USERS --> Only 500 bars are allowed. So to use the indicators with more data, you need an upgraded TV account.
2) Strategy still needs Fine tuning, but for now, use the Thicker moving average color LIME FOR LONG ENTRIES and RED FOR SHORT ENTRIES.
This is Free for Use and share
Buy - Take Profit OR Stop Loss % BasedScript looks back for a certain period of time and than enter when price close above that look back period ema. Once enter it does not care for how many times price cross above or below. Once entered, it will either hit percenatage based take profit of stop loss.
Maximized Moving Average Crossing (by Coinrule)Using the crossings of two Moving Averages to trade in a trading strategy is a Trend-Following approach. As the name would suggest, to be successful, it requires the asset to be on-trend.
The general limit of a common strategy based on Moving Averages is that they underperform when the market is less volatile or trading sideways. When volatility compresses, the indicators get very close one to another, crossing each other very often. That's exactly the condition when trend-following strategies underperform.
To improve this strategy, it's useful to filter the buy signal using the RSI. When the RSI is close to overbought conditions, that means that the coin is likely trading in an uptrend. Strong uptrends usually come with RSI values that stay overbought for long periods, creating interesting opportunities.
Setup
Buy condition: the MA9 crosses above the MA50, and at the same time, the RSI has a value greater than 55.
Sell condition: the MA9 crosses below the MA50.
The strategy is optimized to provide better results on the 1-hr time frame, but it could work well also on higher time frames, such as the 4-hrs.
The strategy assumes each order to trade 30% of the available capital and opens a trade at a time. A trading fee of 0.1% is taken into account.
MrBS:Directional Movement Index [Trend Friend Strategy]This goes with my MrBS:DMI+ indicator. I originally combined them into one, but then you cannot set alerts based on what the ADX and DMI is doing, only strategy alerts, so separate ones have more flexibility and uses.
Indicator Version is found under "MrBS:Directional Movement Index " ()
//// THE IDEA
The majority of profits made in the market come from trending markets. Of course there are strategies that would say otherwise but for the majority of people, THE TREND IS YOUR FRIEND (until the end). The idea is to follow the trend, entering once it has established its self and exiting positions when the trend weakens. This strategy gives a rough idea of the returns produced from following purely the ADX signals. At first Heikin Ashi values were used for the calculation but the results show it's not that effective. The functionality to switch between calculation types has been left in, so we can uses HA candle data to generate signals from while looking at an OHLC chart, if we want to experiment. Due to the way strategies work, we are unable to get reliable results when running the strategy on the HA chart even if we are calculating the signals from the real OHLC values. It is best to always run strategies on standard charts.
When using this strategy, I look for confirmation of the signal based on stochastic (14:3:6) direction, reversal level of stochastic, and divergance, to add confidence and adjust position size accordingly. I am going to try and code some version of that in future updates, if anyone can help or has suggestions please drop me a message.
//// INDICATOR DETAILS
- The default settings are for optimized Daily charts, for 4 hour I would suggest a smoothing of 2.
- The default values used for calculation are the Real OHLC, we can change this to Heikin Ashi in the menu.
- The strategy enters a position when ADX crosses the threshold level, and closes the position when ADX starts to fall.
- There is a signal filter in the form of a 377 period Hull Moving Average, which the price must be above or bellow for long and short positions respectively.
- The strategy closes the position when a cross-under of the ADX and its 4 period EMA. This is an attempt to stay into positions longer as sometimes the ADX will fall for 1 bar and then keep rising, while the overall trend is strong. The downside to this is that we exit trades later and this affects our max drawdown.
Optimized Trend Tracker STRATEGY & SCREENEROptimized Trend Tracker - OTT STRATEGY & SCREENER screens the BUY and SELL signals (trend reversals) for 20 user defined different tickers in Tradingview charts.
Simply input the name of the ticker in Tradingview that you want to screen.
Terminology explanation:
Confirmed Reversal: OTT reversal that happened in the last bar and cannot be repainted.
Potential Reversal: OTT reversal that might happen in the current bar but can also not happen depending upon the timeframe closing price.
Downtrend: Tickers that are currently in the sell zone
Uptrend: Tickers that are currently in the buy zone
Screener has also got a built in OTT indicator which users can confirm the reversals on graphs.
Screener explores the 20 tickers in current graph's time frame and also in desired parameters of the OTT indicator.
Also you can optimize the parameters manually with the built in STRATEGY version.
Optimized Trend Tracker indicator :
Built in Moving Average type defaultly set as VAR but users can choose from 8 different Moving Average types like:
SMA : Simple Moving Average
EMA : Exponential Movin Average
WMA : Weighted Moving Average
TMA : Triangular Moving Average
VAR : Variable Index Dynamic Moving Average aka VIDYA
WWMA : Welles Wilder's Moving Average
ZLEMA : Zero Lag Exponential Moving Average
TSF : True Strength Force
Tip: In sideways VAR would be a good choice
You can use OTT default alarms and Buy Sell signals like:
1-
BUY when Prices are above OTT
SELL when Prices are below OTT
2-
BUY when OTT support Line crosses over OTT line.
SELL when OTT support Line crosses under OTT line.
3-
BUY when OTT line is Green and makes higher highs.
SELL when OTT line is Red and makes lower lows.
IMPORTANT: SCREENER ONLY EXPLORES AND SCREENS FOR THE 2nd SIGNAL TYPE:
BUY when OTT support Line crosses over OTT line.
SELL when OTT support Line crosses under OTT line.
AM_ZLWMA Crossover_xDear All,
Please find updated version of Zero lag WMA crossover. In addition to this added 20/50 EMA to get better results.
Settings:
ZLWMA = 8 identified by Blue line
Fast WMA = 21 identified by Red line
EMA Period 20/50
How to Trade:
Buy: Wait for positive crossover (Blue cross above Red) to happen trade can be taken there but to get better results post crossover once price move above EMA 20 then buy can be initiated.
Sell: Wait for negative crossover (Blue cross below Red) to happen trade can be taken there but to get better results post crossover once price move below EMA 20 then sell can be initiated.
Reason to wait for confirmation of price action above / Below moving average is most of the time it happens that even after crossover happens sometimes it was just a pull back and from there it could be a possibility for reversal. Once price action confirms moving above / below EMA20 then trade will be initiated.
Please comment and ask for any doubt
Buy The Dips in Bull Market (by Coinrule)During a Bull market, beating the market, it's challenging. Trading strategies that buy the dips represent one of the best approaches to surf the trend and optimize the returns.
The main obstacle is to gauge the dip's magnitude properly and set up the take profit level accordingly. The RSI is an excellent tool to catch price drops as it adjusts the entry to the asset's current volatility. Nevertheless, using the RSI as an indicator for exit is not an optimal solution in trending markets as it may end up with two scenarios:
The price reverts before reaching overbought conditions. That is the case when the trend is not that strong at that moment. Leaving the position open could result in missed profit opportunities.
The price rebounds strongly, leading the RSI quickly in overbought conditions too soon so that the strategy sells too early.
One interesting option is to combine a trigger based on the RSI to catch the dip and then use two moving averages to spot the right time to seel when the price is entirely back on-trend.
The Setup
The entry-signal comes when the RSI is lower than 35 and the MA9 is above the MA200, indicating that the asset is currently in an uptrend.
The sell-signal comes when at the same time, the price is above the MA9, and the MA9 is above the MA50.
This setup was optimized on the 15-min time frame after over 150 backtests.
A trading fee of 0.1% is taken into account. The fee is aligned to the base fee applied on Binance, which is the largest cryptocurrency exchange.
MavilimW Strategy MTF EMA with HA CandlesThis is a strategy adapted initially for Mavilim moving average indicator, based on WMA MA.
It seems to works amazingly on long term markets, like stocks, some futures, some comodities and so on.
In this strategy, I form initially the candle, using EMA values, so I take the EMA of last 50 closes, open, highs and lows and form the candle
After this I take interally HA and convert the EMA candle to HA.
Then using the moving averages on multiple timeframes, like in this example we have a chart on 4h, but I use 1h and 1d moving averages.
For long condition we have : close is above moving average timeframe1 and oving average timeframe2 and oving average timeframe3
Initially short would be close below ma timeframe1, ma timeframe2 and timeframe3 -> but here I also convert it into a long signal.
So we actually go only long .
And we have 2 different exits : for first long if we have a crossdown of 1h ma with 1 day ma, and for second long if we have a cross up of 1h ma with 1 day ma in this example.
Message me if you have any questions about this strategy.
Vegas Tunnel strategyApply Vegas Tunnel,
Use EMA144 169 as medium-term trend support
Also use EMA 576 676 and 4 multiples of 144 and 169 as long-term support and trend direction
Also increase EMA 36 43 as a short-term trend support
Suitable for stocks, indices, commodities
The applicable time scale can back-test the usability of the strategy by itself, and select the most applicable target
Introduction to current trading strategy:
According to the trend, the price will enter the market when it touches the support of each stage. When it touches the bollinger bands, it is Squeeze. Hold until it leaves the bollinger bands
But the trading strategy can be more optimized, see the code for details
Pyramiding Entries On Early Trends (by Coinrule)Pyramiding the entries in a trading strategy may be risky but at the same time very profitable with a proper risk management approach. This strategy seeks to spot early signs of uptrends and increase the position's size while the right conditions persist.
Each trade comes with its stop-loss and take-profit to enforce a proportional risk/reward profile.
The strategy uses a mix of Moving Average based setups to define the buy-signal.
The Moving Average (200) is above the Moving Average (100), which prevents from buying when the uptrend is already in its late stages
The Moving Average (9) is above the Moving Average (100), indicating that the coin is not in a downtrend.
The price crossing above the Moving Average (9) confirms the potential upside used to fire the buy order.
Each entry comes with a stop-loss and a take-profit in a ratio of 1-to-1. After over 400 backtests, we opted for a 3% TP and 3% SL, which provides the best results.
The strategy is optimized on a 1-hour time frame.
The Advantages of this strategy are:
It offers the possibility of adjusting the size of the position proportionally to the confidence in the possibilities that an uptrend will eventually form.
Low drawdowns. On average, the percentage of trades in profit is above 60%, and the stop-loss equal to the take-profit reduces the overall risk.
This strategy returned good returns both with trading pairs with Fiat/stable coins and with BTC. Considering the mixed trends that cryptocurrencies experienced during 2020 vs BTC, this strengthens the strategy's reliability.
The strategy assumes each order to trade 20% of the available capital and pyramids the entries up to 7 times.
A trading fee of 0.1% is taken into account. The fee is aligned to the base fee applied on Binance, which is the largest cryptocurrency exchange.
Keltner Channel [LINKUSDT] 1HThis is a long-only strategy tested on LINK/USDT, 1 hour bar, from Feb 2019. The entry is determined by the breakout of upper Keltnel Channel and when the +DI is higher than 32. Instead of a fixed stop-loss from the original script , I change the exit to the middle band of the Keltnel Channel. 1st profit target will close 20% of the position. 2nd profit target will close 30% of the position. While the remaining 50% position will be closed when the price closes below the middle band of the Keltnel Channel, to take advantage of big trend. All parameters are adjustable. I added another option to enable or disable the ribbon trend filter.
My thoughts: For the same period, LINK appreciated 3000%. So I guess most in and out strategies couldn’t beat a buy and hold strategy during this period. But this doesn’t mean that this strategy is not feasible as each strategy is designed to only take advantage of a certain pattern or behavior of the market. Also, short term strategies allow you to use leverage and hence enable you to use you capital efficiently. Commission is set to 0.1%, taking account of the slippage.
Suggestion: Please perform walk forward analysis before you use real money for trading. Parameters need to be adjusted from time to time depends on your analysis. Can try using ATR for profit targets as over a longer term, the volatility might drop hence a high fixed % profit targets might not be realistic.
Any suggestions are welcome!
OCC Trend Combo 1 day BTC MoonflagRuns on BTC 1 DAY (NOTE USE THIS NOT THE PREVIOUS VERSION - DEFAULTS TUNED TO 1 day BTC HERE)
USE DEFAULT SETTINGS
The strategy is to maximise the profit for OCC longs (ALMA algo)
Longs start when the price action settles around the ALMA OCC, then typically breaks up
Then follow the trend indcator (blue/orange)
Shorts normally happen when the price action crosses below the ALMA OCC, although these initiate faster than the 1 day time setting - so watchout for shorts - are harder to predict than longs
So this catches most of the big move longs at their initiation
CRYPTO HA Strategy money maker long termToday I bring you another amazing strategy.
Its made of 2 EMA in this case 50 and 100.
At the same time, internaly for candles we calculate the candles using the HA system ( while still using in live the normal candles). This way we can assure that even if we use HA candles, we avoid repainting, and its legit.
We first calculate the HA candles based on the EMA 50 values, and after that , we use that candle properties to apply to EMA 100.
Once we have that, for entries we have the next conditions :
sell = o2 > c2 and o2 < c2 and time_cond
buy = o2 < c2 and o2 > c2 and time_cond
For sell : Our open from HA 100 is bigger than Close from ha 100, and the previous open is smaller than previous close
For long : Our open from ha 100 is smaller than close from ha 100 and the previous open is bigger than previous close.
Then we have 2 options :
If we wnat to go only long , which is my prefered version ,or the original one where we go both long and short.
I found that the best results are in general around bigger timeframes, 1h+ , 3h works the best so far on my tests.
For exit we have 2 versions :
1 lets say we had a long signal, as soon as we have a short signal we close the trade. Viceversa for short.
2. Is based on price % movement. In this case I use 7.5% price movement of asset.
We have no TP in use for this system.
For the purpose of this test I use 10.000 $ account. For test I use 100% of it, without any leverage.
I use the SL based on price movement , which is a very risky tool, since it can fluctuate even at 20-30% of our capital.
For comission I used 0.1% for each deal, and a slippage of 5 points.
Be cautious with this system !
If you have any questions , message me.
Crypto MultiTrend multi timeframesHello, today I bring you another crypto strategy which can work with multiple timeframes and most of crypto currencies
Its made entirelly of multiple EMA , of different lengths : like super fast, fast, normal, slow and very slow
We also combine a little bit of price action together with the trend direction both for entry and for exits, to have a more precise control.
The rules for long close is above all EMA's, they are in ascending order and the at same time close is bigger than the previous high, and previous high > second previous high, close > 3rd previous high , close > 4th previous high, close > 5th previous high, 5th high > 6th high.
For short we have the same, but instead of high, we use lows, and instead of > we use < .
As exit we have 2 conditions for long and 2 for short
To exit long we have : super fast ema < fast ema and fast ema < normal and normal < slow ema. For short, they would be the opposite, using > sign.
The second exit for long is when our current low crosses below 4 of ours EMA during the same candle. For short, is when the high crosses above 4 of ours EMA during the same candle.
CAUTIOUS : Currently it uses not risk management system, so in this current condition is extremely risky . Be careful
If you have any questions lets me know
MillebotHello Traders,
Here you find a simplified version of the Millebot strategy.
This strategy can be used as a complete system with integrated risk management. The strategy also uses a fixed stoploss and take-profit, in contrast to the full version of the Millebot, which applies a variabele SL, TP an trailing TP derived from the assets volatility.
The Millebot is a trend-following system which detects the direction of the trend through "the Baseline". The entry-point is derived by using the Hull Moving Average.
If the HMA switches direction, the trade also will be closed.
An extra confirmation indicator can be activated to verify that the trend-detection is correct.
If you have found this trading system informative or useful, please leave a comment.
This strategy works very well on leveraged trading due to the low drawdown.
Greetings Michael
MA Strength StrategyThis is based on Aligned Moving Average Index published earlier:
But, instead of scoring trend based on how many moving averages are aligned, we are considering upside score. Higher scores are assigned for slower moving averages and lower scores for faster moving averages to give more stress to long term trend.
Buy/Sell conditions are based on moving average crossover on the upside score sum of Loopback days.
This is a very rough idea which seems to have been working ok on long only trades. Can be further improved.
Optimized RSI Strategy - Buy The Dips (by Coinrule)Buy low and sell high is every trader's mantra. While this approach looks straightforward in theory, it's sometimes challenging to put into practice. That requires stress-management to buy when price drops and resolution in selling when the price is rising. RSI is a useful tool to implement long-term and effective trading strategies. The script presents an optimized RSI trading strategy that uses a Moving average to spot the best time to buy the dip.
The strategy buys when the RSI is lower than 35, and at the same time, the price is below the MA100. In this way, the approach helps avoid catching early dips, increasing buying when the bottom approaches.
The position closes when the RSI value is above 65 . Depending on the volatility of the coins that the strategy will trade, it's possible to adjust the RSI exit value to chase larger profits.
The setup is optimized on a 15-minutes time frame and trading cryptocurrencies versus USD or stable coins.
The strategies was backtested over 150 times with multiple setups and coin to assess the best long-term system.
The strategy assumes each order to trade 30% of the available capital. A trading fee of 0.1% is taken into account. The fee is aligned to the base fee applied on Binance, which is the largest cryptocurrency exchange.
RSI of VWAP [SHORT selling]This is SHORT selling version of RSIofVWAP strategy. Settings and Logic are totally different from LONG side version , hence I am publishing it as a new strategy.
Settings
============
VWAP of RSI Length 15
Slow EMA Length 200
Short entry level 25
Cover short level 70
stop loss 5
SHORT Entry
============
condition1 : When RSIofVWAP crossdown below 25 and VWAP is below ema200
condition2: When weekly RSIofVWAP crossdown 70 and VWAP (note : session vwap , not weekly vwap) is below ema200
condition3: Use VIX value , if you want to short when the price is above ema200
vwap RSI crossing down 70 and VIX RSI is cossing up 70
enter short ... This is like falling knife :-)
I need to add the code -- later
if any of above condition is TRUE , SHORT entry will be taken
Take Profit
============
When close less than short entry price and RSIofVWAp is crossing up 25 , take profit ...close 1/3 of the position
Exit
============
When RSIofVWAP crossing up 70 level
Stop Loss
============
Stop Loss is set to 5%
Note:
1. When strategy is in SHORT position , background and bar color changes to gray
2. When strategy is already in short position , possible entries are shown in yellow background
3. RSI Length 15 is working most of the equities on hourly chart. ( RSI length 9 and 14 also works good , but not for all ... You may want to try which setting works for your symbol)
4. weekly VWAP (blue color) is also plotted by default ... you can disable it if you dont want to see it. But there is advantage keeping it on the chart , you can notice whenever weekly VWAP crosses above 70 line , trend is UP ... if you have LONG position you can hold on it ... Hurray :-)
Warning
============
For the educational purposes only
Combo Backtest 123 Reversal & Keltner Channel 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 Keltner Channel, a classic indicator
of technical analysis developed by Chester Keltner in 1960.
The indicator is a bit like Bollinger Bands and Envelopes.
WARNING:
- For purpose educate only
- This script to change bars colors.
EMA Crossover Strategy ExampleThis is a script written as an example of how to build a simple strategy with user-defined inputs based on a simple Moving Average crossover.
--
This indicator is used for backtesting Moving Average crossover strategies (only for long trades).
A "short" and "long" moving average period and calculation method (the "smoothing type") are user-adjustable. The trade is triggered when the "short" moving average crosses over the "long" moving average.
A third customizable moving average is provided which is used as a trigger to exit the trade when the *close* of a candle crosses below this "exit" moving average. Again the period and smoothing type are user-adjustable.