Adaptive Price Channel StrategyThis strategy is an adaptive price channel strategy based on the Average True Range (ATR) indicator and the Average Directional Index (ADX). It aims to identify sideways markets and trends in the price movements and make trades accordingly.
The strategy uses a length parameter for the ATR and ADX indicators, which determines the length of the calculation for these indicators. The strategy also uses an ATR multiplier, which is multiplied by the ATR to determine the upper and lower bounds of the price channel.
The first step of the strategy is to calculate the highest high (HH) and lowest low (LL) over the specified length. The ATR is also calculated over the same length. Then the strategy calculates the positive directional indicator (+DI) and negative directional indicator (-DI) based on the up and down moves in the price, and uses these to calculate the ADX.
If the ADX is less than 25, the market is considered to be in a sideways phase. In this case, if the price closes above the upper bound of the price channel (HH - ATR multiplier * ATR), the strategy enters a long position, and if the price closes below the lower bound of the price channel (LL + ATR multiplier * ATR), the strategy enters a short position.
If the ADX is greater than or equal to 25 and the +DI is greater than the -DI, the market is considered to be in a bullish phase. In this case, if the price closes above the upper bound of the price channel, the strategy enters a long position. If the ADX is greater than or equal to 25 and the +DI is less than the -DI, the market is considered to be in a bearish phase. In this case, if the price closes below the lower bound of the price channel, the strategy enters a short position.
The strategy exits a position after a certain number of bars have passed since the entry, as specified by the exit_length input.
In summary, this strategy attempts to trade in accordance with the prevailing market conditions by identifying sideways markets and trends and making trades based on price movements within a dynamically-adjusted price channel.
This strategy takes a read on the market and either takes a channel strategy or trades volatility based on current trend. Works well on 2, 3 ,4, 12 hour for BTC. It’s my first attempt and creating a strategy. I am very interested in constructive criticism. I will look into better risk management, maybe a trailing stop loss. Other suggestions welcome. This is my first attempt at a strategy.
Here are the settings I used.
Inputs
Length 20
Exit 10
ATR 3.2
Dates I picked when I got into Crypto
Properties
Capital 1000
Order size 2 Contracts
Pyramiding 1
Commission .05
Cycles
VIX Futures Spread StrategyThis script was an exercise in learning Pinescript and exploring the futures curve of the VIX in relation to SPY. Was deleted by TV, trying to republish it now with updated parameters for slippage and commission and a more detailed description.
"VIX Futures Spread Strategy" is a trading strategy that capitalizes on the spread between the 3-month VIX futures (VIX3M) and the spot VIX index. This strategy is based on the idea that the VIX futures spread can serve as a contrarian indicator of market sentiment, with extreme negative spreads potentially signaling oversold conditions and opportunities for long positions.
Ordinarily the VIX curve is in contango as futures contracts are priced at a premium to the current spot price and are used to hedge future uncertainty in the market. When the spot price of VIX spikes the curve can invert and enter backwardation; this strategy detects this condition and uses it as a trigger to open a long position in SPY. The spread going negative tends to correlate with excessive fear and uncertainty in the short term while expecting lower volatility in the long term, in this case 3 months out.
The strategy is designed to enter a long position when the VIX futures spread is negative and to exit the position when the spread rises above 3 -- when the curve is in contango again. The strategy employs a pyramiding approach, allowing up to 10 additional orders to be placed while the entry condition is met, with each order consisting of 10 contracts. This approach aims to maximize potential profits during periods of favorable market conditions.
In this strategy, the VIX futures spread is calculated as the difference between the 3-month VIX futures (VIX3M) and the spot VIX index. The spread is plotted as a histogram on the chart, with the zero line representing no spread, and horizontal lines at 0 and 3 indicating the entry and exit thresholds, respectively.
The strategy's backtesting settings use an initial capital of HKEX:10 ,000, a commission of 0.5% per trade, and a maximum of 10 pyramiding orders, and a slippage of 2 ticks.
Please note that this strategy is intended for educational purposes and should not be considered as financial advice. Before using this strategy in live trading, make sure to thoroughly test and optimize its parameters to suit your risk tolerance and specific trading conditions.
Heikin Ashi SupertrendAbout this Strategy
This supertrend strategy uses the Heikin Ashi candles to generate the supertrend but enters and exits trades using normal candle close prices. If you use the standard built in Supertrend indicator on Heikin Ashi candles, it will produce very unrealistic backtesting results because it uses the Heikin Ashi prices instead of the real prices. However, by signaling the supertrend reversals using Heikin Ashi while using standard candle close prices for the entries and exits, it corrects the backtesting errors and gives you a more realistic equity curve. You should set the chart to use standard candles and then hide them (the strategy creates the candles).
This strategy includes:
Plotting of Heikin Ashi candles
Heikin Ashi Supertrend
Long and Short Entry Signals
Move stop loss after trade is X% in profit
Profit Target
Stop Loss
Built in Alertatron automation
Alertatron Trade Automation Integration
For Alertatron integration, be sure to configure the strategy settings and "Enable Webhook Messages" before creating an alert with {{strategy.order.alert_message}} in the body of your alert message. Be sure to enable webhooks and point it to your Incoming Alertatron webhook URL.
Notes
While this strategy does pretty well during trending markets, It's worth noting that the Buy and Hold ROI is much better during peak times of the bull market
Not financial advice. Do not risk more than you can afford to lose.
[fpemehd] SSL Baseline StrategyHello Guys! Nice to meet you all!
This is my third script!
This Logic is trend following logic, This detects long & short trends based on SSL Hybrid Baseline.
This fits to the longer time frame like 4hr and 1d.
### Long Condition
1. close > SSL Hybrid baseline upper k
- Baseline is the ma of close price. (You can choose ma type and length)
- Upper k is the upper Keltner Channel.
### Short Condition
1. close < SSL Hybrid baseline lower k
- Baseline is the ma of close price. (You can choose ma type and length)
- Lower k is the lower Keltner Channel.
### Etc
1. Added Stoploss based on highest high or lowest low with lookback.
2. Strategy Template is based on @kevinmck100 template. Thank you!
Trend Identifier StrategyTrend Identifier Strategy for 1D BTC.USD
The indicator smoothens a closely following moving average into a polynomial like plot and assumes 4 staged cycles based on the first and the second derivatives. This is an optimized strategy for long term buying and selling with a Sortino Ratio above 3. It is designed to be a more profitable alternative to HODLing. It can be combined with 'Accumulation/Distribution Bands & Signals' and 'Exponential Top and Bottom Finder'.
ET TurnaroundMondayET TurnaroundMonday - two red bars, on Monday go long and exit when close > yeasterday High
VXD Cloud Edition for Python-Binance-bots.VXD Cloud Edition for Python-Binance-bots.
to overcome sideways market conditions this cloud configured for low timeframe.
every TA is same as VXD Cloud Edition but custom alert message for bots.
Risk:Reward Calculation
Risk of Ruin Setting can now selected between Fixed $ or %
if Buy your Stoploss will be Swing low
if Sell your Stoploss will be Swing high and can be setting at Pivot Setting
then Auto Position Sizing and TP line will be calculated form there and will show in Orange color line (Draw Position Box is available)
Tailing SL when price greater than RR=1
Alert Setting
{{strategy.order.alert_message}}
Python-Bot
github.com
There are 2 mode : one-way mode and hedge mode is different script in my Github profile.
read README.MD and there's video tutorial in thai language.
Pls study app.py and it's script before deploy for your own safty and your own risk, I'm NOT responsible for your loss.
Stochastic Rsi+Ema - Auto Buy Scalper Scirpt v.0.3Simple concept for a scalping script, written for 5 minute candles, optimized for BTC.
1st script I've created from scratch, somewhat from scratch. Also part of the goal of this one is to hold coin as often as possible, whenever it's sideways or not dropping significantly.
Designed to buy on the stochastic bottoms (K>D and rising, and <17)
Then and sell after 1 of 3 conditions;
a. After the price goes back up at least 1 % and then 1-2 period ema reversal
b. After the rsi reversal (is dropping) and K<D Flip
c. Stop loss at -1.5%
Strategy Oil Z ScoreObjective is to find forward looking indicators to find good entries into major index's.
In similar vein to my Combo Z Score script I have implemented one looking at oil and oil volatility. Interestingly the script out performs WITHOUT applying the EMA in longer timeframes but under performs in shorter timeframes, for example 2007 vs 2019. Likely due to the bullish nature of the past decade (by and large). You have some options on the underlying included Oil vs OVX (Best), MOVE vs OVX and VIX vs OVX. Oil vs OVX out performs Combo Z Script. Favours Spy over QQQ or derivations (SPXL etc).
Buy Monday, Exit WednesdayStrategy to go long at end of Monday before market closes and exit before Wednesday close, or at stop loss or take profit percentages
This runs strategy on entering by weekday name and also by session time.
Implemented are also Take Profit and Stop Loss to exit position using custom inputs.
Added stop loss and take profit plot lines
Daily_Mid Term_Consulting BOLTDaily Mid Term Consulting BOLT es una estrategia a mediano y largo plazo creada para detectar los cambios tendenciales en zonas de tiempo diarias. se basa en el análisis de los cambios porcentuales que sufre el precio contra las distintas medias móviles simples definidas en la estrategia. el uso de osciladores como el MACD , RSI y EFI apoyan la decisión de entrada a la estrategia.
actualmente esta en construcción la colocación de stop losses para aumentar la eectividad de la misma.
Buy/Sell on the levelsThis script is generally
My describe is:
There are a lot of levels we would like to buy some crypto.
When the price has crossed the level-line - we buy, but only if we have the permission in array(2)
When we have bought the crypto - we lose the permission for buy for now(till we will sell it on the next higher level)
When we sell some crypto(on the buying level + 1) we have the permission again.
There also are 2 protect indicators. We can buy if these indicators both green only(super trend and PIVOT )
Jun 12
Release Notes: Hello there,
Uncomment this section before use for real trade:
if array.get(price_to_sellBue, i) >= open and array.get(price_to_sellBue, i) <= close// and
//direction < 0 and permission_for_buy != 0
Here is my script.
In general - this is incredible simple script to use and understand.
First of all You can see this script working with only long orders, it means we going to get money if crypto grows only. Short orders we need to close the position on time.
In this script we buy crypto and sell with step 1% upper.
You can simply change the step by changing the price arrays.
Please note, if You want to see where the levels of this script is You Have to copy the next my indicator called LEVEL 1%
In general - if the price has across the price-level we buy some crypto and loose permission for buying for this level till we sell some crypto. There is ''count_of_orders" array field with value 2. When we bought some crypto the value turns to 0. 0 means not allowed to by on this level!!! The script buy if the bar is green only(last tick).
The script check every level(those we can see in "price_to_sellBue" array).
If the price across one of them - full script runs. After buying(if it possible) we check is there any crypto for sell on the level.
We check all levels below actual level( of actual level - ''i'' than we check all levels from 0 to i-1).
If there is any order that has value 0 in count of orders and index <= i-1 - we count it to var SELL amount and in the end of loop sell all of it.
Pay attention - it sells only if price across the level with red bar AND HAS ORDERS TO SELL WHICH WAS BOUGHT BELOW!!!
In Strategy tester it shows not-profitables orders sometimes, because if You have old Long position - it sells it first. First in - first out.
If the price goes down for a long time and You sell after 5 buys You sell the first of it with the highest value.
There is 2 protection from horrible buying in this strategy. The first one - Supertrend. If the supertrend is red - there is no permission for buy.
The second one - something between PIVOT and supertrend but with switcher.
If the price across last minimum - switcher is red - no permission for buy and the actual price becomes last minimum . The last maximum calculated for last 100 bars.
When the price across last maximum - switcher is green, we can buy. The last minimum calculation for last 100 bars, last maximum is actual price.
This two protections will save You from buying if price get crash down.
Enjoy my script.
Should You need the code or explanation, You have any ideas how to improve this crypt, contact me.
Vladyslav.
Jun 12
Release Notes: Here has been uncommented the protection for buy in case of price get down.
5 hours ago
Release Notes: Changed rages up to actual price to make it work
BUY/SELL on the levels onlyMy discribe is:
There ara a lot of levels we would like to buy some crypto.
When the price has acrossed the level-line - we buy, but only if we have the permission in array(2)
When we have bought the crypto - we lose the permission for buy for now(till we will sell it on the next hiegher level)
When we sell some crypto(on the buying level + 1) we have the permission again.
There also are 2 protect indicators. We can buy if these indicators both green only(supertrend and PIVOT)
VXD SupercycleVXD is a brand new indicator and still developing. to minimize stop losses and overcome sideways market conditions, Higher Timeframe are recommended
Trend lines
-using Rolling VWAP as trend line to determined if Volume related to a certain price.
-you can switch RVWAP to EMA in the setting
ATR
-trailing 12*ATR and 2.4 Mutiplier
Pivot point and Rejected Block
Pivot show last High and low of a price in past bars
Rejected Block show when that High or Low price are important level to determined if it's Hidden Divergence or Divergence
Symbols on chart show Premium and Discount Prices
X-Cross - show potential reversal trend with weak volume .
O-circle - show potential reversal trend with strong volume .
Setting
Momentum: RSI = 25 , RSI MA = 14
Trend: Rolling VWAP and ATR and Subhag
Trailing STOP: ATR 12 x 2.4
Highlight Bars color when volume is above SMA 6
SMA200 act as TP Line
Risk:Reward Calculation
if Buy your Stoploss will be previous Pivot low
if Sell your Stoploss will be previous Pivot high and will be calculated form there, then show TP in Orange color line
VXD เป็นระบบเทรดที่ผมทดลองเอาหลาย ๆ ไอเดีย ทั้งจาก Youtube facebook และกลุ่มคนต่าง ๆ มารวบรวมไว้ แล้วตกผลึกขึ้นมาเป็นระบบนี้ ใน Timeframe ใหญ่ ๆ สามารถลากได้ทั้ง Cycle กันเลย
Trend lines
-ใช้ Rolling VWAP ของแอพ Tradingview (สามารถตั้งแค่าเป็น EMA ได้)
ATR
-ใช้ค่า ATR 12 Mutiplier 2.4
Pivot point and Rejected Block
Pivot โชว์เส้น High low และมีผลกับออเดอร์ หากแท่งเทียนปิดทะลุเส้นนี้
Rejected Block วาดแนวรับ-ต้าน อัตโนมัติ ใช้ประกอบ RSI ว่ามี Divergence หรือไม่
สัญลักษณ์ต่าง ๆ
X-Cross - แท่งกลืนกิน วอลุ่มน้อย
O-circle - แท่งกลืนกิน มีวอลุ่ม
Setting
Momentum: RSI = 25 , RSI MA = 14
Trend: Rolling VWAP and ATR and Subhag
Trailing STOP: ATR 12 x 2.4
Highlight Bars color when volume is above SMA 6
SMA200 act as TP Line
Risk:Reward Calculation
หาก Buy จุด SL จะอยู่ที่ Pivot low
หาก Sell จุด SL จะอยู่ที่ Pivot high และระบบจะคำนวณจากตรงนั้น จากนั้นแสดงเป็นเส้น TP สีส้ม
This Strategy Combined the following indicators and conditioning by me
ATR , RSI , EMA , SMA
Rolling VWAP - /script/ZU2UUu9T-Rolling-VWAP/
Regression Lines - Subhag form Subhag Ghosh /script/LHHBVpQu-Subhag-Ghosh-Algo-Version-for-banknifty/
Rejection Block , Pivots , High Volume Bars and PPDD form Super OrderBlock / FVG / BoS Tools by makuchaku & eFe /script/aZACDmTC-Super-OrderBlock-FVG-BoS-Tools-by-makuchaku-eFe/
ขอให้รวยครับ.
Grid HWBuys 10 layers from a fixed price, there is 1% between each layer.
Sells after 1% profit on each layer.
Saturday Strategy BTC By KziI take the hypothèse that saturday is the most stable day of the week because, no SP500, no fed announcement and no weekly closure.
My Strategy is very simple:
Take the friday color (Red = Short // Green = Long)
Then open at the friday close price
Take a small pourcentage (1 or 2 %) then close.
What ever close on midnight.
Work Well on the 1h chart.
The Yellow is the saturday.
Maybe we can add the monthly close information to avoid opening trade on saturday if we are at this event.
Enjoy and give me your comment.
Kzi
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!
Buy Monday, Exit Tuesday with Stop Loss and Take ProfitStrategy to go long at end of Monday before market closes and exit before Tuesday close, or at stop loss or take profit percentages
This runs strategy on entering by weekday name and also by session time.
Implemented are also Take Profit and Stop Loss to exit position using custom inputs.
Added stoploss and take profit plot lines
Compound Indicator Strategy - BTC/USDT 3hThis is an Strategy finds and utilise end points of short term market trends and this is a combination of many indicators such as
1. Volume change oscillator
2. Money flow index ( MFI )
3. Momentum Oscillator (MOM)
4. Stochastic Indicator
6. Relative Strength Indicator ( RSI )
7. Relative volatility index (RVI)
8. Balance of power (BOP)
9. Small moving average ( SMA )
10. Exponential moving average ( EMA )
11. Parabolic SAR
12. Super trend indicator
this script forms a compound indicator after analysing movements of those indicators through different time frames and measure its co-relation and variance with the price action. buy doing that, indicator in a position to identify short term market reversals and presented.
after generating a common indicator, it evaluates standard deviation and standard variance with currant market price action and generates a buy and sell signals. you can determine your own trading method based on available options.
Morun Astro Trend MAs cross StrategyAstrology machine learning cycles indicator signals with technical MAs indicators strategy, based on signals index of Github project github.com
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!
Stochastic Pop and Drop by Jake Bernstein v1 [Bitduke]I found a simple strategy by Jake Bernstein, modified it a little and created a strategy with Risk Management System (SL+TP); After that I test it on the different cryptocurrency pairs.
About the Indicator
Basically it's the strategy of 2 indicators: Stochastic Oscillator to define the bias and Average Directional Index to confirm it.
One again, It uses Stochastic Oscillator to define the trading bias. In particular, the trading bias was deemed bullish when the weekly 14-period Stochastic Oscillator was above some default value (in him paper - 50) and rising and vice versa.
Once the trading bias is established, Steckler used the Average Directional Index (ADX) to define a slowdown in the trend. ADX measures the strength of the trend and a move below 20 signals a weak trend.
Modifications
I didn't implement Average Directional Index (ADX) and test just different sources for data, oscillator periods and different levels in relation to the crypto market.
So, it shows good results with two tight thresholds at 55 and 45 level.
The bar chart below the defining the bullish and bearish periods (green and red) and gives a signal to enter the trade (purple bars).
Backtesting
Backtested on XBTUSD , BTCPERP (FTX) pairs. You may notice it shows good results on 3h timeframe.
Relatively low drawdown
~ 10% (from 2019 to date) FTX
~ 22% (4 years from 2016) Bitmex
I backtested on the different altcoin pairs as well, but the results were just not good.
Relatively good results were shown by some index pairs from the FTX exchange ( FTX:SHITPERP ), but I think there is a few data for backtesting to be asure in them.
Bitmex 3h (2017 - 2020) :
i.imgur.com
FTX 3h (2019 - 2020):
i.imgur.com
Possible Improvements
- Regarding trading algorithm it would be good to check with strategy with ADX somehow. Maybe for the better entries
- As for Risk Management system, it can be improved by adding trailing stop to the strategy.
Link: school.stockcharts.com