TASC 2022.04 S&P500 Hybrid Seasonal System█ OVERVIEW
TASC's April 2022 edition of Traders' Tips includes the "Sell In May? Stock Market Seasonality" article authored by Markos Katsanos. This is the code implementing the "Hybrid Seasonal System" from the article.
█ CONCEPTS
In his article, Markos Katsanos takes an updated look at the "Sell in May" adage by reviewing recent historical data for seasonal equity market tendencies. The author explores the development of a trading strategy (a set of buy and sell rules) based on this research.
He starts from the enhanced buy & hold system featured in his July 2021 TASC article, and adds additional technical conditions. These include volatility conditions ( VIX and ATR ) plus the "Volume Flow Indicator" (VFI), which is a custom money flow indicator that Katsanos introduced in his June 2004 TASC article. He provides an example of a trading system that others can test for themselves and modify as they see fit. The author notes that the system could likely be improved further by adding money management conditions (such as a stop-loss), or by adding more technical conditions not considered in the scope of this article.
█ CALCULATIONS
The entry and exit rules that constitute the trading system are defined below. The critical values of VIX, ATR and VFI (specified below) used in the calculations were determined by optimization for a daily chart of the SPY ETF . By default, the strategy only allows long entries. However, the script offers the possibility to initiate short entries upon exiting long trades through the "Long Only" toggle in the script's inputs.
Long Entry Rules
• Seasonal: The seasonal trade is initiated on the first business day October at the open.
• Volatility: In case of high volatility, that is if the VIX is above 60% or the 15-day ATR was above 90% over the past 25 days, the seasonal trade is deferred until later in the month or year, when the volatility subsides.
Exit/Short Entry Rules
• Seasonal: The exit/short signal is triggered on the first business day of August at the open.
• Volatility: The exit/short signal is triggered if VIX is above 120 % (i.e. 2 times the corresponding threshold parameter).
• Money flow (VFI): The exit/short signal is triggered if the VFI crosses under a critical value (-20) while its 10-day moving average is pointing down.
Join TradingView!
Volatility
Long Term Heat/Volatility - Accumulation/Distribution v1This is a strategy specifically made for 1D BTC/USD with the aim of capturing cycle tops and bottoms. It's mainly based on two indicators: 21d average of ATR (volatility) and (BTC.price - 180d sma)/BTC.price (heat). The strategy only signals buys or sells after occurrences of high volatility, followed by extremely high or low heat values. It's optimized for utilizing accumulation and distribution at lower and higher prices respectively with respect to last 14 days. 2nd version will include dynamic dollar cost averaging during the accumulation and distribution periods.
Volatility Breakout StrategyThis is a strategy used by Larry R. Williams called Volatility Breakout.
By identifying a strong uptrend that exceeds 'a certain level' on a daily basis as a breakout signal, enter long position, take advantage of long at the the next day's open.
'a certain level (Entry Price)' is calculated by { close + 'k' * high -low }, and applied logarithmic calculation.
Stop loss level is calculated by half of the previous day's Low and Entry Price.
Strategy exit always at UTC+0.
And expressed day session with the background color.
Thanks and hope this helps you.
(kor)
이건 Larry R. Williams가 사용하는 변동성 돌파 전략입니다.
특정 수준을 넘는 강한 상승세를 돌파 신호로 파악하여 매수하고, 장시간이 종료될때에 빠르게 수익을 실현하는 전략입니다.
"특정 레벨(진입가)"은 close + 'k' * high -low 로 계산되며 로그 계산을 적용했습니다.
손절 레벨은 전일 저가 및 진입 가격의 절반으로 계산됩니다.
전략은 항상 UTC+0에서 종료합니다. ( 한국 기준 오전 9시 )
그리고 배경색으로 일일세션을 표현했습니다.
트뷰에 오픈소스의 래리윌리엄스 변동성전략이 없는것 같아 간단하게나마 만들어 보았습니다. 도움이 되었으면 좋겟워요..
Chandelier Exit - StrategyI created a strategy version for the Chandelier Exit indicator, originally owned by @everget . With the strategy I prepared, you can try both short-long and stop loss - trailing stop and take profit rates. I have also added a date filter feature so that you can test the strategy in the date range you want.
Orjinali @everget 'e ait olan Chandelier Exit indicator için strateji versiyonu oluşturdum. Hazırladığım strateji ile hem short-long deneyebilir hem de zarar durdur - takip eden stop ve kar al oranları denemeleri yapabilirsiniz. İstediğiniz tarih aralığında strateji testi yapabilmeniz için tarih filtre özelliği de ekledim.
adx efi 50 ema channel, trend pullbackHi so this strategy is based off 50 ema channel and the 15 ma crossing it to generate signals. But with my adjusted strategy it's a 10 rma crossing 50 ema channels and a 5 and 9 wma to help see pullbacks. 50 period bollinger bands to gage volatility a0nd help during range markets. The strategy signals are generated when longer period efi is above 0 and shorter period efi is below zero and price has pulled back near 50 ema to buy long. And the reverse for shorts, I made this to help me trade more mechanically and to trade 1 minute time frame, that's where the strategy seems to Excell the most, I developed it on eur usd but a brief check seems like it still is profitable on gbp usd aud usd usd jpy I only trade the forex market so not sure about stocks and crypto. If you get signals I would place buy stops and sell stops above high and low of respective signal candle and let price take you into trade. Also adx 20 has to be greater than 20 to take trades. Let me know if this is helpful. I've only been coding for a month so it might look sloppy the way it's coded also there are a few other buy and sell conditions left in the source code if you want to switch between different buy and sell triggers, they all produce good results on 1 min timeframe
Hourly Bias on BTC in Bullish USA Session “Green Eagle”Name: Hourly Bias on BTC in Bullish USA Session
Category: Hourly Bias
Operating mode: Spot, only long
Trades duration: Intraday, 11 bars
Timeframe: 1H
Suggested usage: When the market is compressed, USA session has a bullish bias.
Entry: enter Long at 15:00 on specific days of the week. There is a volatility filter based on ATR which identifies compression.
Exit: exit at a pre-defined time at 01:00
Usage:
⁃ It can be useful to use alerts or webhooks to automate this strategy.
⁃ This is a core system that can be improved in different ways (e.g. Stop-loss, take-profit, position sizing) or studying more the behaviour in the specific days of the week or short when is red.
Configuration:
- N/A
Backtesting
⁃ Exchange: BINANCE
⁃ Pair: BTCUSDT
⁃ Timeframe: 1H
⁃ Fee 0.075%
⁃ Slippage 2
- Start : 2019-01-06
We decided to release this free BTC strategy.
How you or we can improve? Source code is open so share your ideas!
TEMA/HMA/VWMACD - Short Strategy 4HAs we can discover by studying the history of BTCUSD, the fall is always swift. Confirmation of this - today's collapse. In this strategy, an attempt is made to catch such drop by using quick entry and quick exit.
Let's describe what this strategy consists of:
• TEMA (you can find this strategy separately on this page or on platform)
• VWMACD
• HMA
• Take-profit and Stop-losses
Logic:
Firstly we VWMACD (the difference between VWMACD and simple MACD is only in the way of calculating moving average) and plot it as a histogram.
Then HMA is adding as a trend filter. For easy understanding let's plot it now on chart separately.
Next step is to create and add TEMA. After it is needed to subtract slow TEMA from fast TEMA and plot this value around 0 on histogram. This is the main decision for the implementation of the short trade.
ENTRY the trade:
When VMACD is below 0 and price (src = close) is below the HMA and TEMA below 0.
CLOSE the trade:
When VWMACD is upper than 0 or price is upper than HMA or TEMA is upper than 0
You can find more strategies on tradingammo.pro.
Linear Channel - Scalp Strategy 15MSimple way how to use Linear Regression for trading.
What we use:
• Linear Regression
• HMA as a trend filter
Logic:
Firstly we make simple linear regression moving. It is the white line which appears on the chart.
Then we make second line (named: band2) on the chart by multiplying linreg and value difference.
The third step is to ad HMA as a trend filter.
The trade open when price is below band2, but still upper than Hullma. The trade close when price again upper than linreg.
Donchian Channel Strategy IdeaThis strategy idea is a variation of the "Donchian Channel" trading strategy. It is built with a highest-high band, a lowest-low band, and a baseline which is average the highest-high and the lowest-low bands. This strategy is very useful in trending instruments on 1W and 1D timeframes. This is the implementation used in the QuantCT app.
You can set the operation mode to be Long/Short or long-only.
You also can set a fixed stop-loss or ignore it so that the strategy acts solely based on entry and exit signals.
Trade Idea
When the close price breaks up the previous highest-high, it is a long signal, the market is considered rising (bullish), and the plotted indicator becomes green. Long positions are held until the close price crosses under the baseline.
When the close price breaks down the previous lowest-low, it is a short signal, the market is considered falling (bearish), and the plotted indicator becomes red. Short positions are held until the close price crosses above the baseline.
Otherwise, if we have no position in the market, the market is considered ranging, and the plotted indicator becomes orange.
Entry/Exit rules
Enter LONG if the close price breaks up the previous highest-high (i.e. when the plotted indicator becomes green).
Exit LONG if the close price crosses under the baseline (i.e. when the plotted indicator becomes orange).
Enter SHORT if the close price breaks down the previous lowest-low (i.e. when the plotted indicator becomes red).
Exit SHORT if the close price crosses above the baseline (i.e. when the plotted indicator becomes orange).
CAUTION
It's just a bare trading idea - a profitable one. However, you can enhance this idea and turn it into a full trading strategy with enhanced risk/money management and optimizing it, and you ABSOLUTELY should do this!
DON'T insist on using Long/Short mode on all instruments! This strategy performs much better in Long-Only mode on many (NOT All) trending instruments (Like BTC, ETH, etc.).
MA Bollinger Bands + RSI This script uses the standard deviation of a given moving average along with an RSI direction.
When: rsi crossover neutral line + price crossover lower deviation boundary => long
When: rsi crossunder neutral line + price crossunder upper deviation boundary => short
Up & Down Trend following trading strategy for BTC/USDT 3hThis strategy is based on multi time frame technical indicators such as;
1. RSI (10,50,100)
2. MFI (10,50,100)
3. RVI (10,50,100)
4. BOP (10,50,100)
5. Super Trend
6. SAR indicator
7. Higher highs and lower lows
8. SMA (9,500)
9. EMA (9,200)
After evaluating different parameters provided by those indicators, script is in a possition to determine optimul positions to enter in to market as well as exit from the market. In some cases stratergy will exit fully or partially depends on the situation. Other than that, this strategy is in a possition to calculate and specify the quantity you need to buy or sell depending on market situation. You can specify amount available for investment and how many times you are going to average (if downtrend). Parameters are optimised to BTC/USDT, 3h standerd candlestic chart.
goodluck
Divergence for Many Indicators v4 STHello Traders.
This is the Strategy version of Divergence for Many Indicators v4, an easy and comfortable indicator.
- - - -
*It's been modified a little bit from the original.
*I got permission from the original author.
*I'm not good at English, I'm sorry.
- - - -
< 4 things to check >
1. Since repainting is not performed, the first imprinted signal can be accurately seen.
2. It does not respond to continuous diversions.
3. If the opposite diversity is not imprinted, caution is required as it is designed not to indicate liquidation. Be careful when reading the figures shown in the strategy tester.
4. Added stop loss and take propirane.
< What changed? >
1. pivot period 5 - > 9
2. Money Flow index and Chaikin Money Flow are released.
- - - -
KOR SUB
< 4가지 확인 사항 >
1. 리페인팅이 없으므로 첫 번째로 각인된 신호를 정확히 볼 수 있습니다.
2. 연속된 다이버젼스에 대해서는 반응하지 않습니다.
3. 반대의 다이버젼스가 각인되지 않으면 청산 표시를 하지 않도록 설계되어 있으므로 주의를 요합니다.
4. 스탑 로스와 테이크 프로핏 항목을 추가하였습니다.
< 무엇이 변경되었나? >
1. 피봇 페리어드 값이 조금 수정되었습니다.
2. MFI & CMF 가 체크 해제된 상태입니다.
THANK YOU ^^
ETF 3-Day Reversion StrategyIntroduction: This strategy is a modification of the “3-day Mean Reversion Strategy” from the book "High Probability ETF Trading" by Larry Connors and Cesar Alvarez. In the book, the authors discuss a high-probability ETF mean reversion strategy for a 1-day time-frame with these simple rules:
The price must be above the 200 day SMA and below the 5 day SMA.
The low of today must be lower than the low of yesterday (must be true for 3 consecutive days)
The high of today must be lower than the high of yesterday (must be true for 3 consecutive days)
If the 3 rules above are true, then buy on the close of the current day.
Exit when the closing price crosses above the 5 day SMA.
In practice and in backtesting, I’ve found that the strategy consistently works better when using an EMA for the trend-line instead of an SMA. So, this script uses an EMA for the trend-line. I’ve also made the length of the exit EMA adjustable.
How it works:
The Strategy will buy when the buy conditions above are true. The strategy will sell when the closing price crosses over the Exit Moving Average
Plots:
Green line = Exit Moving Average (Default 5 Day EMA)
Blue line = 5 Day EMA (Used as Entry Criteria)
Disclaimer: Open-source scripts I publish in the community are largely meant to spark ideas that can be used as building blocks for part of a more robust trade management strategy. If you would like to implement a version of any script, I would recommend making significant additions/modifications to the strategy & risk management functions. If you don’t know how to program in Pine, then hire a Pine-coder. We can help!
TFO + ATR Strategy with Trailing Stop LossThis strategy is an experiment to learn what happens when The Trend Flex Oscillator (by Dr. John Ehlers) is used in conjunction with a volatility indicator like ATR. It was designed with cryptocurrency trading in mind.
The way I coded this experiment makes it unsuitable for bear market conditions.
When applied to a bull market, this trend-following strategy will open long positions when oversold price action appear to be reversing. It will typically close a position within a few days unless it gets caught in a bear market, in which case it holds on for dear life. I have tried to make back-testing very simple, but you should never trust it. It's merely and interesting tool for adjusting the many parameters that I've made editable in the configuration window. Those values include the ATR and TFO parameters, as well as setting a trailing stop loss. When closing a position, the strategy can optionally be told to ignore the trend analysis and only obey the trailing stop loss value. I've made an attempt to allow the user to define the minimum profit necessary to allow the strategy to close all all positions. In my observations, the 2H candlestick charts seem to produce the best results, although the parameters of the strategy could theoretically be adjusted to suit other time periods.
In summary...
This strategy has a bias for HODL (Holds on to Losses) meaning that it provides NO STOP LOSS protection!
Also note that the default behavior is designed for up to 15 open long orders, and executes one order to close them all at once.
Opening a long position is predicated on The Trend Flex Oscillator (TFO) rising after being oversold, and ATR above a certain volatility threshold.
Closing a long is handled either by TFO showing overbought while above a certain ATR level, or the Trailing Stop Loss. Pick one or both.
If the strategy is allowed to sell before a Trailing Stop Loss is triggered, you can set a "must exceed %". Do not mistake this for a stop loss.
Short positions are not supported in this version. Back-testing should NEVER be considered an accurate representation of actual trading results.
// portions © allanster (date window code)
// portions © Dr. John Ehlers (Trend Flex Oscillator)
This code is provided for educational purposes only. The results of this strategy should not be considered investment advice.
The user of this script acknowledges that it can result in serious financial loss when used as a trading tool
Configurable Multi MA Crossover Voting SystemThis strategy goes long when all fast moving averages that you have defined are above their counterpart slow moving averages.
Long position is closed when profit or loss target is hit and at least one of the fast moving averages is below its counterpart slow moving average.
The format of the config is simple. The format is : FASTxSLOW,FASTxSLOW,...
Example : If you want 2 moving averages fast=9,slow=14 and fast=20,slow=50 you define it like this : 9x14,20x50
Another example : 5x10,10x15,15x20 => means 3 moving average setups : first wih fast=5/slow=10, second with fast=10/slow=15, last with fast=15/slow=20
You can chose the type of moving average : SMA, WMA, VWMA (i got issues with EMA/RMA so i removed them)
You can chose the source of the moving average : high, close, hl2 etc.
You can chose the period on which ATR is calculated and ATR profit/loss factors.
Profit is calculated like : buy_price + atr_factor*atr
Loss is calculated like : buy_price - atr_factor*atr
Performance in backtest is variable depending on the timeframe, the options and the market.
Performance in backtest suggests it works better for higher timeframes like 1d, 4h etc.
Disclaimer
Please remember that past performance may not be indicative of future results.
Due to various factors, including changing market conditions, the strategy may no longer perform as well as in historical backtesting.
This post and the script don’t provide any financial advice.
Portfolio Performance - Effects of RebalancingFunction:
- Can be used to evaluate the performance of a portfolio containing 2 assets over a set time interval
- Shows the % return of the portfolio over the time interval defined by the user
- Includes a threshold rebalancing algorithm to show the effects that rebalancing has on the portfolio over the long term
- Created to evaluate of the performance of portfolios containing different weightings of stocks and bonds over time assuming that the user would rebalance the portfolio when asset weights crossed a threshold
Instructions:
- To be used with dividends adjustments turned on
- Add this script to a symbol. e.g. AMEX:SPY
- Click the chart to define the entry time and the exit time. i.e. the time interval
- Define the initial investment of the portfolio. Default setting is $100,000
- Define the second asset to be included in the portfolio. e.g. BATS:AGG
- The strategy comes pre-populated with a portfolio that has a weight of 80% asset 1 and 20% asset 2. i.e. 80% AMEX:SPY and 20% BATS:AGG if the symbols mentioned above were chosen
- The 7 lines show the weighted % return of each portfolio over the time period defined by the user
- Each line (except the blue) is the return based on a different rebalancing threshold. The default settings are 1%, 2.5%, 5%, 10%, 15%, 20%, 30%
- The blue line is the % return of a portfolio that was made up of 100% asset 1 over the time interval. i.e. 100% AMEX:SPY
- Asset weights and rebalancing thresholds are adjustable via the settings
- Each plot can be turned on and turned off via a tick box in the settings
Super Auto Breakout Day Trade Volatile stocksThis strategy is looking at MA and distance from MA to determine entry and exit for highly volatile day trade stocks.
This trading strategy is not good for big-cap stocks as the movement there is not much in terms of %.
The target for open trade is to close at a 10% gain or at 2.8% loss which is a good risk to reward ratio.
Intraday Grid trading exampleHello everyone,
This was a grid trading example for intraday trading.
Please be advised that every commodity have diferent kind of reaction and rate of change between periods therefore the percentages need to be adjusted acording to the commodities change %.
In order to specify the adjustment rate we add the Zig Zag in the script.
For Example ;
Last 3 days zigzag high points are %25 , %13 and %8 , the average %is about %9 therefore you have to put the adjustment ratios something like;
Z%1 = %3
Z%2 = %6
Z%3 = %9
Feel free to use the script with caution( it was not a investment advice), this was only a example of grid trading strategy on our trading platform.
Regards.
Portfolio Performance - 2 AssetsFunction:
- Can be used to evaluate the performance of portfolios containing 2 assets over a set time interval
- Created to evaluate of the performance of portfolios containing different weightings of stocks and bonds over time
- Shows the % return of each portfolio over the time interval defined by the user
- Capable of showing the risk adjusted % return of each portfolio over the time interval defined by the user (setting turned off by default)
Instructions:
- To be used with dividends adjustments turned on
- Add this script to a symbol. e.g. NASDAQ:BND
- Click the chart to define the entry time and the exit time. i.e. the time interval
- Define the second asset to be included in the portfolio. e.g. AMEX:VOO
- The strategy comes pre-populated with 6 portfolios with the most common stock/bond weightings (100% stocks/0% bonds, 80% stocks/20% bonds, 60% stocks/40% bonds, et cetera)
- The 6 lines show the weighted % return of each portfolio over the time period defined by the user
- All asset weights are adjustable via the settings
- Each plot can be turned on and turned off via a tick box in the settings
- There are 6 plots that show the risk adjusted returns of each portfolio (setting turned off by default)
Up & Down Trend Trading Strategy - BNB/USDT 15minThis strategy will focus on up trend trading and down trend trading based on several indicators such as;
for up trend
1. SAR indicator
2. Super trend indicator
3. Simple moving average for the period of 100
down trend
1. RSI Indicator
2. Money flow index
3. Relative volatility index
4. Balance of powder
ms hypersupertrendThis is a well-known strategy by using 3 different Supertrends and a trend-defining EMA,
feel free to play around with the settings, a backtest on 8h ETHUSDT pair brought some good results using
the 233EMA and investing 75% of a 10k start capital
the idea is to have at least 2 super trends going green above the trend-EMA to go long and exit by turning
2 super trends red (idea: 1 super trend in red could initialize a take profit)
shorts work vice versa
The EMA shows in green for uptrends and in red for downtrends, if it is blue no Signal will be taken because
the 3 super trends are not all above or below the trendline(EMA)
//-------------------------------------------------------------------------------------------------------------------------------------------------
Update 1:
- Fixed a minor input error
- Added ATR stoploss, and commented out the percentage stop loss
- Added time window to backtest
- Added exit on risk/reward is met
- This version is only buy...wait for next update adding shorts and more
As always, thanks for your ideas, likes, and support. Feel free to mess around with the settings and give me your feedback.
Super Breakout day trading This is an intraday indicator which uses Bollinger band and volume flow and MA to alert buy and sell signal.
A user can use this indicator to help make entry and exits. This indicator wont show entry and exist of larger time frames like Day week month.
This indicator uses Bollinger bands but try to minimize it shortcoming where it will buy and keep holding and eventually sell at a loss.
By adding addition parameters around volume it check if the price has reached its peak