Trading Inside Gap - 15 min chartThis code is for educational purposes.
Following are the major takeaways from this code
1. Identify the first bar of the series.
2. Using security function to obtain data from a higher Time frame
3. Use of function strategy.risk.max_intraday_filled_orders
4. closing trade at the end of the session
The code is in raw form and can be refined/modified to improve results
การวิเคราะห์แนวโน้ม
ABUs EurorampThis strategy backtests the opening ramp of Europe at 9am European time, which is 2am Chicago time ( CME ES timezone ) on the ES Futures Contract.
The following conditions are embedded in the strategy:
- Market entry at 2 am Chicago time
- Size = 2 contracts
- Stop = -5 points
- TP 1 = +3 points (1 Contract)
- Stop to Break even (entry + 0.5) after TP 1 is reached
- Set a TP 2 stop to +5 if entry is +10 points
- Close all positions EOD RTH
As the script entry / stops / TPs work on candle closes, best is to use the strategy on the 5min chart.
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
KISS Strategy: SMA + EMA//Hello my fellow investors
//I am creating a simple non-cluttered strategy that uses 3(+1) simple means to determine: viability, entry, and exit
//1) Has a consistent trend been maintained for several days/weeks
//2) SH SMA crossover LG SMA = Bullish entry/LG SMA crossover SH SMA = Bearish entry
//3) Use the Slope factor & Weeks in Trend (WiT) to dertermine how strong of an entry signal you are comfortable with
//4) Exit position based on next SMA cross and trend reversal or stop loss%
//3+1) For added confidence in trend detection: Apply MACD check - buy--> MACD line above signal line and corssover below histogram \\ sell --> MACD line below signal line and crossover above histogram.
//*)This code also allows you to determine your desired backtesting date compliments of alanaster
The chart shown has:
Starting Capital: $10,000
Investment percent per trade: 1.5%
Stop Loss: 20%
Take Profit: 100%
Combo Backtest 123 Reversal & Key Reversal Up 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
A key reversal is a one-day trading pattern that may signal the reversal of a trend.
Other frequently-used names for key reversal include "one-day reversal" and "reversal day."
How Does a Key Reversal Work?
Depending on which way the stock is trending, a key reversal day occurs when:
In an uptrend -- prices hit a new high and then close near the previous day's lows.
In a downtrend -- prices hit a new low, but close near the previous day's highs
WARNING:
- For purpose educate only
- This script to change bars colors.
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.
Combo Backtest 123 Reversal & Key Reversal Down 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
A key reversal is a one-day trading pattern that may signal the reversal of a trend.
Other frequently-used names for key reversal include "one-day reversal" and "reversal day."
How Does a Key Reversal Work?
Depending on which way the stock is trending, a key reversal day occurs when:
In an uptrend -- prices hit a new high and then close near the previous day's lows.
In a downtrend -- prices hit a new low, but close near the previous day's highs
WARNING:
- For purpose educate only
- This script to change bars colors.
RSI of Ultimate Oscillator [SHORT Selling] StrategyThis is SHORT selling strategy with Ultimate Oscillator. Instead of drectly using the UO oscillator , I have used RSI on UO (as I did in my previous strategies )
Ultimator Oscillator settings are 5, 10 and 15
RSI of UO setting is 5
Short Sell
==========
I have used moving averages from WilliamAlligator indicator --- settings are 10(Lips), 20(teeth) and 50 (Jaw)
when Lips , Teeth and Jaw are aligned to downtrend (that means Lips < Teeth < Jaw )
Look for RSIofUO dropping below 60 ( setting parameter is Sell Line )
Partial Exit
==========
When RSIofUO crossing up Oversold line i.e 30
Cover Short / Exit
=================
When RSIofUO crosisng above overbought line i.e 70
StopLoss
========
StopLoss defaulted to 3 % , Though it is mentioned in settings , it has not been not used to calcuate and StopLoss Exit... Reason is, when RSIofUO already crossed 60 line (for SHORTING) , then it would take more efforts go up beynd 60. There is saying price takes stairs to climb up but it takes elevator to go down. I have not purely depend on this to exit stop loss, however noticed the trades in this stratgey did not get out with loss higher than when RSIofUO reaching 70 level.
Note
======
Williams Alligator is not drawn from the script. It is manually added to chart for illustration purpose. Please add it when you are using this strategy , whch woould give an idea how the strategy is taking Short Trades.
This is tested on Hourly chart for SPY
Bar color changes to purple when the strategy is in SHORT trade
Warning
========
For the eductional purposes only
Pyramiding BTC 5 min no securitySince some say that the script with the security is repaint and the results too preety
i decided to run the same script without it. still the best is when security set to 1 min but without the difference not so much.
it just to show the concept of the strategy that based on linear regression cross hull as buy signal
and the the take profit target. so maybe now its also repaint?:)
based
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.
Heiken Ashi MTF Strategy- IndicatorHello, this is both a strategy and indicator that revolves around Heikin Ashi candles.
In this case we take 3 different time frames, in this example we use daily , weekly and monthly.
The conditions for entry are :
For long : we check that we have a green daily candle, at the same time we check that the weekly and monthly candles are also green.
For short : We check that all candles, daily, weekly and monthly and red.
For exit of long : as soon as 1 of the 3 candles, daily or weekly or monthly converts to red, we exit.
For exit of short : as soon as 1 of the 3 candles converts to green, we exit.
This strategy- indicator can be adapted to any type of market.
Escaping of Rate from Avarage By Mustafa OZVER StrategyI simulated the EoRfA indicator with the gold price
For details about the indicator, visit my profile on tradingview
For Simulation, with default settings, we order
if Eorfa > 1 and change(eorfa) < 0
sell
if Eorfa < -1 and change(eorfa) > 0
buy
And we got
- 2.49 % profit
- 74 % profittable order from all
But only this value can not guarantee good results for trading. BE CAREFUL
Pyramiding BTC 5 minThe pyramide based on this script with his concent
the strategy is the same as BTC 15 script (look at my open scripts) there it without pyramide
you can use the filter if you wish
one trick if you want it to be more accurate (not mean more profit is to reverse the long and short in the filter ' just it will lose less)
about the strategy of pyrimde you can read in detail from the script of Coinrule
i modify only to have 5 step in the pyramide scheme on 20% of equity (seems more logical)
so let me me know what you think:)
Profit MAX MTF HeatMapThis is a powerfull strategy which is made from combining 3 multi timeframes into one for profit max indicator
In this case we have daily, weekly and montly.
Our long conditions are the next ones :
if we have an uptrend on all 3 at the same time, we go long.
If we have a downtrend on all 3 of them at the same time we go short.
For exit, for long, as soon as one of the 3 converts into downtrend we exit the trade.
For exit, for short, as soon as one of the 3 converts into uptrend we exit the trade.
This tool can be used on all types of markets, and can also be changed the time frames.
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
trend Screener List1This is type of custom screener I searched and made to screen bulk stocks any one can modify it, other may get help out of it.
in my code i have made defined
1. uptrend= ema(close,55)> ema(close,144) and ema(close,144)> ema(close,388) and ema(close,388)> ema(close,576) and close>ema(close,388)
2. downtrend = ema(close,55)< ema(close,144) and ema(close,144)< ema(close,388) and ema(close,388)<ema(close,576) and close<ema(close,388)
if the indicator is printing DOWNTREND=TRUE or UPTREND=TRUE then the corresponding stock is in currently in that trend out of the stocks listed in the code
in one code only 40 (max) stocks can be called.
to add more stocks I copied same code and changed the stocks in the code, now you can screen 80 stocks at a time.
This code runs on each bar and checks if the stocks is in uptrend or down trend.
you can customize this screener according to your requirement.
//thanks @QuantNomad from where i solved my problem of screening my top stock for custom trend screener
//idea and motivation taken from
after adding another code you can screen 80 stocks at a time and so on , below following link is how it will look like
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.
no diceAllow this strategy to run on it's own and try not to get your emotions involved by manually closing positions. Let the strategy do all the work and you will see good returns every month.