VAWSI and Trend Persistance Reversal Strategy SL/TPThis is a completely revamped version of my "RSI and ATR Trend Reversal Strategy."
What's New?
The RSI has been replaced with an original indicator of mine, the "VAWSI," as I've elected to call it.
The standard RSI measures a change in an RMA to determine the strength of a movement.
The VAWSI performs very similarly, except it uses another original indicator of mine, the VAWMA.
VAWMA stands for "Volume (and) ATR Weight Moving Average." It takes an average of the volume and ATR and uses the ratio of each bar to weigh a moving average of the source.
It has the same formula as an RSI, but uses the VAWMA instead of an RMA.
Next we have the Trend Persistence indicator, which is an index on how long a trend has been persisting for. It is another original indicator. It takes the max deviation the source has from lowest/highest of a specified length. It then takes a cumulative measure of that amount, measures the change, then creates a strength index with that amount.
The VAWSI is a measure of an emerging trend, and the Trend Persistence indicator is a measure of how long a trend has persisted.
Finally, the 3rd main indicator, is a slight variation of an ATR. Rather than taking the max of source - low or high- source and source - source , it instead takes the max of high-low and the absolute value of source - the previous source. It then takes the absolute value of the change of this, and normalizes it with the source.
Inputs
Minimum SL/TP ensures that the Stop Loss and Take Profit still exist in untrendy markets. This is the minimum Amount that will always be applied.
VAWSI Weight is a divided by 100 multiplier for the VAWSI. So value of 200 means it is multiplied by 2. Think of it like a percentage.
Trend Persistence weight and ATR Weight are applied the same. Higher the number, the more impactful on the final calculation it is.
Combination Mult is an outright multiplier to the final calculation. So a 2.0 = * 2.0
Trend Persistence Smoothing Length is the length of the weighted moving average applied to the Trend Persistence Strength index.
Length Cycle Decimal is a replacement of length for the script.
Here we used BlackCat1402's Dynamic Length Calculation, which can be found on his page. With his permission we have implemented it into this script. Big shout out to them for not only creating, but allowing us to use it here.
The Length Cycle Decimal is used to calculate the dynamic length. Because TradingView only allows series int for their built-in library, a lot of the baseline indicators we use have to be manually recreated as functions in the following section.
The Strategy
As usual, we use Heiken Ashi values for calculations.
We begin by establishing the minimum SL/TP for use later.
Next we determine the amount of bars back since the last crossup or crossdown of our threshold line.
We then perform some normalization of our multipliers. We want a larger trend or larger VAWSI amount to narrow the threshold, so we have 1 divide them. This way, a higher reading outputs a smaller number and vice versa. We do this for both Trend Persistence, and the VAWSI.
The VAWSI we also normalize, where rather than it being a 0-100 reading of trend direction and strength, we absolute it so that as long as a trend is strong, regardless of direction, it will have a higher reading. With these normalized values, we add them together and simply subtract the ATR measurement rather than having 1 divide it.
Here you can see how the different measurements add up. A lower final number suggests imminent reversal, and a higher final number suggests an untrendy or choppy market.
ATR is in orange, the Trend Persistence is blue, the VAWSI is purple, and the final amount is green.
We take this final number and depending on the current trend direction, we multiply it by either the Highest or Lowest source since the last crossup or crossdown. We then take the highest or lowest of this calculation, and have it be our Stop Loss or Take Profit. This number cannot be higher/lower than the previous source to ensure a rapid spike doesn't immediately close your position on a still continuing trend. As well, the threshold cannot be higher/ lower than the the specified Stop Loss and Take Profit
Only after the source has fully crossed these lines do we consider it a crossup or crossdown. We confirm this with a barstate.isconfirmed to prevent repainting. Next, each time there is a crossup or crossdown we enter a long or a short respectively and plot accordingly.
I have the strategy configured to "process on order close" to ensure an accurate backtesting result. You could also set this to false and add a 1 bar delay to the "if crossup" and "if crossdown" lines under strategy so that it is calculated based on the open of the next bar.
Final Notes
The amounts have been preconfigured for performance on RIOT 5 Minute timeframe. Other timeframes are viable as well. With a few changes to the parameters, this strategy has backtested well on NVDA, AAPL, TSLA, and AMD. I recommend before altering settings to try other timeframes first.
This script does not seem to perform nearly as well in typically untrendy and choppy markets such as crypto and forex. With some setting changes, I have seen okay results with crypto, but overfitting could be the cause there.
Thank you very much, and please enjoy.
Bands and Channels
BBTrend w SuperTrend decision - Strategy [presentTrading]This strategy aims to improve upon the performance of Traidngview's newly published "BB Trend" indicator by incorporating the SuperTrend for better trade execution and risk management. Enjoy :)
█Introduction and How it is Different
The "BBTrend w SuperTrend decision - Strategy " is a trading strategy designed to identify market trends using Bollinger Bands and SuperTrend indicators. What sets this strategy apart is its use of two Bollinger Bands with different lengths to capture both short-term and long-term market trends, providing a more comprehensive view of market dynamics. Additionally, the strategy includes customizable take profit (TP) and stop loss (SL) settings, allowing traders to tailor their risk management according to their preferences.
BTCUSD 4h Long Performance
█ Strategy, How It Works: Detailed Explanation
The BBTrend strategy employs two key indicators: Bollinger Bands and SuperTrend.
🔶 Bollinger Bands Calculation:
- Short Bollinger Bands**: Calculated using a shorter period (default 20).
- Long Bollinger Bands**: Calculated using a longer period (default 50).
- Bollinger Bands use the standard deviation of price data to create upper and lower bands around a moving average.
Upper Band = Middle Band + (k * Standard Deviation)
Lower Band = Middle Band - (k * Standard Deviation)
🔶 BBTrend Indicator:
- The BBTrend indicator is derived from the absolute differences between the short and long Bollinger Bands' lower and upper values.
BBTrend = (|Short Lower - Long Lower| - |Short Upper - Long Upper|) / Short Middle * 100
🔶 SuperTrend Indicator:
- The SuperTrend indicator is calculated using the average true range (ATR) and a multiplier. It helps identify the market trend direction by plotting levels above and below the price, which act as dynamic support and resistance levels. * @EliCobra makes the SuperTrend Toolkit. He is GOAT.
SuperTrend Upper = HL2 + (Factor * ATR)
SuperTrend Lower = HL2 - (Factor * ATR)
The strategy determines market trends by checking if the close price is above or below the SuperTrend values:
- Uptrend: Close price is above the SuperTrend lower band.
- Downtrend: Close price is below the SuperTrend upper band.
Short: 10 Long: 20 std 2
Short: 20 Long: 40 std 2
Short: 20 Long: 40 std 4
█ Trade Direction
The strategy allows traders to choose their trading direction:
- Long: Enter long positions only.
- Short: Enter short positions only.
- Both: Enter both long and short positions based on market conditions.
█ Usage
To use the "BBTrend - Strategy " effectively:
1. Configure Inputs: Adjust the Bollinger Bands lengths, standard deviation multiplier, and SuperTrend settings.
2. Set TPSL Conditions: Choose the take profit and stop loss percentages to manage risk.
3. Choose Trade Direction: Decide whether to trade long, short, or both directions.
4. Apply Strategy: Apply the strategy to your chart and monitor the signals for potential trades.
█ Default Settings
The default settings are designed to provide a balance between sensitivity and stability:
- Short BB Length (20): Captures short-term market trends.
- Long BB Length (50): Captures long-term market trends.
- StdDev (2.0): Determines the width of the Bollinger Bands.
- SuperTrend Length (10): Period for calculating the ATR.
- SuperTrend Factor (12): Multiplier for the ATR to adjust the SuperTrend sensitivity.
- Take Profit (30%): Sets the level at which profits are taken.
- Stop Loss (20%): Sets the level at which losses are cut to manage risk.
Effect on Performance
- Short BB Length: A shorter length makes the strategy more responsive to recent price changes but can generate more false signals.
- Long BB Length: A longer length provides smoother trend signals but may be slower to react to price changes.
- StdDev: Higher values create wider bands, reducing the frequency of signals but increasing their reliability.
- SuperTrend Length and Factor: Shorter lengths and higher factors make the SuperTrend more sensitive, providing quicker signals but potentially more noise.
- Take Profit and Stop Loss: Adjusting these levels affects the risk-reward ratio. Higher take profit percentages can increase gains but may result in fewer closed trades, while higher stop loss percentages can decrease the likelihood of being stopped out but increase potential losses.
Double Vegas SuperTrend Enhanced - Strategy [presentTrading]
█ Introduction and How It Is Different
The "Double Vegas SuperTrend Enhanced" strategy is a sophisticated trading system that combines two Vegas SuperTrend Enhanced. Very Powerful!
Let's celebrate the joy of Children's Day on June 1st! Enjoyyy!
BTCUSD LS performance
The strategy aims to pinpoint market trends with greater accuracy and generate trades that align with the overall market direction.
This approach differentiates itself by integrating volatility adjustments and leveraging the Vegas Channel's width to refine the SuperTrend calculations, resulting in a dynamic and responsive trading system.
Additionally, the strategy incorporates customizable take-profit and stop-loss levels, providing traders with a robust framework for risk management.
-> check Vegas SuperTrend Enhanced - Strategy
█ Strategy, How It Works: Detailed Explanation
🔶 Vegas Channel and SuperTrend Calculations
The strategy initiates by calculating the Vegas Channel, which is derived from a simple moving average (SMA) and the standard deviation (STD) of the closing prices over a specified window length. This channel helps in measuring market volatility and forms the basis for adjusting the SuperTrend indicator.
Vegas Channel Calculation:
- vegasMovingAverage = SMA(close, vegasWindow)
- vegasChannelStdDev = STD(close, vegasWindow)
- vegasChannelUpper = vegasMovingAverage + vegasChannelStdDev
- vegasChannelLower = vegasMovingAverage - vegasChannelStdDev
SuperTrend Multiplier Adjustment:
- channelVolatilityWidth = vegasChannelUpper - vegasChannelLower
- adjustedMultiplier = superTrendMultiplierBase + volatilityAdjustmentFactor * (channelVolatilityWidth / vegasMovingAverage)
The adjusted multiplier enhances the SuperTrend's sensitivity to market volatility, making it more adaptable to changing market conditions.
BTCUSD Local picture.
🔶 Average True Range (ATR) and SuperTrend Values
The ATR is computed over a specified period to measure market volatility. Using the ATR and the adjusted multiplier, the SuperTrend upper and lower levels are determined.
ATR Calculation:
- averageTrueRange = ATR(atrPeriod)
**SuperTrend Calculation:**
- superTrendUpper = hlc3 - (adjustedMultiplier * averageTrueRange)
- superTrendLower = hlc3 + (adjustedMultiplier * averageTrueRange)
The SuperTrend levels are continuously updated based on the previous values and the current market trend direction. The market trend is determined by comparing the closing prices with the SuperTrend levels.
Trend Direction:
- If close > superTrendLowerPrev, then marketTrend = 1 (bullish)
- If close < superTrendUpperPrev, then marketTrend = -1 (bearish)
🔶 Trade Entry and Exit Conditions
The strategy generates trade signals based on the alignment of both SuperTrends. Trades are executed only when both SuperTrends indicate the same market direction.
Entry Conditions:
- Long Position: Both SuperTrends must signal a bullish trend.
- Short Position: Both SuperTrends must signal a bearish trend.
Exit Conditions:
- Positions are exited if either SuperTrend reverses its trend direction.
- Additional conditions include holding periods and configurable take-profit and stop-loss levels.
█ Trade Direction
The strategy allows traders to specify the desired trade direction through a customizable input setting. Options include:
- Long: Only enter long positions.
- Short: Only enter short positions.
- Both: Enter both long and short positions based on the market conditions.
█ Usage
To utilize the "Double Vegas SuperTrend Enhanced" strategy, traders need to configure the input settings according to their trading preferences and market conditions. The strategy includes parameters for ATR periods, Vegas Channel window lengths, SuperTrend multipliers, volatility adjustment factors, and risk management settings such as hold days, take-profit, and stop-loss percentages.
█ Default Settings
The strategy comes with default settings that can be adjusted to fit individual trading styles:
- trade Direction: Both (allows trading in both long and short directions for maximum flexibility).
- ATR Periods: 10 for SuperTrend 1 and 5 for SuperTrend 2 (shorter ATR period results in more sensitivity to recent price movements).
- Vegas Window Lengths: 100 for SuperTrend 1 and 200 for SuperTrend 2 (longer window length results in smoother moving averages and less sensitivity to short-term volatility).
- SuperTrend Multipliers: 5 for SuperTrend 1 and 7 for SuperTrend 2 (higher multipliers lead to wider SuperTrend channels, reducing the frequency of trades).
- Volatility Adjustment Factors: 5 for SuperTrend 1 and 7 for SuperTrend 2 (higher adjustment factors increase the responsiveness to changes in market volatility).
- Hold Days: 5 (defines the minimum duration a position is held, ensuring trades are not exited prematurely).
- Take Profit: 30% (sets the target profit level to lock in gains).
- Stop Loss: 20% (sets the maximum acceptable loss level to mitigate risk).
Channels With NVI Strategy [TradeDots]The "Channels With NVI Strategy" is a trading strategy that identifies oversold market instances during a bullish trading market. Specifically, the strategy integrates two principal indicators to deliver profitable opportunities, anticipating potential uptrends.
2 MAIN COMPONENTS
1. Channel Indicators: This strategy gives users the flexibility to choose between Bollinger Band Channels or Keltner Channels. This selection can be made straight from the settings, allowing the traders to adjust the tool according to their preferences and strategies.
2. Negative Volume Indicator (NVI): An indicator that calculates today's price rate of change, but only when today's trading volume is less than the previous day's. This functionality enables users to detect potential shifts in the trading volume with time and price.
ENTRY CONDITION
First, the assets price must drop below the lower band of the channel indicator.
Second, NVI must ascend above the exponential moving average line, signifying a possible flood of 'smart money' (large institutional investors or savvy traders), indicating an imminent price rally.
EXIT CONDITION
Exit conditions can be customized based on individual trading styles and risk tolerance levels. Traders can define their ideal take profit or stop loss percentages.
Moreover, the strategy also employs an NVI-based exit policy. Specifically, if the NVI dips under the exponential moving average – suggestive of a fading trading momentum, the strategy grants an exit call.
RISK DISCLAIMER
Trading entails substantial risk, and most day traders incur losses. All content, tools, scripts, articles, and education provided by TradeDots serve purely informational and educational purposes. Past performances are not definitive predictors of future results.
RSI and ATR Trend Reversal SL/TPQuick History:
I was frustrated with a standard fixed percent TP/SL as they often were not receptive to quick market rallies/reversals. I developed this TP/SL and eventually made it into a full fledge strategy and found it did well enough to publish. This strategy can be used as a standalone or tacked onto another strategy as a TP/SL. It does function as both with a single line. This strategy has been tested with TSLA , AAPL, NVDA, on the 15 minutes timeframe.
HOW IT WORKS:
Inputs:
Length: Simple enough, it determines the length of the RSI and ATR used.
Multiplier: This multiplies the RSI and ATR calculation, more on this later.
Delay to prevent Idealization: TradingView will use the open of the bar the strategy triggers on when calculating the backtest. This can produce unrealistic results depending on the source. If your source is open, set to 0, if anything else, set to 1.
Minimum Difference: This is essentially a traditional SL/TP, it is borderline unnecessary, but if the other parameters are wacky this can be used to ensure the SL/TP. It multiplies the source by the percent, so if it is set to 10, the SL/TP is initialized at src +- 10%.
Source input: Self Explanatory, be sure to update the Delay if you use open.
CALCULATION:
Parameters Initialization:
The strategy uses Heikinashi values for calculations, this is not toggleable in parameters, but can be easily changed by changing hclose to equal src.
FUNCTION INITIALIZATION:
highest_custom and lowest_custom do the same thing as ta.highest and ta.lowest, however the built in ta library does not allow for var int input, so I had to create my own functions to be used here. I actually developed these years ago and have used them in almost every strategy since. Feel especially free to use these in your own scripts.
The rsilev is where the magic happens.
SL/TP min/max are initially calculated to be used later.
Then we begin by establishing variables.
BullGuy is used to determine the length since the last crossup or crossdown, until one happens, it returns na, breaking the function. BearGuy is used in all the calculations, and is the same as BullGuy, unless BullGuy is na, where BearGuy counts up from 1 on each bar from 0.
We create our rsi and have to modify the second one to suit the function. In the case of the upper band, we mirror the lower one. So if the RSI is 80, we want it to be 20 on the upper band.
the upper band and lower band are calculated the exact same way, but mirrored. For the purpose of writing, I'm going to talk about the lower band. Assume everything is mirrored for the upper one. It finds the highest source since the last crossup or crossdown. It then multiplies from 1 / the RSI, this means that a rapid RSI increase will increase the band dramatically, so it is able to capture quick rally/reversals. We add this to the atr to source ratio, as the general volatility is a massive factor to be included. We then multiply this number by our chosen amount, and subtract it from the highest source, creating the band.
We do this same process but mirrored with both bands and compared it to the source. If the source is above the lower band, it suggests an uptrend, so the lower band is outputted, and vice versa for the upper one.
PLOTTING:
We also determine the line color in the same manner as we do the trend direction.
STRATEGY:
We then use the source again, and if it crosses up or down relative to the selected band, we enter a long or short respectively.
This may not be the most superb independent strategy, but it can be very useful as a TP/SL for your chosen entry conditions, especially in volatile markets or tickers.
Thank you for taking the time to read, and please enjoy.
Vegas SuperTrend Enhanced - Strategy [presentTrading]█ Introduction and How it is Different
The "Vegas SuperTrend Enhanced - Strategy " trading strategy represents a novel integration of two powerful technical analysis tools: the Vegas Channel and the SuperTrend indicator. This fusion creates a dynamic, adaptable strategy designed for the volatile and fast-paced cryptocurrency markets, particularly focusing on Bitcoin trading.
Unlike traditional trading strategies that rely on a static set of rules, this approach modifies the SuperTrend's sensitivity to market volatility, offering traders the ability to customize their strategy based on current market conditions. This adaptability makes it uniquely suited to navigating the often unpredictable swings in cryptocurrency valuations, providing traders with signals that are both timely and reflective of underlying market dynamics.
BTC 6h LS
█ Strategy, How it Works: Detailed Explanation
This is an innovative approach that combines the volatility-based Vegas Channel with the trend-following SuperTrend indicator to create dynamic trading signals. This section delves deeper into the mechanics and mathematical foundations of the strategy.
Detail picture to show :
🔶 Vegas Channel Calculation
The Vegas Channel serves as the foundation of this strategy, employing a simple moving average (SMA) coupled with standard deviation to define the upper and lower bounds of the trading channel. This channel adapts to price movements, offering a visual representation of potential support and resistance levels based on historical price volatility.
🔶 SuperTrend Indicator Adjustment
Central to the strategy is the SuperTrend indicator, which is adjusted according to the width of the Vegas Channel. This adjustment is achieved by modifying the SuperTrend's multiplier based on the channel's volatility, allowing the indicator to become more sensitive during periods of high volatility and less so during quieter market phases.
🔶 Trend Determination and Signal Generation
The market trend is determined by comparing the current price with the SuperTrend values. A shift from below to above the SuperTrend line signals a potential bullish trend, prompting a "buy" signal, whereas a move from above to below indicates a bearish trend, generating a "sell" signal. This methodology ensures that trades are entered in alignment with the prevailing market direction, enhancing the potential for profitability.
BTC 6h Local
█ Trade Direction
A distinctive feature of this strategy is its configurable trade direction input, allowing traders to specify whether they wish to engage in long positions, short positions, or both. This flexibility enables users to tailor the strategy according to their risk tolerance, trading style, and market outlook, providing a personalized trading experience.
█ Usage
To utilize the "Vegas SuperTrend - Enhanced" strategy effectively, traders should first adjust the input settings to align with their trading preferences and the specific characteristics of the asset being traded. Monitoring the strategy's signals within the context of overall market conditions and combining its insights with other forms of analysis can further enhance its effectiveness.
█ Default Settings
- Trade Direction: Both (allows trading in both directions)
- ATR Period for SuperTrend: 10 (determines the length of the ATR for volatility measurement)
- Vegas Window Length: 100 (sets the length of the SMA for the Vegas Channel)
- SuperTrend Multiplier Base: 5 (base multiplier for SuperTrend calculation)
- Volatility Adjustment Factor: 5.0 (adjusts SuperTrend sensitivity based on Vegas Channel width)
These default settings provide a balanced approach suitable for various market conditions but can be adjusted to meet individual trading needs and objectives.
BabyShark VWAP Strategy What the code does:
This Pine Script implements a trading strategy based on two indicators: Volume Weighted Average Price (VWAP) and On Balance Volume (OBV) Relative Strength Index (RSI). The strategy aims to identify potential buy and sell signals based on deviations from VWAP and OBV RSI crossing certain threshold levels.
How it does it:
**VWAP Calculation**: The script calculates the VWAP using either standard deviation or average deviation over a specified length. It then plots the VWAP and its upper and lower deviation bands.
**OBV RSI Calculation**: It computes the OBV and then calculates the RSI using the cumulative changes in OBV. The RSI is plotted and compared against predefined levels.
**Table Visibility and Occurrence Counting**: It allows the user to display a table showing the number of occurrences where the price is above Upper Dev 2, below Lower Dev 2, crosses above a higher RSI level, or crosses below a lower RSI level.
**Entries**: Long and short entry conditions are defined based on the position of the price relative to the VWAP deviation bands and the color of the OBV RSI. Entries are made when specific conditions are met, and there hasn't been a recent entry.
**Exit Conditions**: The script includes stop-loss and take-profit mechanisms. It exits positions based on price crossing the VWAP or a certain percentage, and it prevents further trading after a certain number of consecutive losses.
What traders can use it for:
**Trend Identification**: Traders can use the VWAP and its deviation bands to identify potential trend reversals or continuations.
**Volume Confirmation**: The inclusion of OBV RSI provides confirmation of price movements based on volume changes.
**Entry and Exit Signals**: The script generates buy and sell signals based on the specified conditions, allowing traders to enter and exit positions with defined stop-loss and take-profit levels.
**Statistical Analysis**: The visibility of occurrence counts in the table allows traders to perform statistical analysis on the frequency of price movements relative to the VWAP and OBV RSI levels.
arpit bollinger bandStrategy Overview:
This strategy utilizes Bollinger Bands based on a 20-period Exponential Moving Average (EMA) with a standard deviation multiplier of 1.5. It is designed to generate early trading signals based on the relationship between the price action and the Bollinger Bands.
Bollinger Bands Calculation:
The upper Bollinger Band is calculated as the 20-period EMA of the closing prices plus 1.5 times the standard deviation of the same period.
The lower Bollinger Band is calculated as the 20-period EMA of the closing prices minus 1.5 times the standard deviation.
Entry Criteria:
Buy Signal: A buy signal is generated when the current candle's high exceeds the high of the candle two periods ago, which had closed below the lower Bollinger Band. This condition implies an anticipation of a bullish reversal.
Sell Signal: A sell signal is generated when the current candle's low falls below the low of the candle two periods ago, which had closed above the upper Bollinger Band. This condition suggests an anticipated bearish reversal.
Stop Loss and Take Profit:
The stop loss for a buy order is set slightly below the low of the current candle, and for a sell order, it is set slightly above the high of the current candle.
The take profit level is determined based on a predefined risk-reward ratio of 1:3. This means the take profit target is set at a distance three times greater than the distance between the entry price and the stop loss.
Risk Management:
The strategy includes an input option to adjust the risk-reward ratio, allowing for flexibility in managing the trade's potential risk versus reward.
Trade Execution:
The strategy automatically plots the buy and sell signals on the chart and executes the trades according to the defined conditions. It also visually indicates the stop loss levels for each trade.
Usage Notes:
This strategy is designed for use in the TradingView platform using Pine Script version 5.
It is important to backtest and paper trade the strategy before using it in live trading to understand its performance characteristics and risk profile.
The strategy should be used as part of a comprehensive trading plan, considering market conditions, trader risk tolerance, and personal trading goals.
Turtle Trading Strategy@lihexieThe full implementation of the Turtle Trading Rules (as distinct from the various truncated versions circulating within the community) is now ready.
This trading strategy script distinguishes itself from all currently publicly available Turtle trading systems on Tradingview by comprehensively embodying the rules for entries, exits, position management, and profit and loss controls.
Market Selection:
Trade in highly liquid markets such as forex, commodity futures, and stock index futures.
Entry Strategies:
Model 1: Buy when the price breaks above the highest point of the last 20 trading days; Sell when the price drops below the lowest point of the last 20 trading days. When an entry opportunity arises, if the previous trade was profitable, skip the current breakout opportunity and refrain from entering.
Model 2: Buy when the price breaks above the highest point of the last 55 trading days; Sell when the price drops below the lowest point of the last 55 trading days.
Position Sizing:
Determine the size of each position based on the price volatility (ATR) to ensure that the risk of each trade does not exceed 2% of the account balance.
Exit Strategies:
1. Use a fixed stop-loss point to limit losses: Close long positions when the price falls below the lowest point of the last 10 trading days.
2. Trailing stop-loss: Once a position is profitable, adjust the stop-loss point to protect profits.
Pyramiding Rules:
Unit Doubling: Increase position size by one unit every time the price moves forward by n (default is 0.5) units of ATR, up to a maximum of 4 units, while also raising the stop-loss point to below the ATR value at the level of additional entries.
海龟交易法则的完整实现(区别于当前社区各种有阉割海龟交易系统代码)
本策略脚本区别于Tradingview目前公开的所有的海龟交易系统,完整的实现了海龟交易法则中入场、出场、仓位管理,止盈止损的规则。
市场选择:
选择流动性高的市场进行交易,如外汇、商品期货和股指期货等。
入市策略:
模式1:当价格突破过去20个交易日的高点时,买入;当价格跌破过去20个交易日的低点时,卖出。当出现入场机会时,如果上一笔交易是盈利的,那么跳过当前突破的机会,不进行入场。
模式2:当价格突破过去55个交易日的高点时,买入;当价格跌破过去55个交易日的低点时,卖出。
头寸规模:
根据价格波动性(ATR)来确定每个头寸的大小, 使每笔交易的风险不超过账户余额的2%。
退出策略:
1. 使用一个固定的止损点来限制损失:当多头头寸的价格跌破过去10个交易日的低点时,平仓止损。
2. 跟踪止损:一旦头寸盈利,移动止损点以保护利润。
加仓规则:
单位加倍:每当价格向前n(默认是0.5)个单位的ATR移动时,就增加一个单位的头寸大小(默认最大头寸数量是4个),同时将止损点提升至加仓点位的ATR值以下。
Bollinger and Stochastic with Trailing Stop - D.M.P.This trading strategy combines Bollinger Bands and the Stochastic indicator to identify entry opportunities in oversold and overbought conditions in the market. The aim is to capitalize on price rebounds from the extremes defined by the Bollinger Bands, with the confirmation of the Stochastic to maximize the probability of success of the operations.
Indicators Used
- Bollinger Bands Used to measure volatility and define oversold and overbought levels. When the price touches or breaks through the lower band, it indicates a possible oversold condition. Similarly, when it touches or breaks through the upper band, it indicates a possible overbought condition.
- Stochastic: A momentum oscillator that compares the closing price of an asset with its price range over a certain period. Values below 20 indicate oversold, while values above 80 indicate overbought.
Strategy Logic
- Long Entry (Buy): A purchase operation is executed when the price closes below the lower Bollinger band (indicating oversold) and the Stochastic is also in the oversold zone.
- Short Entry (Sell): A sell operation is executed when the price closes above the upper Bollinger band (indicating overbought) and the Stochastic is in the overbought zone.
CCI based support and resistance strategy
WARNING:
Commissions and slippage has not been considered! Don’t take it easy adding commissions and slippage could turns a fake-profitable strategy to a real disaster.
We consider account size as 10k and we enter 1000 for each trade.
Less than 100 trades is too small sample community and it’s not reliable, Also the performance of the past do not guarantee future performance. This result was handpicked by author and will differ by other timeframes, instruments and settings.
*PLEASE SHARE YOUR SETTINGS THAT WORK WITH THE COMMUNITY.
Introduction:
The CCI-based dynamic support and resistance is a "Bands and Channels" kind of indicator consisting an upper and lower band. This is a strategy which uses CCI-based (Made by me) indicator to execute trades.
SL and TP are calculated based on max ATR during last selected time period. You can edit strategy settings using "Ksl", "Ktp" and the other button for time period. “KSL” and “KTP” are 2.5 and 5 by default.
Bands are calculated regarding CCI previous high and low pivot. CCI length, right pivot length and left pivot length are 50.
A dynamic support and resistance has been calculated using last upper-cci minus a buffer and last lower-cci plus the buffer. The buffer is 10.
If "Trend matter?" button is on you can detect trend by color of the upper and lower line. Green is bullish and red is bearish! "Trend matter?" is on.
The "show mid?" button makes mid line visible, which is average of upper and lower lines, visible. The button is not active by default.
Reaction to the support could be a buy signal while a reaction to the resistance could interpreted as a sell signal.
How this strategy work?
Donald Lambert, a technical analyst, created the CCI, or Commodity Channel Index, which he first published in 1980. CCI is calculated regarding CCI can be used both as trend-detector or an oscillator. As an oscillator most traders believe in static predefined levels. Overbought and oversold candles which are clear in the chart could be used as sell and buy signals.
During my trading career I’ve noticed that there might be some reversal points for the CCI. I believe CCI could have to potential to reverse more from lately reversal point. Of course, just like other trading strategies we are talking about probabilities. We do not expect a win trade each time.
On price chart
Now this the question! What price should the instrument reach that CCI turns to be equal to our reversing aim for CCI? Imagine we have found last important bearish reversal of CCI in 200. Now, if we need the CCI to be 200 what price should we wait for?
How to calculate?
This is the CCI formula:
CCI = (Typical Price - SMA of TP) / (0.015 x Mean Deviation)
Where, Typical Price (TP) = (High + Low + Close)/3
For probable reversing points, high and low pivots of 50 bars have been used.
So we do have an Upper CCI and a Lower CCI. They are valid until the next pivot is available.
By relocating factors in CCI formula you can reach the “Typical Price”.
“
Typical Price = CCI (0.015 * Mean Deviation) + SMA of TP
So we could have a Support or Resistance by replacing CCI with Upper and Lower CCI.
A buy signal is valid if the trend is bullish (or “trend matter” is off) and lowest low of last 2 candles is lower than support and close is greater than both support and open.
A Sell signal is produced in opposite situation.
There are 2+1 options for trend!
Trend matter box is on by default, which means we’ll just open trades in direction of the trend. It’s available to turn it off.
Other 2 options are cross and slope. Cross calculated by comparing fast SMA and slow SMA. The slope one differentiate slow SMA to last “n” one.
Considering last day and today highest ATR as the ATR to calculating SL and TP is our unique technique.
TrailingTakeProfit exampleQuite recently I came upon a concept of Trailing Take Profit and I couldn't find a PineScript which implements it for the fastest possible execution, so here it is :)
Everybody knows Trailing StopLoss - an invisible mechanism follows the price and exits the trade once the price retreats too much from its recent most extended favourable value. Trailing TakeProfit does the similar thing, but at the opposite end - the trade gets closed if a price moves too well, in too favourable extent.
Why close the trade if it is going so good? Well, whatever goes up, must go down and vice versa. It is expected, that after fast rally a market will soon fall and after a dump it will go up. So Trailing TakeProfit's role is to secure profits.
But how does Trailing TakeProfit differ from the standard one? "Trailing" means, the exit level is moving. Its role is to be executed only after a rapid favourable move within 1-2 candles, not more. We never know when a rapid move happens, but when it does, we wanna catch those pips and quickly exit without looking back.
Visually Trailing TakeProfit levels are... bands. In this script example these are ATR multiplied bands (aka Keltner Channel), but they could also be Bollinger Bands or something else.
The code is simple just to focus on this single functionality, so you can quickly copy-paste it into your script. Entries are triggered by default SMA crosses.
P.S. I wouldn't be myself, if I didn't add alert messages compatible with the syntax of recently revamped TradingConnector - both in the code already and in the table showing them.
Contrarian DC Strategy - w Entry SL Pause and TrailingStopDonchian Channel Setup:
The strategy uses a tool called the Donchian Channel. Imagine this as two lines (bands) on a chart that show the highest and lowest prices over a certain number of past trading days (default is 20 days).
There's also a centerline, which is the average of these two bands.
Entry Conditions for Trades:
Buying (Going Long): The strategy considers buying when the price touches or falls below the lower band of the Donchian Channel. However, this only happens if there has been a pause after a previous losing trade. This pause is a number of candles where no new trades are taken.
Selling (Going Short): Similarly, the strategy considers selling when price reaches or exceeds the upper band of the Donchian Channel. Again, this is subject to a pause after a losing trade.
Stop Loss and Take Profit:
Each trade has a "Stop Loss" and "Take Profit" set. The Stop Loss is a preset price level where the trade will close to prevent further losses if the market moves against your position. The Take Profit does the same but locks in profit if the market moves in your favor.
The Stop Loss is set based on a percentage of the price at which you entered the trade.
The Take Profit is determined by the Risk/Reward Ratio. This ratio helps balance how much you're willing to risk versus the potential reward.
Trailing Stop Loss:
When a trade is profitable, the strategy should involve a "Trailing Stop Loss." This means the Stop Loss level moves (or trails) the price movement to lock in profits as the market moves in your favor.
For a buy trade, if the price moves above the centerline of the Donchian Channel, the Trailing Stop Loss should be adjusted in the middle between the entry price and the centerline. Viceversa for a sell trade, it should be adjusted in the same way if the price goes below the centerline.
IMPORTANT: There's no allert for the trailing stop at the moment.
Post-Stop Loss Pause:
If a trade hits the Stop Loss (i.e., it's a losing trade), the strategy takes a break before opening another trade in the same direction. This pause helps to avoid entering another trade immediately in a potentially unfavorable market.
In summary, this strategy is designed to make trades based on the Donchian Channel, with specific rules for when to enter and exit trades, and mechanisms to manage risk and protect profits. It's contrarian because it tends to buy when the price is low and sell when the price is high, which is opposite to what many traders might do.
Donchian Quest Research// =================================
Trend following strategy.
// =================================
Strategy uses two channels. One channel - for opening trades. Second channel - for closing.
Channel is similar to Donchian channel, but uses Close prices (not High/Low). That helps don't react to wicks of volatile candles (“stop hunting”). In most cases openings occur earlier than in Donchian channel. Closings occur only for real breakout.
// =================================
Strategy waits for beginning of trend - when price breakout of channel. Default length of both channels = 50 candles.
Conditions of trading:
- Open Long: If last Close = max Close for 50 closes.
- Close Long: If last Close = min Close for 50 closes.
- Open Short: If last Close = min Close for 50 closes.
- Close Short: If last Close = max Close for 50 closes.
// =================================
Color of lines:
- black - channel for opening trade.
- red - channel for closing trade.
- yellow - entry price.
- fuchsia - stoploss and breakeven.
- vertical green - go Long.
- vertical red - go Short.
- vertical gray - close in end, don't trade anymore.
// =================================
Order size calculated with ATR and volatility.
You can't trade 1 contract in BTC and 1 contract in XRP - for example. They have different price and volatility, so 1 contract BTC not equal 1 contract XRP.
Script uses universal calculation for every market. It is based on:
- Risk - USD sum you ready to loss in one trade. It calculated as percent of Equity.
- ATR indicator - measurement of volatility.
With default setting your stoploss = 0.5 percent of equity:
- If initial capital is 1000 USD and used parameter "Permit stop" - loss will be 5 USD (0.5 % of equity).
- If your Equity rises to 2000 USD and used parameter "Permit stop"- loss will be 10 USD (0.5 % of Equity).
// =================================
This Risk works only if you enable “Permit stop” parameter in Settings.
If this parameter disabled - strategy works as reversal strategy:
⁃ If close Long - channel border works as stoploss and momentarily go Short.
⁃ If close Short - channel border works as stoploss and momentarily go Long.
Channel borders changed dynamically. So sometime your loss will be greater than ‘Risk %’. Sometime - less than ‘Risk %’.
If this parameter enabled - maximum loss always equal to 'Risk %'. This parameter also include breakeven: if profit % = Risk %, then move stoploss to entry price.
// =================================
Like all trend following strategies - it works only in trend conditions. If no trend - slowly bleeding. There is no special additional indicator to filter trend/notrend. You need to trade every signal of strategy.
Strategy gives many losses:
⁃ 30 % of trades will close with profit.
⁃ 70 % of trades will close with loss.
⁃ But profit from 30% will be much greater than loss from 70 %.
Your task - patiently wait for it and don't use risky setting for position sizing.
// =================================
Recommended timeframe - Daily.
// =================================
Trend can vary in lengths. Selecting length of channels determine which trend you will be hunting:
⁃ 20/10 - from several days to several weeks.
⁃ 20/20 or 50/20 - from several weeks to several months.
⁃ 50/50 or 100/50 or 100/100 - from several months to several years.
// =================================
Inputs (Settings):
- Length: length of channel for trade opening/closing. You can choose 20/10, 20/20, 50/20, 50/50, 100/50, 100/100. Default value: 50/50.
- Permit Long / Permit short: Longs are most profitable for this strategy. You can disable Shorts and enable Longs only. Default value: permit all directions.
- Risk % of Equity: for position sizing used Equity percent. Don't use values greater than 5 % - it's risky. Default value: 0.5%.
⁃ ATR multiplier: this multiplier moves stoploss up or down. Big multiplier = small size of order, small profit, stoploss far from entry, low chance of stoploss. Small multiplier = big size of order, big profit, stop near entry, high chance of stoploss. Default value: 2.
- ATR length: number of candles to calculate ATR indicator. It used for order size and stoploss. Default value: 20.
- Close in end - to close active trade in the end (and don't trade anymore) or leave it open. You can see difference in Strategy Tester. Default value: don’t close.
- Permit stop: use stop or go reversal. Default value: without stop, reversal strategy.
// =================================
Properties (Settings):
- Initial capital - 1000 USD.
- Script don't uses 'Order size' - you need to change 'Risk %' in Inputs instead.
- Script don't uses 'Pyramiding'.
- 'Commission' 0.055 % and 'Slippage' 0 - this parameters are for crypto exchanges with perpetual contracts (for example Bybit). If use on other markets - set it accordingly to your exchange parameters.
// =================================
Big dataset used for chart - 'BITCOIN ALL TIME HISTORY INDEX'. It gives enough trades to understand logic of script. It have several good trends.
// =================================
Supertrend Advance Pullback StrategyHandbook for the Supertrend Advance Strategy
1. Introduction
Purpose of the Handbook:
The main purpose of this handbook is to serve as a comprehensive guide for traders and investors who are looking to explore and harness the potential of the Supertrend Advance Strategy. In the rapidly changing financial market, having the right tools and strategies at one's disposal is crucial. Whether you're a beginner hoping to dive into the world of trading or a seasoned investor aiming to optimize and diversify your portfolio, this handbook offers the insights and methodologies you need. By the end of this guide, readers should have a clear understanding of how the Supertrend Advance Strategy works, its benefits, potential pitfalls, and practical application in various trading scenarios.
Overview of the Supertrend Advance Pullback Strategy:
At its core, the Supertrend Advance Strategy is an evolution of the popular Supertrend Indicator. Designed to generate buy and sell signals in trending markets, the Supertrend Indicator has been a favorite tool for many traders around the world. The Advance Strategy, however, builds upon this foundation by introducing enhanced mechanisms, filters, and methodologies to increase precision and reduce false signals.
1. Basic Concept:
The Supertrend Advance Strategy relies on a combination of price action and volatility to determine the potential trend direction. By assessing the average true range (ATR) in conjunction with specific price points, this strategy aims to highlight the potential starting and ending points of market trends.
2. Methodology:
Unlike the traditional Supertrend Indicator, which primarily focuses on closing prices and ATR, the Advance Strategy integrates other critical market variables, such as volume, momentum oscillators, and perhaps even fundamental data, to validate its signals. This multidimensional approach ensures that the generated signals are more reliable and are less prone to market noise.
3. Benefits:
One of the main benefits of the Supertrend Advance Strategy is its ability to filter out false breakouts and minor price fluctuations, which can often lead to premature exits or entries in the market. By waiting for a confluence of factors to align, traders using this advanced strategy can increase their chances of entering or exiting trades at optimal points.
4. Practical Applications:
The Supertrend Advance Strategy can be applied across various timeframes, from intraday trading to swing trading and even long-term investment scenarios. Furthermore, its flexible nature allows it to be tailored to different asset classes, be it stocks, commodities, forex, or cryptocurrencies.
In the subsequent sections of this handbook, we will delve deeper into the intricacies of this strategy, offering step-by-step guidelines on its application, case studies, and tips for maximizing its efficacy in the volatile world of trading.
As you journey through this handbook, we encourage you to approach the Supertrend Advance Strategy with an open mind, testing and tweaking it as per your personal trading style and risk appetite. The ultimate goal is not just to provide you with a new tool but to empower you with a holistic strategy that can enhance your trading endeavors.
2. Getting Started
Navigating the financial markets can be a daunting task without the right tools. This section is dedicated to helping you set up the Supertrend Advance Strategy on one of the most popular charting platforms, TradingView. By following the steps below, you'll be able to integrate this strategy into your charts and start leveraging its insights in no time.
Setting up on TradingView:
TradingView is a web-based platform that offers a wide range of charting tools, social networking, and market data. Before you can apply the Supertrend Advance Strategy, you'll first need a TradingView account. If you haven't set one up yet, here's how:
1. Account Creation:
• Visit TradingView's official website.
• Click on the "Join for free" or "Sign up" button.
• Follow the registration process, providing the necessary details and setting up your login credentials.
2. Navigating the Dashboard:
• Once logged in, you'll be taken to your dashboard. Here, you'll see a variety of tools, including watchlists, alerts, and the main charting window.
• To begin charting, type in the name or ticker of the asset you're interested in the search bar at the top.
3. Configuring Chart Settings:
• Before integrating the Supertrend Advance Strategy, familiarize yourself with the chart settings. This can be accessed by clicking the 'gear' icon on the top right of the chart window.
• Adjust the chart type, time intervals, and other display settings to your preference.
Integrating the Strategy into a Chart:
Now that you're set up on TradingView, it's time to integrate the Supertrend Advance Strategy.
1. Accessing the Pine Script Editor:
• Located at the top-center of your screen, you'll find the "Pine Editor" tab. Click on it.
• This is where custom strategies and indicators are scripted or imported.
2. Loading the Supertrend Advance Strategy Script:
• Depending on whether you have the script or need to find it, there are two paths:
• If you have the script: Copy the Supertrend Advance Strategy script, and then paste it into the Pine Editor.
• If searching for the script: Click on the “Indicators” icon (looks like a flame) at the top of your screen, and then type “Supertrend Advance Strategy” in the search bar. If available, it will show up in the list. Simply click to add it to your chart.
3. Applying the Strategy:
• After pasting or selecting the Supertrend Advance Strategy in the Pine Editor, click on the “Add to Chart” button located at the top of the editor. This will overlay the strategy onto your main chart window.
4. Configuring Strategy Settings:
• Once the strategy is on your chart, you'll notice a small settings ('gear') icon next to its name in the top-left of the chart window. Click on this to access settings.
• Here, you can adjust various parameters of the Supertrend Advance Strategy to better fit your trading style or the specific asset you're analyzing.
5. Interpreting Signals:
• With the strategy applied, you'll now see buy/sell signals represented on your chart. Take time to familiarize yourself with how these look and behave over various timeframes and market conditions.
3. Strategy Overview
What is the Supertrend Advance Strategy?
The Supertrend Advance Strategy is a refined version of the classic Supertrend Indicator, which was developed to aid traders in spotting market trends. The strategy utilizes a combination of data points, including average true range (ATR) and price momentum, to generate buy and sell signals.
In essence, the Supertrend Advance Strategy can be visualized as a line that moves with the price. When the price is above the Supertrend line, it indicates an uptrend and suggests a potential buy position. Conversely, when the price is below the Supertrend line, it hints at a downtrend, suggesting a potential selling point.
Strategy Goals and Objectives:
1. Trend Identification: At the core of the Supertrend Advance Strategy is the goal to efficiently and consistently identify prevailing market trends. By recognizing these trends, traders can position themselves to capitalize on price movements in their favor.
2. Reducing Noise: Financial markets are often inundated with 'noise' - short-term price fluctuations that can mislead traders. The Supertrend Advance Strategy aims to filter out this noise, allowing for clearer decision-making.
3. Enhancing Risk Management: With clear buy and sell signals, traders can set more precise stop-loss and take-profit points. This leads to better risk management and potentially improved profitability.
4. Versatility: While primarily used for trend identification, the strategy can be integrated with other technical tools and indicators to create a comprehensive trading system.
Type of Assets/Markets to Apply the Strategy:
1. Equities: The Supertrend Advance Strategy is highly popular among stock traders. Its ability to capture long-term trends makes it particularly useful for those trading individual stocks or equity indices.
2. Forex: Given the 24-hour nature of the Forex market and its propensity for trends, the Supertrend Advance Strategy is a valuable tool for currency traders.
3. Commodities: Whether it's gold, oil, or agricultural products, commodities often move in extended trends. The strategy can help in identifying and capitalizing on these movements.
4. Cryptocurrencies: The volatile nature of cryptocurrencies means they can have pronounced trends. The Supertrend Advance Strategy can aid crypto traders in navigating these often tumultuous waters.
5. Futures & Options: Traders and investors in derivative markets can utilize the strategy to make more informed decisions about contract entries and exits.
It's important to note that while the Supertrend Advance Strategy can be applied across various assets and markets, its effectiveness might vary based on market conditions, timeframe, and the specific characteristics of the asset in question. As always, it's recommended to use the strategy in conjunction with other analytical tools and to backtest its effectiveness in specific scenarios before committing to trades.
4. Input Settings
Understanding and correctly configuring input settings is crucial for optimizing the Supertrend Advance Strategy for any specific market or asset. These settings, when tweaked correctly, can drastically impact the strategy's performance.
Grouping Inputs:
Before diving into individual input settings, it's important to group similar inputs. Grouping can simplify the user interface, making it easier to adjust settings related to a specific function or indicator.
Strategy Choice:
This input allows traders to select from various strategies that incorporate the Supertrend indicator. Options might include "Supertrend with RSI," "Supertrend with MACD," etc. By choosing a strategy, the associated input settings for that strategy become available.
Supertrend Settings:
1. Multiplier: Typically, a default value of 3 is used. This multiplier is used in the ATR calculation. Increasing it makes the Supertrend line further from prices, while decreasing it brings the line closer.
2. Period: The number of bars used in the ATR calculation. A common default is 7.
EMA Settings (Exponential Moving Average):
1. Period: Defines the number of previous bars used to calculate the EMA. Common periods are 9, 21, 50, and 200.
2. Source: Allows traders to choose which price (Open, Close, High, Low) to use in the EMA calculation.
RSI Settings (Relative Strength Index):
1. Length: Determines how many periods are used for RSI calculation. The standard setting is 14.
2. Overbought Level: The threshold at which the asset is considered overbought, typically set at 70.
3. Oversold Level: The threshold at which the asset is considered oversold, often at 30.
MACD Settings (Moving Average Convergence Divergence):
1. Short Period: The shorter EMA, usually set to 12.
2. Long Period: The longer EMA, commonly set to 26.
3. Signal Period: Defines the EMA of the MACD line, typically set at 9.
CCI Settings (Commodity Channel Index):
1. Period: The number of bars used in the CCI calculation, often set to 20.
2. Overbought Level: Typically set at +100, denoting overbought conditions.
3. Oversold Level: Usually set at -100, indicating oversold conditions.
SL/TP Settings (Stop Loss/Take Profit):
1. SL Multiplier: Defines the multiplier for the average true range (ATR) to set the stop loss.
2. TP Multiplier: Defines the multiplier for the average true range (ATR) to set the take profit.
Filtering Conditions:
This section allows traders to set conditions to filter out certain signals. For example, one might only want to take buy signals when the RSI is below 30, ensuring they buy during oversold conditions.
Trade Direction and Backtest Period:
1. Trade Direction: Allows traders to specify whether they want to take long trades, short trades, or both.
2. Backtest Period: Specifies the time range for backtesting the strategy. Traders can choose from options like 'Last 6 months,' 'Last 1 year,' etc.
It's essential to remember that while default settings are provided for many of these tools, optimal settings can vary based on the market, timeframe, and trading style. Always backtest new settings on historical data to gauge their potential efficacy.
5. Understanding Strategy Conditions
Developing an understanding of the conditions set within a trading strategy is essential for traders to maximize its potential. Here, we delve deep into the logic behind these conditions, using the Supertrend Advance Strategy as our focal point.
Basic Logic Behind Conditions:
Every strategy is built around a set of conditions that provide buy or sell signals. The conditions are based on mathematical or statistical methods and are rooted in the study of historical price data. The fundamental idea is to recognize patterns or behaviors that have been profitable in the past and might be profitable in the future.
Buy and Sell Conditions:
1. Buy Conditions: Usually formulated around bullish signals or indicators suggesting upward price momentum.
2. Sell Conditions: Centered on bearish signals or indicators indicating downward price momentum.
Simple Strategy:
The simple strategy could involve using just the Supertrend indicator. Here:
• Buy: When price closes above the Supertrend line.
• Sell: When price closes below the Supertrend line.
Pullback Strategy:
This strategy capitalizes on price retracements:
• Buy: When the price retraces to the Supertrend line after a bullish signal and is supported by another bullish indicator.
• Sell: When the price retraces to the Supertrend line after a bearish signal and is confirmed by another bearish indicator.
Indicators Used:
EMA (Exponential Moving Average):
• Logic: EMA gives more weight to recent prices, making it more responsive to current price movements. A shorter-period EMA crossing above a longer-period EMA can be a bullish sign, while the opposite is bearish.
RSI (Relative Strength Index):
• Logic: RSI measures the magnitude of recent price changes to analyze overbought or oversold conditions. Values above 70 are typically considered overbought, and values below 30 are considered oversold.
MACD (Moving Average Convergence Divergence):
• Logic: MACD assesses the relationship between two EMAs of a security’s price. The MACD line crossing above the signal line can be a bullish signal, while crossing below can be bearish.
CCI (Commodity Channel Index):
• Logic: CCI compares a security's average price change with its average price variation. A CCI value above +100 may mean the price is overbought, while below -100 might signify an oversold condition.
And others...
As the strategy expands or contracts, more indicators might be added or removed. The crucial point is to understand the core logic behind each, ensuring they align with the strategy's objectives.
Logic Behind Each Indicator:
1. EMA: Emphasizes recent price movements; provides dynamic support and resistance levels.
2. RSI: Indicates overbought and oversold conditions based on recent price changes.
3. MACD: Showcases momentum and direction of a trend by comparing two EMAs.
4. CCI: Measures the difference between a security's price change and its average price change.
Understanding strategy conditions is not just about knowing when to buy or sell but also about comprehending the underlying market dynamics that those conditions represent. As you familiarize yourself with each condition and indicator, you'll be better prepared to adapt and evolve with the ever-changing financial markets.
6. Trade Execution and Management
Trade execution and management are crucial aspects of any trading strategy. Efficient execution can significantly impact profitability, while effective management can preserve capital during adverse market conditions. In this section, we'll explore the nuances of position entry, exit strategies, and various Stop Loss (SL) and Take Profit (TP) methodologies within the Supertrend Advance Strategy.
Position Entry:
Effective trade entry revolves around:
1. Timing: Enter at a point where the risk-reward ratio is favorable. This often corresponds to confirmatory signals from multiple indicators.
2. Volume Analysis: Ensure there's adequate volume to support the movement. Volume can validate the strength of a signal.
3. Confirmation: Use multiple indicators or chart patterns to confirm the entry point. For instance, a buy signal from the Supertrend indicator can be confirmed with a bullish MACD crossover.
Position Exit Strategies:
A successful exit strategy will lock in profits and minimize losses. Here are some strategies:
1. Fixed Time Exit: Exiting after a predetermined period.
2. Percentage-based Profit Target: Exiting after a certain percentage gain.
3. Indicator-based Exit: Exiting when an indicator gives an opposing signal.
Percentage-based SL/TP:
• Stop Loss (SL): Set a fixed percentage below the entry price to limit potential losses.
• Example: A 2% SL on an entry at $100 would trigger a sell at $98.
• Take Profit (TP): Set a fixed percentage above the entry price to lock in gains.
• Example: A 5% TP on an entry at $100 would trigger a sell at $105.
Supertrend-based SL/TP:
• Stop Loss (SL): Position the SL at the Supertrend line. If the price breaches this line, it could indicate a trend reversal.
• Take Profit (TP): One could set the TP at a point where the Supertrend line flattens or turns, indicating a possible slowdown in momentum.
Swing high/low-based SL/TP:
• Stop Loss (SL): For a long position, set the SL just below the recent swing low. For a short position, set it just above the recent swing high.
• Take Profit (TP): For a long position, set the TP near a recent swing high or resistance. For a short position, near a swing low or support.
And other methods...
1. Trailing Stop Loss: This dynamic SL adjusts with the price movement, locking in profits as the trade moves in your favor.
2. Multiple Take Profits: Divide the position into segments and set multiple TP levels, securing profits in stages.
3. Opposite Signal Exit: Exit when another reliable indicator gives an opposite signal.
Trade execution and management are as much an art as they are a science. They require a blend of analytical skill, discipline, and intuition. Regularly reviewing and refining your strategies, especially in light of changing market conditions, is crucial to maintaining consistent trading performance.
7. Visual Representations
Visual tools are essential for traders, as they simplify complex data into an easily interpretable format. Properly analyzing and understanding the plots on a chart can provide actionable insights and a more intuitive grasp of market conditions. In this section, we’ll delve into various visual representations used in the Supertrend Advance Strategy and their significance.
Understanding Plots on the Chart:
Charts are the primary visual aids for traders. The arrangement of data points, lines, and colors on them tell a story about the market's past, present, and potential future moves.
1. Data Points: These represent individual price actions over a specific timeframe. For instance, a daily chart will have data points showing the opening, closing, high, and low prices for each day.
2. Colors: Used to indicate the nature of price movement. Commonly, green is used for bullish (upward) moves and red for bearish (downward) moves.
Trend Lines:
Trend lines are straight lines drawn on a chart that connect a series of price points. Their significance:
1. Uptrend Line: Drawn along the lows, representing support. A break below might indicate a trend reversal.
2. Downtrend Line: Drawn along the highs, indicating resistance. A break above might suggest the start of a bullish trend.
Filled Areas:
These represent a range between two values on a chart, usually shaded or colored. For instance:
1. Bollinger Bands: The area between the upper and lower band is filled, giving a visual representation of volatility.
2. Volume Profile: Can show a filled area representing the amount of trading activity at different price levels.
Stop Loss and Take Profit Lines:
These are horizontal lines representing pre-determined exit points for trades.
1. Stop Loss Line: Indicates the level at which a trade will be automatically closed to limit losses. Positioned according to the trader's risk tolerance.
2. Take Profit Line: Denotes the target level to lock in profits. Set according to potential resistance (for long trades) or support (for short trades) or other technical factors.
Trailing Stop Lines:
A trailing stop is a dynamic form of stop loss that moves with the price. On a chart:
1. For Long Trades: Starts below the entry price and moves up with the price but remains static if the price falls, ensuring profits are locked in.
2. For Short Trades: Starts above the entry price and moves down with the price but remains static if the price rises.
Visual representations offer traders a clear, organized view of market dynamics. Familiarity with these tools ensures that traders can quickly and accurately interpret chart data, leading to more informed decision-making. Always ensure that the visual aids used resonate with your trading style and strategy for the best results.
8. Backtesting
Backtesting is a fundamental process in strategy development, enabling traders to evaluate the efficacy of their strategy using historical data. It provides a snapshot of how the strategy would have performed in past market conditions, offering insights into its potential strengths and vulnerabilities. In this section, we'll explore the intricacies of setting up and analyzing backtest results and the caveats one must be aware of.
Setting Up Backtest Period:
1. Duration: Determine the timeframe for the backtest. It should be long enough to capture various market conditions (bullish, bearish, sideways). For instance, if you're testing a daily strategy, consider a period of several years.
2. Data Quality: Ensure the data source is reliable, offering high-resolution and clean data. This is vital to get accurate backtest results.
3. Segmentation: Instead of a continuous period, sometimes it's helpful to backtest over distinct market phases, like a particular bear or bull market, to see how the strategy holds up in different environments.
Analyzing Backtest Results:
1. Performance Metrics: Examine metrics like the total return, annualized return, maximum drawdown, Sharpe ratio, and others to gauge the strategy's efficiency.
2. Win Rate: It's the ratio of winning trades to total trades. A high win rate doesn't always signify a good strategy; it should be evaluated in conjunction with other metrics.
3. Risk/Reward: Understand the average profit versus the average loss per trade. A strategy might have a low win rate but still be profitable if the average gain far exceeds the average loss.
4. Drawdown Analysis: Review the periods of losses the strategy could incur and how long it takes, on average, to recover.
9. Tips and Best Practices
Successful trading requires more than just knowing how a strategy works. It necessitates an understanding of when to apply it, how to adjust it to varying market conditions, and the wisdom to recognize and avoid common pitfalls. This section offers insightful tips and best practices to enhance the application of the Supertrend Advance Strategy.
When to Use the Strategy:
1. Market Conditions: Ideally, employ the Supertrend Advance Strategy during trending market conditions. This strategy thrives when there are clear upward or downward trends. It might be less effective during consolidative or sideways markets.
2. News Events: Be cautious around significant news events, as they can cause extreme volatility. It might be wise to avoid trading immediately before and after high-impact news.
3. Liquidity: Ensure you are trading in assets/markets with sufficient liquidity. High liquidity ensures that the price movements are more reflective of genuine market sentiment and not due to thin volume.
Adjusting Settings for Different Markets/Timeframes:
1. Markets: Each market (stocks, forex, commodities) has its own characteristics. It's essential to adjust the strategy's parameters to align with the market's volatility and liquidity.
2. Timeframes: Shorter timeframes (like 1-minute or 5-minute charts) tend to have more noise. You might need to adjust the settings to filter out false signals. Conversely, for longer timeframes (like daily or weekly charts), you might need to be more responsive to genuine trend changes.
3. Customization: Regularly review and tweak the strategy's settings. Periodic adjustments can ensure the strategy remains optimized for the current market conditions.
10. Frequently Asked Questions (FAQs)
Given the complexities and nuances of the Supertrend Advance Strategy, it's only natural for traders, both new and seasoned, to have questions. This section addresses some of the most commonly asked questions regarding the strategy.
1. What exactly is the Supertrend Advance Strategy?
The Supertrend Advance Strategy is an evolved version of the traditional Supertrend indicator. It's designed to provide clearer buy and sell signals by incorporating additional indicators like EMA, RSI, MACD, CCI, etc. The strategy aims to capitalize on market trends while minimizing false signals.
2. Can I use the Supertrend Advance Strategy for all asset types?
Yes, the strategy can be applied to various asset types like stocks, forex, commodities, and cryptocurrencies. However, it's crucial to adjust the settings accordingly to suit the specific characteristics and volatility of each asset type.
3. Is this strategy suitable for day trading?
Absolutely! The Supertrend Advance Strategy can be adjusted to suit various timeframes, making it versatile for both day trading and long-term trading. Remember to fine-tune the settings to align with the timeframe you're trading on.
4. How do I deal with false signals?
No strategy is immune to false signals. However, by combining the Supertrend with other indicators and adhering to strict risk management protocols, you can minimize the impact of false signals. Always use stop-loss orders and consider filtering trades with additional confirmation signals.
5. Do I need any prior trading experience to use this strategy?
While the Supertrend Advance Strategy is designed to be user-friendly, having a foundational understanding of trading and market analysis can greatly enhance your ability to employ the strategy effectively. If you're a beginner, consider pairing the strategy with further education and practice on demo accounts.
6. How often should I review and adjust the strategy settings?
There's no one-size-fits-all answer. Some traders adjust settings weekly, while others might do it monthly. The key is to remain responsive to changing market conditions. Regular backtesting can give insights into potential required adjustments.
7. Can the Supertrend Advance Strategy be automated?
Yes, many traders use algorithmic trading platforms to automate their strategies, including the Supertrend Advance Strategy. However, always monitor automated systems regularly to ensure they're operating as intended.
8. Are there any markets or conditions where the strategy shouldn't be used?
The strategy might generate more false signals in markets that are consolidative or range-bound. During significant news events or times of unexpected high volatility, it's advisable to tread with caution or stay out of the market.
9. How important is backtesting with this strategy?
Backtesting is crucial as it allows traders to understand how the strategy would have performed in the past, offering insights into potential profitability and areas of improvement. Always backtest any new setting or tweak before applying it to live trades.
10. What if the strategy isn't working for me?
No strategy guarantees consistent profits. If it's not working for you, consider reviewing your settings, seeking expert advice, or complementing the Supertrend Advance Strategy with other analysis methods. Remember, continuous learning and adaptation are the keys to trading success.
Other comments
Value of combining several indicators in this script and how they work together
Diversification of Signals: Just as diversifying an investment portfolio can reduce risk, using multiple indicators can offer varied perspectives on potential price movements. Each indicator can capture a different facet of the market, ensuring that traders are not overly reliant on a single data point.
Confirmation & Reduced False Signals: A common challenge with many indicators is the potential for false signals. By requiring confirmation from multiple indicators before acting, the chances of acting on a false signal can be significantly reduced.
Flexibility Across Market Conditions: Different indicators might perform better under different market conditions. For example, while moving averages might excel in trending markets, oscillators like RSI might be more useful during sideways or range-bound conditions. A mashup strategy can potentially adapt better to varying market scenarios.
Comprehensive Analysis: With multiple indicators, traders can gauge trend strength, momentum, volatility, and potential market reversals all at once, providing a holistic view of the market.
How do the different indicators in the Supertrend Advance Strategy work together?
Supertrend: This is primarily a trend-following indicator. It provides traders with buy and sell signals based on the volatility of the price. When combined with other indicators, it can filter out noise and give more weight to strong, confirmed trends.
EMA (Exponential Moving Average): EMA gives more weight to recent price data. It can be used to identify the direction and strength of a trend. When the price is above the EMA, it's generally considered bullish, and vice versa.
RSI (Relative Strength Index): An oscillator that measures the magnitude of recent price changes to evaluate overbought or oversold conditions. By cross-referencing with other indicators like EMA or MACD, traders can spot potential reversals or confirmations of a trend.
MACD (Moving Average Convergence Divergence): This indicator identifies changes in the strength, direction, momentum, and duration of a trend in a stock's price. When the MACD line crosses above the signal line, it can be a bullish sign, and when it crosses below, it can be bearish. Pairing MACD with Supertrend can provide dual confirmation of a trend.
CCI (Commodity Channel Index): Initially developed for commodities, CCI can indicate overbought or oversold conditions. It can be used in conjunction with other indicators to determine entry and exit points.
In essence, the synergy of these indicators provides a balanced, comprehensive approach to trading. Each indicator offers its unique lens into market conditions, and when they align, it can be a powerful indication of a trading opportunity. This combination not only reduces the potential drawbacks of each individual indicator but leverages their strengths, aiming for more consistent and informed trading decisions.
Backtesting and Default Settings
• This indicator has been optimized to be applied for 1 hour-charts. However, the underlying principles of this strategy are supply and demand in the financial markets and the strategy can be applied to all timeframes. Daytraders can use the 1min- or 5min charts, swing-traders can use the daily charts.
• This strategy has been designed to identify the most promising, highest probability entries and trades for each stock or other financial security.
• The combination of the qualifiers results in a highly selective strategy which only considers the most promising swing-trading entries. As a result, you will normally only find a low number of trades for each stock or other financial security per year in case you apply this strategy for the daily charts. Shorter timeframes will result in a higher number of trades / year.
• Consequently, traders need to apply this strategy for a full watchlist rather than just one financial security.
• Default properties: RSI on (length 14, RSI buy level 50, sell level 50), EMA, RSI, MACD on, type of strategy pullback, SL/TP type: ATR (length 10, factor 3), trade direction both, quantity 5, take profit swing hl 5.1, highest / lowest lookback 2, enable ATR trail (ATR length 10, SL ATR multiplier 1.4, TP multiplier 2.1, lookback = 4, trade direction = both).
Bollinger Bands StrategyBollinger Bands Strategy :
INTRODUCTION :
This strategy is based on the famous Bollinger Bands. These are constructed using a standard moving average (SMA) and the standard deviation of past prices. The theory goes that 90% of the time, the price is contained between these two bands. If it were to break out, this would mean either a reversal or a continuation. However, when a reversal occurs, the movement is weak, whereas when a continuation occurs, the movement is substantial and profits can be interesting. We're going to use BB to take advantage of this strong upcoming movement, while managing our risks reasonably. There's also a money management method for reinvesting part of the profits or reducing the size of orders in the event of substantial losses.
BOLLINGER BANDS :
The construction of Bollinger bands is straightforward. First, plot the SMA of the price, with a length specified by the user. Then calculate the standard deviation to measure price dispersion in relation to the mean, using this formula :
stdv = (((P1 - avg)^2 + (P2 - avg)^2 + ... + (Pn - avg)^2) / n)^1/2
To plot the two Bollinger bands, we then add a user-defined number of standard deviations to the initial SMA. The default is to add 2. The result is :
Upper_band = SMA + 2*stdv
Lower_band = SMA - 2*stdv
When the price leaves this channel defined by the bands, we obtain buy and sell signals.
PARAMETERS :
BB Length : This is the length of the Bollinger Bands, i.e. the length of the SMA used to plot the bands, and the length of the price series used to calculate the standard deviation. The default is 120.
Standard Deviation Multipler : adds or subtracts this number of times the standard deviation from the initial SMA. Default is 2.
SMA Exit Signal Length : Exit signals for winning and losing trades are triggered by another SMA. This parameter defines the length of this SMA. The default is 110.
Max Risk per trade (in %) : It's the maximum percentage the user can lose in one trade. The default is 6%.
Fixed Ratio : This is the amount of gain or loss at which the order quantity is changed. The default is 400, meaning that for each $400 gain or loss, the order size is increased or decreased by a user-selected amount.
Increasing Order Amount : This is the amount to be added to or subtracted from orders when the fixed ratio is reached. The default is $200, which means that for every $400 gain, $200 is reinvested in the strategy. On the other hand, for every $400 loss, the order size is reduced by $200.
Initial capital : $1000
Fees : Interactive Broker fees apply to this strategy. They are set at 0.18% of the trade value.
Slippage : 3 ticks or $0.03 per trade. Corresponds to the latency time between the moment the signal is received and the moment the order is executed by the broker.
Important : A bot has been used to test the different parameters and determine which ones maximize return while limiting drawdown. This strategy is the most optimal on BITSTAMP:BTCUSD in 8h timeframe with the following parameters :
BB Length = 120
Standard Deviation Multipler = 2
SMA Exit Signal Length = 110
Max Risk per trade (in %) = 6%
ENTER RULES :
The entry rules are simple:
If close > Upper_band it's a LONG signal
If close < Lower_band it's a SHORT signal
EXIT RULES :
If we are LONG and close < SMA_EXIT, position is closed
If we are SHORT and close > SMA_EXIT, the position is closed
Positions close automatically if they lose more than 6% to limit risk
RISK MANAGEMENT :
This strategy is subject to losses. We manage our risk using the exit SMA or using a SL sets to 6%. This SMA gives us exit signals when the price closes below or above, thus limiting losses. If the signal arrives too late, the position is closed after a loss of 6%.
MONEY MANAGEMENT :
The fixed ratio method was used to manage our gains and losses. For each gain of an amount equal to the fixed ratio value, we increase the order size by a value defined by the user in the "Increasing order amount" parameter. Similarly, each time we lose an amount equal to the value of the fixed ratio, we decrease the order size by the same user-defined value. This strategy increases both performance and drawdown.
NOTE :
Please note that the strategy is backtested from 2017-01-01. As the timeframe is 8h, this strategy is a medium/long-term strategy. That's why only 51 trades were closed. Be careful, as the test sample is small and performance may not necessarily reflect what may happen in the future.
Enjoy the strategy and don't forget to take the trade :)
[blackcat] L2 Fibonacci BandsThe concept of the Fibonacci Bands indicator was described by Suri Dudella in his book "Trade Chart Patterns Like the Pros" (Section 8.3, page 149). These bands are derived from Fibonacci expansions based on a fixed moving average, and they display potential areas of support and resistance. Traders can utilize the Fibonacci Bands indicator to identify key price levels and anticipate potential reversals in the market.
To calculate the Fibonacci Bands indicator, three Keltner Channels are applied. These channels help in determining the upper and lower boundaries of the bands. The default Fibonacci expansion levels used are 1.618, 2.618, and 4.236. These levels act as reference points for traders to identify significant areas of support and resistance.
When analyzing the price action, traders can focus on the extreme Fibonacci Bands, which are the upper and lower boundaries of the bands. If prices trade outside of the bands for a few bars and then return inside, it may indicate a potential reversal. This pattern suggests that the price has temporarily deviated from its usual range and could be due for a correction.
To enhance the accuracy of the Fibonacci Bands indicator, traders often use multiple time frames. By aligning short-term signals with the larger time frame scenario, traders can gain a better understanding of the overall market trend. It is generally advised to trade in the direction of the larger time frame to increase the probability of success.
In addition to identifying potential reversals, traders can also use the Fibonacci Bands indicator to determine entry and exit points. Short-term support and resistance levels can be derived from the bands, providing valuable insights for trade decision-making. These levels act as reference points for placing stop-loss orders or taking profits.
Another useful tool for analyzing the trend is the slope of the midband, which is the middle line of the Fibonacci Bands indicator. The midband's slope can indicate the strength and direction of the trend. Traders can monitor the slope to gain insights into the market's momentum and make informed trading decisions.
The Fibonacci Bands indicator is based on the concept of Fibonacci levels, which are support or resistance levels calculated using the Fibonacci sequence. The Fibonacci sequence is a mathematical pattern that follows a specific formula. A central concept within the Fibonacci sequence is the Golden Ratio, represented by the numbers 1.618 and its inverse 0.618. These ratios have been found to occur frequently in nature, architecture, and art.
The Italian mathematician Leonardo Fibonacci (1170-1250) is credited with introducing the Fibonacci sequence to the Western world. Fibonacci noticed that certain ratios could be calculated and that these ratios correspond to "divine ratios" found in various aspects of life. Traders have adopted these ratios in technical analysis to identify potential areas of support and resistance in financial markets.
In conclusion, the Fibonacci Bands indicator is a powerful tool for traders to identify potential reversals, determine entry and exit points, and analyze the overall trend. By combining the Fibonacci Bands with other technical indicators and using multiple time frames, traders can enhance their trading strategies and make more informed decisions in the market.
2Mars - MA / BB / SuperTrend
The 2Mars strategy is a trading approach that aims to improve trading efficiency by incorporating several simple order opening tactics. These tactics include moving average crossovers, Bollinger Bands, and SuperTrend.
Entering a Position with the 2Mars Strategy:
Moving Average Crossover: This method considers the crossing of moving averages as a signal to enter a position.
Price Crossing Bollinger Bands: If the price crosses either the upper or lower Bollinger Band, it is seen as a signal to enter a position.
Price Crossing Moving Average: If the price crosses the moving average, it is also considered a signal to enter a position.
SuperTrend and Bars confirm:
The SuperTrend indicator is used to provide additional confirmation for entering positions and setting stop loss levels. "Bars confirm" is used only for entry to positions.
Moving Average Crossover Strategy:
A moving average crossover refers to the point on a chart where there is a crossover of the signal or fast moving average, above or below the basis or slow moving average. This strategy also uses moving averages for additional orders #3.
Basis Moving Average Length: Ratio * Multiplier
Signal Moving Average Length: Multiplier
Bollinger Bands:
Bollinger Bands consist of three bands: an upper band, a lower band, and a basis moving average. However, the 2Mars strategy incorporates multiple upper and lower levels for position entry and take profit.
Basis +/- StdDev * 0.618
Basis +/- StdDev * 1.618
Basis +/- StdDev * 2.618
Additional Orders:
Additional Order #1 and #2: closing price crosses above or below the Bollinger Bands.
Additional Order #3: closing price crosses above or below the basis or signal moving average.
Take Profit:
The strategy includes three levels for taking profits, which are based on the Bollinger Bands. Additionally, a percentage of the position can be chosen to close long or short positions.
Limit Orders:
The strategy allows for entering a position using a limit order. The calculation for the limit order involves the Average True Range (ATR) for a specific period.
For long positions: Low price - ATR * Multiplier
For short positions: High price + ATR * Multiplier
Stop Loss:
To manage risk, the strategy recommends using stop loss options. The stop loss is updated with each entry order and take-profit level 3. When using the SuperTrend Confirmation, the stop loss requires confirmation of a trend change. It allows for flexible adjustment of the stop loss when the trend changes.
There are three options for setting the stop loss:
1. ATR (Average True Range):
For long positions: Low price - ATR * Long multiplier
For short positions: High price + ATR * Short multiplier
2. SuperTrend + ATR:
For long positions: SuperTrend - ATR * Long multiplier
For short positions: SuperTrend + ATR * Short multiplier
3. StdDev:
For long positions: StdDev - ATR * Long multiplier
For short positions: StdDev + ATR * Short multiplier
Flexible Stop Loss:
There is also a flexible stop loss option for the ATR and StdDev methods. It is triggered when the SuperTrend or moving average trend changes unfavorably.
For long positions: Stop-loss price + (ATR * Long multiplier) * Multiplier
For short positions: Stop-loss price - (ATR * Short multiplier) * Multiplier
How configure:
Disable SuperTrend, take profit, stop loss, additional orders and begin setting up a strategy.
Pick soucre data
Number of bars for confirm
Pick up the ratio of the base moving average and the signal moving average.
Set up a SuperTrend
Time for set up of the Bollinger Bands and the take profit
And finaly set up of stop loss and limit orders
All done!
For OKX exchange:
t.me
RSI Box Strategy (pseudo- Grid Bot)This is a strategy intended primarily for algorithmic traders. It's a pseudo-grid bot that uses a dynamic, volume-weighted grid that only updates when the RSI meets certain conditions. It's also a breakout strategy, whereas normal grid bots are not (typical grid bots sell when a higher grid is reached, whereas this strategy sells when a lower grid is breached under specific conditions). This strategy also sells 100% of pyramiding orders on close.
In a nutshell, the strategy updates its grid to the volume-weighted highest/lowest values of your given source ("src" in the settings) each time that there is a RSI crossunder/crossover. From this range it produces an evenly-spaced grid of five lines, and uses the current source to determine which grid line is closest to the source. Then, if the source crosses over the line directly above the current line, it enters a buy order. If the source crosses under the line directly below the current line, it enters a sell order.
You can configure shorts, source, RSI length, and overbought/oversold levels in the settings.
For the strategy results below: fees are at 0.1% per trade, with order size 1% of equity and a max pyramiding value of 33. For a greater R/R profile, you can increase the order size, which will increase drawdown but potentially yield better results.
2Mars strategy [OKX]The strategy is based on the intersection of two moving averages, which requires adjusting the parameters (ratio and multiplier) for the moving average.
Basis MA length: multiplier * ratio
Signal MA length: multiplier
The SuperTrend indicator is used for additional confirmation of entry into a position.
Bollinger Bands and position reversal are used for take-profit.
About stop loss:
If activated, the stop loss price will be updated on every entry.
Basic setup:
Additional:
Alerts for OKX:
Keltner Channel Strategy with Golden CrossOnly trade with the trend.
This Keltner Channel-based strategy that will only enter into a trade if the signal of the Keltner Channel agrees with a moving average crossover as defined by the user.
Long Position Entries
2 Conditions must be present
1. There must be a Golden Cross (lower period moving average is above higher period moving average). ex 50 period MA > 200 period MA.
2. Price must cross above the Keltner Channel ATR defined by the user.
Short Position Entries
2 Conditions must be present
1. There must be a Death Cross (lower period moving average is below higher period moving average). ex 50 period MA < 200 period MA.
2. Price must cross below the Keltner Channel ATR defined by the user
Closing Trades:
The strategy closes trades as follows:
1. Price crossing the Keltner Channel's Take Profit ATR (defined by User)
2. Price crossing the Keltner Channel's Stop Loss ATR (defined by User)
IU Break of any session StrategyHow this script works:
1. This script is an intraday trading strategy script which buy and sell on the bases of user-defined intraday session range breakout and gives alert(if the alert is set) message too when the new position is open.
2. It calculate the session as per the user inputs or user defined custom session.
3. The script stores the highest and lowest value of the whole session.
4. It take a long position on the first break and close above the highest value.
5. It take a short position on the break and close below the lowest value.
6. The script takes one position in one day.
7. The stop loss for this script is the previous low(if long) or high(if short).
8. Take profit is 1:2 and it's adjustable.
9. This script work on every kind of market.
How The Useful For The User :
1. User can backtest any session range breakout he wants to trade.
2. User can get alert when the new position is open.
3. User can change the Risk to Reward in order to find the best Risk to Reward.
4. User can see the highest and lowest value of the session with respect to analyzing his trading objective.
5. This strategy script highlights which session range breakout performs best and which performs worst.
Nifty 50 5mint Strategy
The script defines a specific trading session based on user inputs. This session is specified by a time range (e.g., "1000-1510") and selected days of the week (e.g., Monday to Friday). This session definition is crucial for trading only during specific times.
Lookback and Breakout Conditions:
The script uses a lookback period and the highest high and lowest low values to determine potential breakout points. The lookback period is user-defined (default is 10 periods).
The script also uses Bollinger Bands (BB) to identify potential breakout conditions. Users can enable or disable BB crossover conditions. BB consists of an upper and lower band, with the basis.
Additionally, the script uses Dema (Double Exponential Moving Average) and VWAP (Volume Weighted Average Price) . Users can enable or disable this condition.
Buy and Sell Conditions:
Buy conditions are met when the close price exceeds the highest high within the specified lookback period, Bollinger Bands conditions are satisfied, Dema-VWAP conditions are met, and the script is within the defined trading session.
Sell conditions are met when the close price falls below the lowest low within the lookback period, Bollinger Bands conditions are satisfied, Dema-VWAP conditions are met, and the script is within the defined trading session.
When either condition is met, it triggers a "long" or "short" position entry.
Trailing Stop Loss (TSL):
Users can choose between fixed points ( SL by points ) or trailing stop (Profit Trail).
For fixed points, users specify the number of points for the stop loss. A fixed stop loss is set at a certain distance from the entry price if a position is opened.
For Profit Trail, users can enable or disable this feature. If enabled, the script uses a "trail factor" (lookback period) to determine when to adjust the stop loss.
If the price moves in the direction of the trade and reaches a certain level (determined by the trail factor), the stop loss is adjusted, trailing behind the price to lock in profits.
If the close price falls below a certain level (lowest low within the trail factor(lookback)), and a position is open, the "long" position is closed (strategy.close("long")).
If the close price exceeds a certain level (highest high within the specified trail factor(lookback)), and a position is open, the "short" position is closed (strategy.close("short")).
Positions are also closed if they are open outside of the defined trading session.
Background Color:
The script changes the background color of the chart to indicate buy (green) and sell (red) signals, making it visually clear when the strategy conditions are met.
In summary, this script implements a breakout trading strategy with various customizable conditions, including Bollinger Bands, Dema-VWAP crossovers, and session-specific rules. It also includes options for setting stop losses and trailing stop losses to manage risk and lock in profits. The "trail factor" helps adjust trailing stops dynamically based on recent price movements. Positions are closed under certain conditions to manage risk and ensure compliance with the defined trading session.
CE=Buy, CE_SL=stoploss_buy, tCsl=Trailing Stop_buy.
PE=sell, PE_SL= stoploss_sell, tpsl=Trailing Stop_sell.
Remember that trading involves inherent risks, and past performance is not indicative of future results. Exercise caution, manage risk diligently, and consider the advice of financial experts when using this script or any trading strategy.