RSI Trend Following StrategyOverview
The RSI Trend Following Strategy utilizes Relative Strength Index (RSI) to enter the trade for the potential trend continuation. It uses Stochastic indicator to check is the price is not in overbought territory and the MACD to measure the current price momentum. Moreover, it uses the 200-period EMA to filter the counter trend trades with the higher probability. The strategy opens only long trades.
Unique Features
Dynamic stop-loss system: Instead of fixed stop-loss level strategy utilizes average true range (ATR) multiplied by user given number subtracted from the position entry price as a dynamic stop loss level.
Configurable Trading Periods: Users can tailor the strategy to specific market windows, adapting to different market conditions.
Two layers trade filtering system: Strategy utilizes MACD and Stochastic indicators measure the current momentum and overbought condition and use 200-period EMA to filter trades against major trend.
Trailing take profit level: After reaching the trailing profit activation level script activates the trailing of long trade using EMA. More information in methodology.
Wide opportunities for strategy optimization: Flexible strategy settings allows users to optimize the strategy entries and exits for chosen trading pair and time frame.
Methodology
The strategy opens long trade when the following price met the conditions:
RSI is above 50 level.
MACD line shall be above the signal line
Both lines of Stochastic shall be not higher than 80 (overbought territory)
Candle’s low shall be above the 200 period EMA
When long trade is executed, strategy set the stop-loss level at the price ATR multiplied by user-given value below the entry price. This level is recalculated on every next candle close, adjusting to the current market volatility.
At the same time strategy set up the trailing stop validation level. When the price crosses the level equals entry price plus ATR multiplied by user-given value script starts to trail the price with trailing EMA(by default = 20 period). If price closes below EMA long trade is closed. When the trailing starts, script prints the label “Trailing Activated”.
Strategy settings
In the inputs window user can setup the following strategy settings:
ATR Stop Loss (by default = 1.75)
ATR Trailing Profit Activation Level (by default = 2.25)
MACD Fast Length (by default = 12, period of averaging fast MACD line)
MACD Fast Length (by default = 26, period of averaging slow MACD line)
MACD Signal Smoothing (by default = 9, period of smoothing MACD signal line)
Oscillator MA Type (by default = EMA, available options: SMA, EMA)
Signal Line MA Type (by default = EMA, available options: SMA, EMA)
RSI Length (by default = 14, period for RSI calculation)
Trailing EMA Length (by default = 20, period for EMA, which shall be broken close the trade after trailing profit activation)
Justification of Methodology
This trading strategy is designed to leverage a combination of technical indicators—Relative Strength Index (RSI), Moving Average Convergence Divergence (MACD), Stochastic Oscillator, and the 200-period Exponential Moving Average (EMA)—to determine optimal entry points for long trades. Additionally, the strategy uses the Average True Range (ATR) for dynamic risk management to adapt to varying market conditions. Let's look in details for which purpose each indicator is used for and why it is used in this combination.
Relative Strength Index (RSI) is a momentum indicator used in technical analysis to measure the speed and change of price movements in a financial market. It helps traders identify whether an asset is potentially overbought (overvalued) or oversold (undervalued), which can indicate a potential reversal or continuation of the current trend.
How RSI Works? RSI tracks the strength of recent price changes. It compares the average gains and losses over a specific period (usually 14 periods) to assess the momentum of an asset. Average gain is the average of all positive price changes over the chosen period. It reflects how much the price has typically increased during upward movements. Average loss is the average of all negative price changes over the same period. It reflects how much the price has typically decreased during downward movements.
RSI calculates these average gains and losses and compares them to create a value between 0 and 100. If the RSI value is above 70, the asset is generally considered overbought, meaning it might be due for a price correction or reversal downward. Conversely, if the RSI value is below 30, the asset is considered oversold, suggesting it could be poised for an upward reversal or recovery. RSI is a useful tool for traders to determine market conditions and make informed decisions about entering or exiting trades based on the perceived strength or weakness of an asset's price movements.
This strategy uses RSI as a short-term trend approximation. If RSI crosses over 50 it means that there is a high probability of short-term trend change from downtrend to uptrend. Therefore RSI above 50 is our first trend filter to look for a long position.
The MACD (Moving Average Convergence Divergence) is a popular momentum and trend-following indicator used in technical analysis. It helps traders identify changes in the strength, direction, momentum, and duration of a trend in an asset's price.
The MACD consists of three components:
MACD Line: This is the difference between a short-term Exponential Moving Average (EMA) and a long-term EMA, typically calculated as: MACD Line = 12 period EMA − 26 period EMA
Signal Line: This is a 9-period EMA of the MACD Line, which helps to identify buy or sell signals. When the MACD Line crosses above the Signal Line, it can be a bullish signal (suggesting a buy); when it crosses below, it can be a bearish signal (suggesting a sell).
Histogram: The histogram shows the difference between the MACD Line and the Signal Line, visually representing the momentum of the trend. Positive histogram values indicate increasing bullish momentum, while negative values indicate increasing bearish momentum.
This strategy uses MACD as a second short-term trend filter. When MACD line crossed over the signal line there is a high probability that uptrend has been started. Therefore MACD line above signal line is our additional short-term trend filter. In conjunction with RSI it decreases probability of following false trend change signals.
The Stochastic Indicator is a momentum oscillator that compares a security's closing price to its price range over a specific period. It's used to identify overbought and oversold conditions. The indicator ranges from 0 to 100, with readings above 80 indicating overbought conditions and readings below 20 indicating oversold conditions.
It consists of two lines:
%K: The main line, calculated using the formula (CurrentClose−LowestLow)/(HighestHigh−LowestLow)×100 . Highest and lowest price taken for 14 periods.
%D: A smoothed moving average of %K, often used as a signal line.
This strategy uses stochastic to define the overbought conditions. The logic here is the following: we want to avoid long trades in the overbought territory, because when indicator reaches it there is a high probability that the potential move is gonna be restricted.
The 200-period EMA is a widely recognized indicator for identifying the long-term trend direction. The strategy only trades in the direction of this primary trend to increase the probability of successful trades. For instance, when the price is above the 200 EMA, only long trades are considered, aligning with the overarching trend direction.
Therefore, strategy uses combination of RSI and MACD to increase the probability that price now is in short-term uptrend, Stochastic helps to avoid the trades in the overbought (>80) territory. To increase the probability of opening long trades in the direction of a main trend and avoid local bounces we use 200 period EMA.
ATR is used to adjust the strategy risk management to the current market volatility. If volatility is low, we don’t need the large stop loss to understand the there is a high probability that we made a mistake opening the trade. User can setup the settings ATR Stop Loss and ATR Trailing Profit Activation Level to realize his own risk to reward preferences, but the unique feature of a strategy is that after reaching trailing profit activation level strategy is trying to follow the trend until it is likely to be finished instead of using fixed risk management settings. It allows sometimes to be involved in the large movements.
Backtest Results
Operating window: Date range of backtests is 2023.01.01 - 2024.08.01. It is chosen to let the strategy to close all opened positions.
Commission and Slippage: Includes a standard Binance commission of 0.1% and accounts for possible slippage over 5 ticks.
Initial capital: 10000 USDT
Percent of capital used in every trade: 30%
Maximum Single Position Loss: -3.94%
Maximum Single Profit: +15.78%
Net Profit: +1359.21 USDT (+13.59%)
Total Trades: 111 (36.04% win rate)
Profit Factor: 1.413
Maximum Accumulated Loss: 625.02 USDT (-5.85%)
Average Profit per Trade: 12.25 USDT (+0.40%)
Average Trade Duration: 40 hours
These results are obtained with realistic parameters representing trading conditions observed at major exchanges such as Binance and with realistic trading portfolio usage parameters.
How to Use
Add the script to favorites for easy access.
Apply to the desired timeframe and chart (optimal performance observed on 2h BTC/USDT).
Configure settings using the dropdown choice list in the built-in menu.
Set up alerts to automate strategy positions through web hook with the text: {{strategy.order.alert_message}}
Disclaimer:
Educational and informational tool reflecting Skyrex commitment to informed trading. Past performance does not guarantee future results. Test strategies in a simulated environment before live implementation
Indicatori e strategie
Intramarket Difference Index StrategyIntramarket Difference Indicator (IDI) Strategy:
In layman’s terms this strategy compares two indicators across (correlated) markets and exploits their differences.
📍 Import Notes:
This Strategy calculates trade position size independently, this means that the ‘Order size’ input in the ‘Properties’ tab will have no effect on the strategy. Why ? because this allows us to define custom position size algorithms which we can use to improve our risk management and equity growth over time. Here we have the option to have fixed quantity or fixed percentage of equity ATR (Average True Range) based stops in addition to the turtle trading position size algorithm.
‘Pyramiding’ does not work for this strategy’, similar to the order size input togeling this input will have no effect on the strategy as the strategy explicitly defines the maximum order size to be 1.
This strategy is not perfect, and as of writing of this post I have not traded this algo.
Always take your time to backtests and debug the strategy.
🔷 The IDI Strategy:
By default this strategy pulls data from your current TV chart and then compares it to the base market, be default BINANCE:BTCUSD . The strategy pulls SMA and RSI data from either market (we call this the difference data), standardizes the data (solving the different unit problem across markets) such that it is comparable and then differentiates the data, calling the result of this transformation and difference the Intramarket Difference (ID). The formula for the the ID is
ID = market1_diff_data - market2_diff_data (1)
Where
market(i)_diff_data = diff_data / ATR(j)_market(i)^0.5,
where i = {1, 2} and j = the natural numbers excluding 0
Formula (1) interpretation is the following
When ID > 0: this means the current market outperforms the base market
When ID = 0: Markets are at long run equilibrium
When ID < 0: this means the current market underperforms the base market
To form the strategy we define one of two strategy type’s which are Trend and Mean Revesion respectively.
🔸 Trend Case:
Given the ‘‘Strategy Type’’ is equal to TREND we define a threshold for which if the ID crosses over we go long and if the ID crosses under the negative of the threshold we go short.
The motivating idea is that the ID is an indicator of the two symbols being out of sync, and given we know volatility clustering, momentum and mean reversion of anomalies to be a stylised fact of financial data we can construct a trading premise. Let's first talk more about this premise.
For some markets (cryptocurrency markets - synthetic symbols in TV) the stylised fact of momentum is true, this means that higher momentum is followed by higher momentum, and given we know momentum to be a vector quantity (with magnitude and direction) this momentum can be both positive and negative i.e. when the ID crosses above some threshold we make an assumption it will continue in that direction for some time before executing back to its long run equilibrium of 0 which is a reasonable assumption to make if the market are correlated. For example for the BTCUSD - ETHUSD pair, if the ID > +threshold (inputs for MA and RSI based ID thresholds are found under the ‘‘INTRAMARKET DIFFERENCE INDEX’’ group’), ETHUSD outperforms BTCUSD, we assume the momentum to continue so we go long ETHUSD.
In the standard case we would exit the market when the IDI returns to its long run equilibrium of 0 (for the positive case the ID may return to 0 because ETH’s difference data may have decreased or BTC’s difference data may have increased). However in this strategy we will not define this as our exit condition, why ?
This is because we want to ‘‘let our winners run’’, to achieve this we define a trailing Donchian Channel stop loss (along with a fixed ATR based stop as our volatility proxy). If we were too use the 0 exit the strategy may print a buy signal (ID > +threshold in the simple case, market regimes may be used), return to 0 and then print another buy signal, and this process can loop may times, this high trade frequency means we fail capture the entire market move lowering our profit, furthermore on lower time frames this high trade frequencies mean we pay more transaction costs (due to price slippage, commission and big-ask spread) which means less profit.
Note it is possible that after printing a buy the strategy then prints many sell signals before returning to a buy, which again has the same implications. The image below showcases the theory above, by allowing our winner to run we may capture more profit.
Valid trades are denoted by solid green and red arrows respectively and all other valid trades which occur within the original signal are light green and red small arrows, if we were to close our trades when the IDI returns to its equilibrium of 0 our average bars per trade would be very low and we would not capture the general trend.
Note by capturing the sum of many momentum moves we are essentially following the trend hence the trend following strategy type.
Here we also print the IDI (with default strategy settings with the MA difference type), we can see that by letting our winners run we may catch many valid momentum moves, that results in a larger final pnl that if we would otherwise exit based on the equilibrium condition.
Note if you would like to plot the IDI separately copy and paste the following code in a new Pine Script indicator template.
indicator("IDI")
// INTRAMARKET INDEX
var string g_idi = "intramarket diffirence index"
ui_index_1 = input.symbol("BINANCE:BTCUSD", title = "Base market", group = g_idi)
// ui_index_2 = input.symbol("BINANCE:ETHUSD", title = "Quote Market", group = g_idi)
type = input.string("MA", title = "Differrencing Series", options = , group = g_idi)
ui_ma_lkb = input.int(24, title = "lookback of ma and volatility scaling constant", group = g_idi)
ui_rsi_lkb = input.int(14, title = "Lookback of RSI", group = g_idi)
ui_atr_lkb = input.int(300, title = "ATR lookback - Normalising value", group = g_idi)
ui_ma_threshold = input.float(5, title = "Threshold of Upward/Downward Trend (MA)", group = g_idi)
ui_rsi_threshold = input.float(20, title = "Threshold of Upward/Downward Trend (RSI)", group = g_idi)
//>>+----------------------------------------------------------------+}
// CUSTOM FUNCTIONS |
//<<+----------------------------------------------------------------+{
// construct UDT (User defined type) containing the IDI (Intramarket Difference Index) source values
// UDT will hold many variables / functions grouped under the UDT
type functions
float Close // close price
float ma // ma of symbol
float rsi // rsi of the asset
float atr // atr of the asset
// the security data
getUDTdata(symbol, malookback, rsilookback, atrlookback) =>
indexHighTF = barstate.isrealtime ? 1 : 0
= request.security(symbol, timeframe = timeframe.period,
expression = [close , // Instentiate UDT variables
ta.sma(close, malookback) ,
ta.rsi(close, rsilookback) ,
ta.atr(atrlookback) ])
data = functions.new(close_, ma_, rsi_, atr_)
data
// Intramerket Difference Index
idi(type, symbol1, malookback, rsilookback, atrlookback, mathreshold, rsithreshold) =>
threshold = float(na)
index1 = getUDTdata(symbol1, malookback, rsilookback, atrlookback)
index2 = getUDTdata(syminfo.tickerid, malookback, rsilookback, atrlookback)
// declare difference variables for both base and quote symbols, conditional on which difference type is selected
var diffindex1 = 0.0, var diffindex2 = 0.0,
// declare Intramarket Difference Index based on series type, note
// if > 0, index 2 outpreforms index 1, buy index 2 (momentum based) until equalibrium
// if < 0, index 2 underpreforms index 1, sell index 1 (momentum based) until equalibrium
// for idi to be valid both series must be stationary and normalised so both series hae he same scale
intramarket_difference = 0.0
if type == "MA"
threshold := mathreshold
diffindex1 := (index1.Close - index1.ma) / math.pow(index1.atr*malookback, 0.5)
diffindex2 := (index2.Close - index2.ma) / math.pow(index2.atr*malookback, 0.5)
intramarket_difference := diffindex2 - diffindex1
else if type == "RSI"
threshold := rsilookback
diffindex1 := index1.rsi
diffindex2 := index2.rsi
intramarket_difference := diffindex2 - diffindex1
//>>+----------------------------------------------------------------+}
// STRATEGY FUNCTIONS CALLS |
//<<+----------------------------------------------------------------+{
// plot the intramarket difference
= idi(type,
ui_index_1,
ui_ma_lkb,
ui_rsi_lkb,
ui_atr_lkb,
ui_ma_threshold,
ui_rsi_threshold)
//>>+----------------------------------------------------------------+}
plot(intramarket_difference, color = color.orange)
hline(type == "MA" ? ui_ma_threshold : ui_rsi_threshold, color = color.green)
hline(type == "MA" ? -ui_ma_threshold : -ui_rsi_threshold, color = color.red)
🔸 Mean Reversion Case:
We stated prior that mean reversion of anomalies is an standerdies fact of financial data, how can we exploit this ?
We exploit this by normalizing the ID by applying the Ehlers fisher transformation. We now assume our series is approximately normally distributed. To form the strategy we employ the same logic as for e the z score, if the FT normalized ID >< 2.5 or -2.5 respectively we buy or short respectively. We also employ the same exit conditions (fixed ATR stop and trailing Donchian Trailing stop)
🔷 Position Sizing:
If ‘‘Fixed Risk From Initial Balance’’ is toggled true this means we risk a fixed percentage of our initial balance, if false we risk a fixed percentage of our equity (current balance).
Note we also employ a volatility adjusted position sizing formula, the turtle training method which is defined as follows.
Turtle position size = (1/ r * ATR * DV) * C
Where,
r = risk factor coefficient (default is 20)
ATR(j) = risk proxy, over j times steps
DV = Dollar Volatility, where DV = (1/Asset Price) * Capital at Risk
🔷 Risk Management:
Correct money management means we can limit risk and increase reward (theoretically). Here we employ
Max loss and gain per day
Max loss per trade
Max number of consecutive losing trades until trade skip
To read more see the tooltips (info circle).
Note the ATR stop losses and take profits are defined, with the prior being default.
ATR SL and TP defined
🔷 Hurst Regime (Regime Filter):
The Hurst Exponent (H) aims to segment the market into three different states, Trending (H > 0.5), Random Geometric Brownian Motion (H = 0.5) and Mean Reverting / Contrarian (H < 0.5). In my interpretation this can be used as a trend filter that eliminates market noise.
We utilize the trending and mean reverting based states, as extra conditions required for valid trades both strategy types respectively, in the process increasing our trade entry quality.
🔷 Example model Architecture:
Here is an example of one configuration of this strategy, combining all aspect discussed in this post.
VRS (Vegas Reversal Strategy)It is based on the reversal of the price after an accentuated volatility of the previous day. It is tested only on BTC, TF Day, and has an activation value equal to a spike of minimum 2.4% amplitude, a value that I have left in the settings free to be modified if it is found valid for other assets.
In the settings you can change how many of the latest longs or shorts I want to view in the past, colors and various aesthetics.
When the system detects a spike at the end of the day from 2.4% onwards it will signal the direction of Reversal, generating the 3 TP, dotted lines.
Entry into the market must be done at the close of the candle day, unfortunately at night time if you want to enter on the tick.
Stop above/below the spike that generated the condition.
If the Day2 candle closes FULL inside the spike, immediate and early closing of the operation.
There cannot be two consecutive Day events: if you are Long or Short and have taken a stop on the next candle, even if the latter generates another entry, this must not be activated.
TP 1 and 2 are both mandatory at 33% of the position, TP3, based on the current movement, can be considered to be left to run to the bitter end or in any case to structuring confirmations of a slowdown in the price.
Upon reaching TP1 it is mandatory to move the STOP to even.
In the event of the presence of extremely strong directional movements, for example Long direction, an opposite activation, Short, must be done but with reduced capital, on the contrary an activation in the same direction as the trend movement can be done with a surcharge. Always pay attention to Money Management and Risk Management.
Always manage Risk and Money Management in an adequate, technical and sustainable manner in relation to your capital. A fair exposure per transaction is between 1% and 2% of the capital.
Signal Tester (v1.2)This is an automation test Strategy, which helps you to get Strategy Alerts quickly on the 1m chart.
This is useful when you want to start automating Strategies but first you want to see if the connection between TradingView and your automation tool works properly.
This Strategy sends LONG Buy/Sell signals every 1 minute so you don't have to wait for a long time to see if your integration with an automation tool works.
How it works:
It works on the 1m chart
Every 1 minute it will send a BUY or a SELL signal (alternating between them forever)
Trend Signals with TP & SL [UAlgo] StrategyThe "Trend Signals with TP & SL Strategy" is a trading strategy designed to capture trend continuation signals while incorporating sophisticated risk management techniques. This strategy is tailored for traders who wish to capitalize on trending market conditions with precise entry and exit points, automatically calculating Take Profit (TP) and Stop Loss (SL) levels based on either Average True Range (ATR) or percentage values. The strategy aims to enhance trade management by preventing multiple simultaneous positions and dynamically adapting to changing market conditions.
This strategy is highly configurable, allowing traders to adjust sensitivity, the ATR calculation method, and the cloud moving average length. Additionally, the strategy can display buy and sell signals directly on the chart, along with visual representation of entry points, stop losses, and take profits. It also features a cloud-based trend analysis using a MACD-driven color fill that indicates the strength and direction of the trend.
🔶 Key Features
Configurable Trend Continuation Signals:
Source Selection: The strategy uses the midpoint of the high-low range as the default source, but it is adjustable.
Sensitivity: The sensitivity of the trend signals can be adjusted using a multiplier, ranging from 0.5 to 5.
ATR Calculation: The strategy allows users to choose between two ATR calculation methods for better adaptability to different market conditions.
Cloud Moving Average: Traders can adjust the cloud moving average length, which is used in conjunction with MACD to provide a visual trend indication.
Take Profit & Stop Loss Management:
ATR-Based or Percent-Based: The strategy offers flexibility in setting TP and SL levels, allowing traders to choose between ATR-based multipliers or fixed percentage values.
Dynamic Adjustment: TP and SL levels are dynamically adjusted according to the selected method, ensuring trades are managed based on real-time market conditions.
Prevention of Multiple Positions:
Single Position Control: To reduce risk and enhance strategy reliability, the strategy includes an option to prevent multiple positions from being opened simultaneously.
Visual Trade Indicators:
Buy/Sell Signals: Clearly displays buy and sell signals on the chart for easy interpretation.
Entry, SL, and TP Lines: Draws lines for entry price, stop loss, and take profit directly on the chart, helping traders to monitor trades visually.
Trend Cloud: A color-filled cloud based on MACD and the cloud moving average provides a visual cue of the trend’s direction and strength.
Performance Summary Table:
In-Chart Statistics: A table in the top right of the chart displays key performance metrics, including total trades, wins, losses, and win rate percentage, offering a quick overview of the strategy’s effectiveness.
🔶 Interpreting the Indicator
Trend Signals: The strategy identifies trend continuation signals based on price action relative to an ATR-based threshold. A buy signal is generated when the price crosses above a key level, indicating an uptrend. Conversely, a sell signal occurs when the price crosses below a level, signaling a downtrend.
Cloud Visualization: The cloud, derived from MACD and moving averages, changes color to reflect the current trend. A positive cloud in aqua suggests an uptrend, while a red cloud indicates a downtrend. The transparency of the cloud offers further nuance, with more solid colors denoting stronger trends.
Entry and Exit Management: Once a trend signal is generated, the strategy automatically sets TP and SL levels based on your chosen method (ATR or percentage). The stop loss and take profit lines will appear on the chart, showing where the strategy will exit the trade. If the price reaches either the SL or TP, the trade is closed, and the respective line is deleted from the chart.
Performance Metrics: The strategy’s performance is tracked in real-time with an in-chart table. This table provides essential information about the number of trades executed, the win/loss ratio, and the overall win rate. This information helps traders assess the strategy's effectiveness and make necessary adjustments.
This strategy is designed for those who seek to engage with trending markets, offering robust tools for entry, exit, and overall trade management. By understanding and leveraging these features, traders can potentially improve their trading outcomes and risk management.
🔷 Related Script
🔶 Disclaimer
Use with Caution: This indicator is provided for educational and informational purposes only and should not be considered as financial advice. Users should exercise caution and perform their own analysis before making trading decisions based on the indicator's signals.
Not Financial Advice: The information provided by this indicator does not constitute financial advice, and the creator (UAlgo) shall not be held responsible for any trading losses incurred as a result of using this indicator.
Backtesting Recommended: Traders are encouraged to backtest the indicator thoroughly on historical data before using it in live trading to assess its performance and suitability for their trading strategies.
Risk Management: Trading involves inherent risks, and users should implement proper risk management strategies, including but not limited to stop-loss orders and position sizing, to mitigate potential losses.
No Guarantees: The accuracy and reliability of the indicator's signals cannot be guaranteed, as they are based on historical price data and past performance may not be indicative of future results.
PVT Crossover Strategy**Release Notes**
**Strategy Name**: PVT Crossover Strategy
**Purpose**: This strategy aims to capture entry and exit points in the market using the Price-Volume Trend (PVT) and its Exponential Moving Average (EMA). It specifically uses the crossover of PVT with its EMA as signals to identify changes in market trends.
**Uniqueness and Usefulness**
**Uniqueness**: This strategy is unique in its use of the PVT indicator, which combines price changes with trading volume to track trends. The filtering with EMA reduces noise and provides more accurate signals compared to other indicators.
**Usefulness**: This strategy is effective for traders looking to detect trend changes early. The signals based on PVT and its EMA crossover work particularly well in markets where volume fluctuations are significant.
**Entry Conditions**
**Long Entry**:
- **Condition**: A crossover occurs where PVT crosses above its EMA.
- **Signal**: A buy signal is generated, indicating a potential uptrend.
**Short Entry**:
- **Condition**: A crossunder occurs where PVT crosses below its EMA.
- **Signal**: A sell signal is generated, indicating a potential downtrend.
**Exit Conditions**
**Exit Strategy**:
- The strategy does not explicitly program exit conditions beyond the entry signals, but traders are encouraged to close positions manually based on signals or apply their own risk management strategy.
**Risk Management**
This strategy does not include default risk management rules, so traders should implement their own. Consider using trailing stops or fixed stop losses to manage risk.
**Account Size**: ¥100,000
**Commissions and Slippage**: 94 pips per trade for commissions and 1 pip for slippage
**Risk per Trade**: 10% of account equity
**Configurable Options**
**Configurable Options**:
- **EMA Length**: The length of the EMA used to calculate the EMA of PVT (default is 20).
- **Signal Display Control**: The option to turn the display of signals on or off.
**Adequate Sample Size**
To ensure the robustness and reliability of this strategy, it is recommended to backtest it with a sufficiently long period of historical data, especially across different market conditions.
**Credits**
**Acknowledgments**:
This strategy is based on the concept of the PVT indicator and its application in strategy design, drawing on contributions from technical analysis and the trading community.
**Clean Chart Description**
**Chart Appearance**:
This strategy is designed to maintain a clean and simple chart by turning off the plot of PVT, its EMA, and entry signals. This reduces clutter and allows for more effective trend analysis.
**Addressing the House Rule Violations**
**Omissions and Unrealistic Claims**
**Clarification**:
This strategy does not make unrealistic or unsupported claims about its performance, and all signals are for educational purposes only, not guaranteeing future results. It is important to understand that past performance does not guarantee future outcomes.
GC Strategy with Trend Filter and Sudden Move Profit TakingBYBIT:BTCUSDT.P 15M
Situation Assessment with Three Moving Averages
The strategy uses the crossover of the 5SMA and 25SMA as entry signals.
Additionally, the 75SMA is used as a filter. Long entries are only allowed when the price is above the 75SMA, and short entries are only allowed when the price is below the 75SMA.
ADX Filter
The Average Directional Index (ADX) is used to check the strength of the trend. Entry signals are only activated when the ADX is above 20. This ensures that trades are only executed when the trend is strong.
Sudden Move Detection
The strategy detects sudden price movements. If a sudden move occurs, the position is closed to lock in profits.
Entry
Long Entry: When the 5SMA crosses above the 25SMA, the price is above the 75SMA, and the ADX is above 20.
Short Entry: When the 5SMA crosses below the 25SMA, the price is below the 75SMA, and the ADX is above 20.
Exit
Positions are closed if a sudden move occurs. Positions are also closed if an opposing entry signal is generated.
This strategy aims to confirm the strength of the trend using moving average crossovers and ADX and to lock in profits based on sudden price movements.
3本の移動平均線による状況判断
5SMAと25SMA のクロスオーバーをエントリーシグナルとして使用します。
さらに、75SMAをフィルターとして使用し、価格が75SMAの上にある場合のみロングエントリーを許可し、75SMAの下にある場合のみショートエントリーを許可します。
ADXフィルター
ADX(平均方向性指数)を使ってトレンドの強さを確認します。
ADXが20より大きい場合のみ、エントリーシグナルを有効にします。これにより、トレンドが強い時にのみ取引を行うことができます。
急激な変動検知
価格の急激な変動を検出します。
急激な変動があった場合には、ポジションをクローズして利益を確定します。
エントリー
ロングエントリー
5SMAが25SMAを上にクロスし、価格が75SMAの上にあり、ADXが20を超えているとき。
ショートエントリー
5SMAが25SMAを下にクロスし、価格が75SMAの下にあり、ADXが20を超えているとき。
エグジット
急激な変動があった場合、ポジションをクローズします。
反対のエントリーシグナルが発生した場合にも、ポジションをクローズします。
このストラテジーは、移動平均のクロスオーバーとADXを使ってトレンドの強さを確認し、急激な変動に基づいて利益を確定することを目的としています。
Scalping with Williams %R, MACD, and SMA (1m)Overview:
This trading strategy is designed for scalping in the 1-minute timeframe. It uses a combination of the Williams %R, MACD, and SMA indicators to generate buy and sell signals. It also includes alert functionalities to notify users when trades are executed or closed.
Indicators Used:
Williams %R : A momentum indicator that measures overbought and oversold conditions. The Williams %R values range from -100 to 0.
Length: 140 bars (i.e., 140-period).
MACD (Moving Average Convergence Divergence) : A trend-following momentum indicator that shows the relationship between two moving averages of a security's price.
Fast Length: 24 bars
Slow Length: 52 bars
MACD Length: 9 bars (signal line)
SMA (Simple Moving Average) : A trend-following indicator that smooths out price data to create a trend-following indicator.
Length: 7 bars
Conditions and Logic:
Timeframe Check :
The strategy is designed specifically for the 1-minute timeframe. If the current chart is not on the 1-minute timeframe, a warning label is displayed on the chart instructing the user to switch to the 1-minute timeframe.
Williams %R Conditions :
Buy Condition: The strategy looks for a crossover of Williams %R from below -94 to above -94. This indicates a potential buying opportunity when the market is moving out of an oversold condition.
Sell Condition: The strategy looks for a crossunder of Williams %R from above -6 to below -6. This indicates a potential selling opportunity when the market is moving out of an overbought condition.
Deactivate Buy: If Williams %R crosses above -40, the buy signal is deactivated, suggesting that the buying condition is no longer valid.
Deactivate Sell: If Williams %R crosses below -60, the sell signal is deactivated, suggesting that the selling condition is no longer valid.
MACD Conditions :
MACD Histogram: Used to identify the momentum and the direction of the trend.
Long Entry: The strategy initiates a buy order if the MACD histogram shows a positive bar after a negative bar while a buy condition is active and Williams %R is above -94.
Long Exit: The strategy exits the buy position if the MACD histogram turns negative and is below the previous histogram bar.
Short Entry: The strategy initiates a sell order if the MACD histogram shows a negative bar after a positive bar while a sell condition is active and Williams %R is below -6.
Short Exit: The strategy exits the sell position if the MACD histogram turns positive and is above the previous histogram bar.
Trend Confirmation (Using SMA) :
Bullish Trend: The strategy considers a bullish trend if the current price is above the 7-bar SMA. A buy signal is only considered if this condition is met.
Bearish Trend: The strategy considers a bearish trend if the current price is below the 7-bar SMA. A sell signal is only considered if this condition is met.
Alerts:
Long Entry Alert: An alert is triggered when a buy order is executed.
Long Exit Alert: An alert is triggered when the buy order is closed.
Short Entry Alert: An alert is triggered when a sell order is executed.
Short Exit Alert: An alert is triggered when the sell order is closed.
Summary:
Buy Signal: Activated when Williams %R crosses above -94 and the price is above the 7-bar SMA. A buy order is placed if the MACD histogram shows a positive bar after a negative bar. The buy order is closed when the MACD histogram turns negative and is below the previous histogram bar.
Sell Signal: Activated when Williams %R crosses below -6 and the price is below the 7-bar SMA. A sell order is placed if the MACD histogram shows a negative bar after a positive bar. The sell order is closed when the MACD histogram turns positive and is above the previous histogram bar.
This strategy combines momentum (Williams %R), trend-following (MACD), and trend confirmation (SMA) to identify trading opportunities in the 1-minute timeframe. It is designed for short-term trading or scalping.
Innocent Heikin Ashi Ethereum StrategyHello there, im back!
If you are familiar with my previous scripts, this one will seem like the future's nostalgia!
Functionality:
As you can see, all candles are randomly colored. This has no deeper meaning, it should remind you to switch to Heikin Ashi. The Strategy works on standard candle stick charts, but should be used with Heikin Ashi to see the actual results. (Regular OHLC calculations are included.)
Same as in my previous scripts we import our PVSRA Data from @TradersReality open source Indicator.
With this data and the help of moving averages, we have got an edge in the market.
Signal Logic:
When a "violently green" candle appears (high buy volume + tick speed) above the 50 EMA indicates a change in trend and sudden higher prices. Depending on OHLC of the candle itself and volume, Take Profit and Stop Loss is calculated. (The price margin is the only adjustable setting). Additionally, to make this script as simple and easily useable as possible, all other adjustable variables have been already set to the best suitable value and the chart was kept plain, except for the actual entries and exits.
Basic Settings and Adjustables:
Main Input 1: TP and SL combined price range. (Double, Triple R:R equally.)
Trade Inputs: All standard trade size and contract settings for testing available.
Special Settings:
Checkbox 1: Calculate Signal in Heikin Ashi chart, including regular candle OHLC („Open, High, Low, Close“)
Checkbox 2/3: Calculate by order fill or every tick.
Checkbox 4: Possible to fill orders on bar close.
Timeframe and practical usage:
Made for the 5 Minute to 1 hour timeframe.
Literally ONLY works on Ethereum and more or less on Bitcoin.
EVERY other asset has absolute 0% profitability.
Have fun and share with your friends!
Thanks for using!
Example Chart:
Rsi Long-Term Strategy [15min]Hello, I would like to present to you The "RSI Long-Term Strategy" for 15min tf
The "RSI Long-Term Strategy " is designed for traders who prefer a combination of momentum and trend-following techniques. The strategy focuses on entering long positions during significant market corrections within an overall uptrend, confirmed by both RSI and volume. The use of long-term SMAs ensures that trades are made in line with the broader market trend. The stop-loss feature provides risk management by limiting losses on trades that do not perform as expected. This strategy is particularly well-suited for longer-term traders who monitor 15-minute charts but look for substantial trend reversals or continuations.
Indicators and Parameters:
Relative Strength Index (RSI):
- The RSI is calculated using a 10-period length. It measures the magnitude of recent price changes to evaluate overbought or oversold conditions. The script defines oversold conditions when the RSI is at or below 30 and overbought conditions when the RSI is at or above 70.
Volume Condition:
-The strategy incorporates a volume condition where the current volume must be greater than 2.5 times the 20-period moving average of volume. This is used to confirm the strength of the price movement.
Simple Moving Averages (SMA):
- The strategy uses two SMAs: SMA1 with a length of 250 periods and SMA2 with a length of 500 periods. These SMAs help identify long-term trends and generate signals based on their crossover.
Strategy Logic:
Entry Logic:
A long position is initiated when all the following conditions are met:
The RSI indicates an oversold condition (RSI ≤ 30).
SMA1 is above SMA2, indicating an uptrend.
The volume condition is satisfied, confirming the strength of the signal.
Exit Logic:
The strategy closes the long position when SMA1 crosses under SMA2, signaling a potential end of the uptrend (a "Death Cross").
Stop-Loss:
A stop-loss is set at 5% below the entry price to manage risk and limit potential losses.
Buy and sell signals are highlighted with circles below or above bars:
Green Circle : Buy signal when RSI is oversold, SMA1 > SMA2, and the volume condition is met.
Red Circle : Sell signal when RSI is overbought, SMA1 < SMA2, and the volume condition is met.
Black Cross: "Death Cross" when SMA1 crosses under SMA2, indicating a potential bearish signal.
to determine the level of stop loss and target point I used a piece of code by RafaelZioni, here is the script from which a piece of code was taken
I hope the strategy will be helpful, as always, best regards and safe trades
;)
Economic Policy Uncertainty StrategyThis Pine Script strategy is designed to make trading decisions based on the Economic Policy Uncertainty Index for the United States (USEPUINDXD) using a Simple Moving Average (SMA) and a dynamic threshold. The strategy identifies opportunities by entering long positions when the SMA of the Economic Policy Uncertainty Index crosses above a user-defined threshold. An exit is triggered after a set number of bars have passed since the trade was opened. Additionally, the background is highlighted in green when a position is open to visually indicate active trades.
This strategy is intended to be used in portfolio management and trading systems where economic policy uncertainty plays a critical role in decision-making. The index provides insight into macroeconomic conditions, which can affect asset prices and investment returns.
The Economic Policy Uncertainty (EPU) Index is a significant metric used to gauge uncertainty related to economic policies in the United States. This index reflects the frequency of newspaper articles discussing economic uncertainty, government policies, and their potential impact on the economy. It has become a popular indicator for both academics and practitioners to analyze the effects of policy uncertainty on various economic and financial outcomes.
Importance of the EPU Index for Portfolio Decisions:
Economic Policy Uncertainty and Investment Decisions:
Research by Baker, Bloom, and Davis (2016) introduced the Economic Policy Uncertainty Index and explored how increased uncertainty leads to delays in investment and hiring decisions. Their study shows that heightened uncertainty, as captured by the EPU index, is associated with a contraction in economic activity and lower stock market returns. Investors tend to shift their portfolios towards safer assets during periods of high policy uncertainty .
Impact on Asset Prices:
Gulen and Ion (2016) demonstrated that policy uncertainty adversely affects corporate investment, leading to lower stock market returns. The study emphasized that firms reduce investment during periods of high policy uncertainty, which can significantly impact the pricing of risky assets. Consequently, portfolio managers need to account for policy uncertainty when making asset allocation decisions .
Global Implications:
Policy uncertainty is not only a domestic issue. Brogaard and Detzel (2015) found that U.S. economic policy uncertainty has significant spillover effects on global financial markets, affecting equity returns, bond yields, and foreign exchange rates. This suggests that global investors should incorporate U.S. policy uncertainty into their risk management strategies .
These studies underscore the importance of the Economic Policy Uncertainty Index as a tool for understanding macroeconomic risks and making informed portfolio management decisions. Strategies that incorporate the EPU index, such as the one described above, can help investors navigate periods of uncertainty by adjusting their exposure to different asset classes based on economic conditions.
Proxy Financial Stress Index StrategyThis strategy is based on a Proxy Financial Stress Index constructed using several key financial indicators. The strategy goes long when the financial stress index crosses below a user-defined threshold, signaling a potential reduction in market stress. Once a position is opened, it is held for a predetermined number of bars (periods), after which it is automatically closed.
The financial stress index is composed of several normalized indicators, each representing different market aspects:
VIX - Market volatility.
US 10-Year Treasury Yield - Bond market.
Dollar Index (DXY) - Currency market.
S&P 500 Index - Stock market.
EUR/USD - Currency exchange rate.
High-Yield Corporate Bond ETF (HYG) - Corporate bond market.
Each component is normalized using a Z-score (based on the user-defined moving average and standard deviation lengths) and weighted according to user inputs. The aggregated index reflects overall market stress.
The strategy enters a long position when the stress index crosses below a specified threshold from above, indicating reduced financial stress. The position is held for a defined holding period before being closed automatically.
Scientific References:
The concept of a financial stress index is derived from research that combines multiple financial variables to measure systemic risks in the financial markets. Key research includes:
The Financial Stress Index developed by various Federal Reserve banks, including the Cleveland Financial Stress Index (CFSI)
Bank of America Merrill Lynch Option Volatility Estimate (MOVE) Index as a measure of interest rate volatility, which correlates with financial stress
These indices are widely used in economic research to gauge financial instability and help in policy decisions. They track real-time fluctuations in various markets and are often used to anticipate economic downturns or periods of high financial risk.
Breadth Thrust Strategy with Volatility Stop-LossThe "Breadth Thrust Strategy with Volatility Stop-Loss" is a trading strategy designed to capitalize on market momentum while managing risk through volatility-based stop-losses. Here's a detailed breakdown of the strategy:
Strategy Overview:
Market Breadth Analysis: The strategy uses the "Breadth Thrust Indicator," which evaluates market momentum by calculating the ratio of advancing stocks to the total number of stocks on the New York Stock Exchange (NYSE). This indicator helps identify bullish market conditions. An optional feature allows for the inclusion of volume data in this calculation, enhancing the signal's robustness.
Signal Generation: A long position is triggered when the smoothed breadth ratio (or the combined breadth and volume ratio) crosses above a specified low threshold (e.g., 0.4). This crossover indicates a potential shift towards positive market momentum.
Key Parameters:
Smoothing Length (length): Defines the period over which the breadth or combined ratio is smoothed using a simple moving average (SMA) to reduce noise and highlight the underlying trend.
Low Threshold (threshold_low): The level below which the smoothed ratio must fall before crossing back above to trigger a long signal.
Hold Periods (hold_periods): The minimum number of periods for which the position will be held once entered, ensuring the strategy captures a meaningful move.
Volatility Multiplier (volatility_multiplier): A multiplier applied to the Average True Range (ATR) to determine the distance of the stop-loss from the entry price, which adjusts according to market volatility.
Trade Management:
Entry Signal: The strategy enters a long position when the smoothed combined ratio crosses above the low threshold, signaling a potential bullish reversal.
ATR-Based Stop-Loss: Upon entering a trade, the strategy calculates a stop-loss level based on the ATR, which measures market volatility. The stop-loss is set at a distance from the entry price, determined by multiplying the ATR by the specified volatility multiplier. This adaptive stop-loss mechanism helps protect the position from adverse market moves.
Stop-Loss Adjustment: While the position is open, the stop-loss level is dynamically updated, ensuring it never decreases (trailing stop-loss effect) but can be adjusted upwards to reflect the latest price action relative to volatility.
Position Closure: The position is closed if:
The market price falls to or below the stop-loss level.
The position has been held for the specified number of periods (hold_periods), after which it is automatically closed.
Additional Settings:
Initial Capital: The strategy starts with an initial capital of $10,000.
Commissions and Slippage: Each trade incurs a commission of $5 per order, and slippage is accounted for at $1 per trade.
Background Highlighting: The chart background turns green when a position is open, providing a clear visual indication of the active trade.
This strategy is designed to identify and capitalize on upward momentum in the market while employing a volatility-adjusted stop-loss to manage risk. By combining market breadth analysis with volatility-based stop-losses, the strategy aims to balance profit potential with protection against sudden market reversals.
Multi-Factor StrategyThis trading strategy combines multiple technical indicators to create a systematic approach for entering and exiting trades. The goal is to capture trends by aligning several key indicators to confirm the direction and strength of a potential trade. Below is a detailed description of how the strategy works:
Indicators Used
MACD (Moving Average Convergence Divergence):
MACD Line: The difference between the 12-period and 26-period Exponential Moving Averages (EMAs).
Signal Line: A 9-period EMA of the MACD line.
Usage: The strategy looks for crossovers between the MACD line and the Signal line as entry signals. A bullish crossover (MACD line crossing above the Signal line) indicates a potential upward movement, while a bearish crossover (MACD line crossing below the Signal line) signals a potential downward movement.
RSI (Relative Strength Index):
Usage: RSI is used to gauge the momentum of the price movement. The strategy uses specific thresholds: below 70 for long positions to avoid overbought conditions and above 30 for short positions to avoid oversold conditions.
ATR (Average True Range):
Usage: ATR measures market volatility and is used to set dynamic stop-loss and take-profit levels. A stop loss is set at 2 times the ATR, and a take profit at 3 times the ATR, ensuring that risk is managed relative to market conditions.
Simple Moving Averages (SMA):
50-day SMA: A short-term trend indicator.
200-day SMA: A long-term trend indicator.
Usage: The strategy uses the relationship between the 50-day and 200-day SMAs to determine the overall market trend. Long positions are taken when the price is above the 50-day SMA and the 50-day SMA is above the 200-day SMA, indicating an uptrend. Conversely, short positions are taken when the price is below the 50-day SMA and the 50-day SMA is below the 200-day SMA, indicating a downtrend.
Entry Conditions
Long Position:
-MACD Crossover: The MACD line crosses above the Signal line.
-RSI Confirmation: RSI is below 70, ensuring the asset is not overbought.
-SMA Confirmation: The price is above the 50-day SMA, and the 50-day SMA is above the 200-day SMA, indicating a strong uptrend.
Short Position:
MACD Crossunder: The MACD line crosses below the Signal line.
RSI Confirmation: RSI is above 30, ensuring the asset is not oversold.
SMA Confirmation: The price is below the 50-day SMA, and the 50-day SMA is below the 200-day SMA, indicating a strong downtrend.
Opposite conditions for shorts
Exit Strategy
Stop Loss: Set at 2 times the ATR from the entry price. This dynamically adjusts to market volatility, allowing for wider stops in volatile markets and tighter stops in calmer markets.
Take Profit: Set at 3 times the ATR from the entry price. This ensures a favorable risk-reward ratio of 1:1.5, aiming for higher rewards on successful trades.
Visualization
SMAs: The 50-day and 200-day SMAs are plotted on the chart to visualize the trend direction.
MACD Crossovers: Bullish and bearish MACD crossovers are highlighted on the chart to identify potential entry points.
Summary
This strategy is designed to align multiple indicators to increase the probability of successful trades by confirming trends and momentum before entering a position. It systematically manages risk with ATR-based stop loss and take profit levels, ensuring that trades are exited based on market conditions rather than arbitrary points. The combination of trend indicators (SMAs) with momentum and volatility indicators (MACD, RSI, ATR) creates a robust approach to trading in various market environments.
Monthly Purchase Strategy with Dynamic Contract Size This trading strategy is designed to automate monthly purchases of a security, adjusting the size of each purchase based on the percentage of the portfolio's equity. The key features of this strategy include:
Monthly Purchases: The strategy buys the security on a specified day of each month, based on the user's input.
Dynamic Position Sizing: The size of each purchase is calculated as a percentage of the current equity. This allows the position size to adjust dynamically with the portfolio's performance.
Slippage and Commission Considerations: Slippage is simulated by adjusting the entry price by a set number of ticks, while commissions are factored in as fixed costs per trade.
Drawdown Calculation: The strategy tracks the highest equity value and calculates the drawdown, which is the percentage decrease from this peak equity. This helps in assessing the performance and risk of the strategy.
Benefits of the Strategy
Automated Investment: The strategy automates the investment process, reducing the need for manual trading decisions and ensuring consistent execution.
Dynamic Position Sizing: By adjusting the purchase size based on the portfolio’s equity, the strategy helps in managing risk and capitalizing on market movements proportionally to the portfolio’s performance.
Regular Investments: Investing on a regular schedule helps in averaging the purchase price of the security, which can reduce the impact of short-term volatility.
Risk Management: Monitoring drawdown helps in assessing the risk and performance of the strategy, providing insights into potential losses relative to the highest equity value.
Scientific Documentation on ETF Savings Plans
1. Dollar-Cost Averaging and Investment Behavior:
Title: "The Benefits of Dollar-Cost Averaging: A Study of Investment Behavior"
Authors: William F. Sharpe
Journal: Financial Analysts Journal, 1994
Summary: This study discusses the concept of dollar-cost averaging (DCA), which involves investing a fixed amount of money at regular intervals regardless of market conditions. The study highlights that DCA can reduce the impact of market volatility and lower the average cost of investments over time.
Reference: Sharpe, W. F. (1994). The Benefits of Dollar-Cost Averaging: A Study of Investment Behavior. Financial Analysts Journal, 50(4), 27-36.
2. ETFs and Long-Term Investment Strategies:
Title: "Exchange-Traded Funds and Their Role in Long-Term Investment Strategies"
Authors: John C. Bogle
Journal: The Journal of Portfolio Management, 2007
Summary: This paper explores the advantages of using ETFs for long-term investment strategies, emphasizing their low costs, tax efficiency, and diversification benefits. It also discusses how ETFs can be used effectively in automated investment plans like ETF savings plans.
Reference: Bogle, J. C. (2007). Exchange-Traded Funds and Their Role in Long-Term Investment Strategies. The Journal of Portfolio Management, 33(4), 14-25.
3. Risk and Return in ETF Investments:
Title: "Risk and Return Characteristics of Exchange-Traded Funds"
Authors: Eugene F. Fama and Kenneth R. French
Journal: Journal of Financial Economics, 2010
Summary: Fama and French analyze the risk and return characteristics of ETFs compared to traditional mutual funds. The study provides insights into how ETFs can be a viable option for investors seeking diversified exposure while managing risk and optimizing returns.
Reference: Fama, E. F., & French, K. R. (2010). Risk and Return Characteristics of Exchange-Traded Funds. Journal of Financial Economics, 96(2), 257-278.
4. The Impact of Automated Investment Plans:
Title: "The Impact of Automated Investment Plans on Portfolio Performance"
Authors: David G. Blanchflower and Andrew J. Oswald
Journal: Journal of Behavioral Finance, 2012
Summary: This research examines how automated investment plans, including ETF savings plans, affect portfolio performance. It highlights the benefits of automation in reducing behavioral biases and ensuring consistent investment practices.
Reference: Blanchflower, D. G., & Oswald, A. J. (2012). The Impact of Automated Investment Plans on Portfolio Performance. Journal of Behavioral Finance, 13(2), 77-89.
Summary
The "Monthly Purchase Strategy with Dynamic Contract Size and Drawdown" provides a disciplined approach to investing by automating purchases and adjusting position sizes based on portfolio equity. It leverages the benefits of dollar-cost averaging and regular investment, with risk management through drawdown monitoring. Scientific literature supports the effectiveness of ETF savings plans and automated investment strategies in optimizing returns and managing investment risk.
RSI Strategy with Adjustable RSI and Stop-LossThis trading strategy uses the Relative Strength Index (RSI) and a Stop-Loss mechanism to make trading decisions. Here’s a breakdown of how it works:
RSI Calculation:
The RSI is calculated based on the user-defined length (rsi_length). This is a momentum oscillator that measures the speed and change of price movements.
Buy Condition:
The strategy generates a buy signal when the RSI value is below a user-defined threshold (rsi_threshold). This condition indicates that the asset might be oversold and potentially due for a rebound.
Stop-Loss Mechanism:
Upon triggering a buy signal, the strategy calculates the Stop-Loss level. The Stop-Loss level is set to a percentage below the entry price, as specified by the user (stop_loss_percent). This level is used to limit potential losses if the price moves against the trade.
Sell Condition:
A sell signal is generated when the current closing price is higher than the highest high of the previous day. This condition suggests that the price has reached a new high, and the strategy decides to exit the trade.
Plotting:
The RSI values are plotted on the chart for visual reference. A horizontal line is drawn at the RSI threshold level to help visualize the oversold condition.
Summary
Buying Strategy: When RSI is below the specified threshold, indicating potential oversold conditions.
Stop-Loss: Set based on a percentage of the entry price to limit potential losses.
Selling Strategy: When the price surpasses the highest high of the previous day, signaling a potential exit point.
This strategy aims to capture potential rebounds from oversold conditions and manage risk using a Stop-Loss mechanism. As with any trading strategy, it’s essential to test and optimize it under various market conditions to ensure its effectiveness.
Negroni Opening Range StrategyStrategy Summary:
This tool can be used to help identify breakouts from a range during a time-zone of your choosing. It plots a pre-market range, an opening range, it also includes moving average levels that can be used as confluence, as well as plotting previous day SESSION highs and lows.
There are several options on how you wish to close out the trades, all described in more detail below.
Back-testing Inputs:
You define your timezone.
You define how many trades to open on any given day.
You decide to go: long only, short only, or long & short (CAREFUL: "Long & Short" can open trades that effectively closes-out existing ones, for better AND worse!)
You define between which times the strategy will open trades.
You define when it closes any open trades (preventing overnight trades, or leaving trades open into US data times!!).
This hopefully helps make back-testing reflect YOUR trading hours.
NOTE: Renko or Heikin-Ashi charts
For ALL strategies, don’t use Renko or Heikin-Ashi charts unless you know EXACTLY the implications.
Specific to my strategy, using a renko chart can make this 85-90% profitable (I wish it was!!) Although they can be useful, renko charts don’t always capture real wicks, so the renko chart may show your trade up-only but your broker (who is not using renko!!) will have likely stopped you out on a wick somewhere along the line.
NOTE: TradingView ‘Deep backtesting’
For ALL strategies, be cynical of all backtesting (e.g. repainting issues etc) as well as ‘Deep backtesting’ results.
Specific to this strategy, the default settings here SHOULD BE OK, but unfortunately at the time of writing, we can’t see on the chart what exactly ‘deep backtesting’ is calculating. In the past I have noted a number of trades that were not closed at the end of the day, despite my ‘end of day’ trade closing being enabled, so there were big winners and losers that would not have materialized otherwise. As I say, this seems ok at these settings but just always be cynical!!
Opening Range Inputs
You define a pre-market range (example: 08:00 - 09:00).
You define an opening range (example: 09:00 - 09:30).
The strategy will give an update at the close of the opening range to let you know if the opening range has broken out the pre-market range (OR Breakout), or if it has remained inside (OR Inside). The label appears at the end of the opening range NOT at the bar that ‘broke-out’.
This is just a visual cue for you, it has no bearing on what the strategy will do.
The strategy default will trade off the pre-market range, but you can untick this if you prefer to trade off the opening range.
Opening Trades:
Strategy goes long when the bar (CLOSE) crosses-over the ‘pre-market’ high (not the ‘opening range’ high); and the time is within your trading session, and you have not maxed out your number of trades for the day!
Strategy goes short when the bar (CLOSE) crosses-under the ‘pre-market’ low (not the ‘opening range low); and the time is within your trading session, and you have not maxed out your number of trades for the day!
Remember, you can untick this if you prefer to trade off the opening range instead.
NOTES:
Using momentum indicators can help (RSI and MACD): especially to trade range plays in failed breakouts, when momentum shifts… but the strategy won’t do this for you!
Using an anchored vwap at the session open can also provide nice confluence, as well as take-profit levels at the upper/lower of 3x standard deviation.
CLOSING TRADES:
You have 6 take-profit (TP) options:
1) Full TP: uses ATR Multiplier - Full TP at the ATR parameters as defined in inputs.
2) Take Partial profits: ATR Multiplier - Takes partial profits based on parameters as defined in inputs (i.e close 40% of original trade at TP1, close another 40% of original trade at TP2, then the remainder at Full TP as set in option 1.).
3) Full TP: Trailing Stop - Applies a Trailing Stop at the number of points, as defined in inputs.
4) Full TP: MA cross - Takes profit when price crosses ‘Trend MA’ as defined in inputs.
5) Scalp: Points - closes at a set number of points, as defined in inputs.
6) Full TP: PMKT Multiplier - places a SL at opposite pre-market Hi/Low (we go long at a break-out of the pre-market high, 50% would place a SL at the pre-market range mid-point; 100% would place a SL at the pre-market low)'. This takes profit at the input set in option 1).
Double Bottom and Top Hunter### Türkçe Açıklama:
Bu strateji, grafikte ikili dip ve ikili tepe formasyonlarını tespit ederek otomatik alım ve satım işlemleri gerçekleştirir. İkili dip, fiyatın belirli bir dönem içinde iki kez en düşük seviyeye ulaşması ile oluşur ve bu durumda strateji long (alım) işlemi açar. İkili tepe ise fiyatın belirli bir dönem içinde iki kez en yüksek seviyeye ulaşması ile oluşur ve bu durumda strateji short (satış) işlemi açar.
- **Dönem Uzunluğu ve Geriye Dönük Kontrol:** Strateji, varsayılan olarak 100 periyotluk bir zaman dilimini temel alır ve bu süre boyunca en düşük ve en yüksek fiyat seviyelerini belirler. Geriye dönük kontrol süresi de 100 periyot olarak ayarlanmıştır.
- **İşlem Açma Koşulları:** İkili dip tespit edildiğinde long pozisyon, ikili tepe tespit edildiğinde short pozisyon açılır.
- **İşlem Kapatma Koşulları:** İkili dipte, en yüksek seviyeye (HH) ulaşıldıktan sonra fiyatın daha düşük bir seviye (LL) yapması durumunda pozisyon kapanır. İkili tepede ise tam tersi bir durumda, pozisyon kapanır.
- **Zigzag Çizimi:** İkili dip ve tepe formasyonları, grafik üzerinde yeşil (dipler) ve kırmızı (tepeler) zigzag çizgileri ile gösterilir.
Bu strateji, özellikle 1, 3 ve 5 dakikalık kısa zaman dilimlerinde yüksek başarı oranına sahiptir ve piyasadaki kısa vadeli trend dönüşlerini yakalamada etkili bir araçtır.
### English Explanation:
This strategy automatically executes buy and sell orders by detecting double bottom and double top formations on the chart. A double bottom occurs when the price reaches a low level twice within a specific period, prompting the strategy to open a long (buy) position. Conversely, a double top forms when the price reaches a high level twice, leading the strategy to open a short (sell) position.
- **Period Length and Lookback Control:** By default, the strategy is based on a 100-period length, during which it identifies the lowest and highest price levels. The lookback control period is also set to 100 periods.
- **Entry Conditions:** A long position is opened when a double bottom is detected, while a short position is opened when a double top is identified.
- **Exit Conditions:** In the case of a double bottom, the position is closed after the price reaches a higher high (HH) and then makes a lower low (LL). For a double top, the opposite occurs before closing the position.
- **Zigzag Plotting:** The double bottom and top formations are visually represented on the chart with green (bottoms) and red (tops) zigzag lines.
This strategy is particularly successful in short timeframes such as 1, 3, and 5 minutes and is an effective tool for capturing short-term trend reversals in the market.
Multi-Step FlexiSuperTrend - Strategy [presentTrading]At the heart of this endeavor is a passion for continuous improvement in the art of trading
█ Introduction and How it is Different
The "Multi-Step FlexiSuperTrend - Strategy " is an advanced trading strategy that integrates the well-known SuperTrend indicator with a nuanced and dynamic approach to market trend analysis. Unlike conventional SuperTrend strategies that rely on static thresholds and fixed parameters, this strategy introduces multi-step take profit mechanisms that allow traders to capitalize on varying market conditions in a more controlled and systematic manner.
What sets this strategy apart is its ability to dynamically adjust to market volatility through the use of an incremental factor applied to the SuperTrend calculation. This adjustment ensures that the strategy remains responsive to both minor and major market shifts, providing a more accurate signal for entries and exits. Additionally, the integration of multi-step take profit levels offers traders the flexibility to scale out of positions, locking in profits progressively as the market moves in their favor.
BTC 6hr Long/Short Performance
█ Strategy, How it Works: Detailed Explanation
The Multi-Step FlexiSuperTrend strategy operates on the foundation of the SuperTrend indicator, but with several enhancements that make it more adaptable to varying market conditions. The key components of this strategy include the SuperTrend Polyfactor Oscillator, a dynamic normalization process, and multi-step take profit levels.
🔶 SuperTrend Polyfactor Oscillator
The SuperTrend Polyfactor Oscillator is the heart of this strategy. It is calculated by applying a series of SuperTrend calculations with varying factors, starting from a defined "Starting Factor" and incrementing by a specified "Increment Factor." The indicator length and the chosen price source (e.g., HLC3, HL2) are inputs to the oscillator.
The SuperTrend formula typically calculates an upper and lower band based on the average true range (ATR) and a multiplier (the factor). These bands determine the trend direction. In the FlexiSuperTrend strategy, the oscillator is enhanced by iteratively applying the SuperTrend calculation across different factors. The iterative process allows the strategy to capture both minor and significant trend changes.
For each iteration (indexed by `i`), the following calculations are performed:
1. ATR Calculation: The Average True Range (ATR) is calculated over the specified `indicatorLength`:
ATR_i = ATR(indicatorLength)
2. Upper and Lower Bands Calculation: The upper and lower bands are calculated using the ATR and the current factor:
Upper Band_i = hl2 + (ATR_i * Factor_i)
Lower Band_i = hl2 - (ATR_i * Factor_i)
Here, `Factor_i` starts from `startingFactor` and is incremented by `incrementFactor` in each iteration.
3. Trend Determination: The trend is determined by comparing the indicator source with the upper and lower bands:
Trend_i = 1 (uptrend) if IndicatorSource > Upper Band_i
Trend_i = 0 (downtrend) if IndicatorSource < Lower Band_i
Otherwise, the trend remains unchanged from the previous value.
4. Output Calculation: The output of each iteration is determined based on the trend:
Output_i = Lower Band_i if Trend_i = 1
Output_i = Upper Band_i if Trend_i = 0
This process is repeated for each iteration (from 0 to 19), creating a series of outputs that reflect different levels of trend sensitivity.
Local
🔶 Normalization Process
To make the oscillator values comparable across different market conditions, the deviations between the indicator source and the SuperTrend outputs are normalized. The normalization method can be one of the following:
1. Max-Min Normalization: The deviations are normalized based on the range of the deviations:
Normalized Value_i = (Deviation_i - Min Deviation) / (Max Deviation - Min Deviation)
2. Absolute Sum Normalization: The deviations are normalized based on the sum of absolute deviations:
Normalized Value_i = Deviation_i / Sum of Absolute Deviations
This normalization ensures that the oscillator values are within a consistent range, facilitating more reliable trend analysis.
For more details:
🔶 Multi-Step Take Profit Mechanism
One of the unique features of this strategy is the multi-step take profit mechanism. This allows traders to lock in profits at multiple levels as the market moves in their favor. The strategy uses three take profit levels, each defined as a percentage increase (for long trades) or decrease (for short trades) from the entry price.
1. First Take Profit Level: Calculated as a percentage increase/decrease from the entry price:
TP_Level1 = Entry Price * (1 + tp_level1 / 100) for long trades
TP_Level1 = Entry Price * (1 - tp_level1 / 100) for short trades
The strategy exits a portion of the position (defined by `tp_percent1`) when this level is reached.
2. Second Take Profit Level: Similar to the first level, but with a higher percentage:
TP_Level2 = Entry Price * (1 + tp_level2 / 100) for long trades
TP_Level2 = Entry Price * (1 - tp_level2 / 100) for short trades
The strategy exits another portion of the position (`tp_percent2`) at this level.
3. Third Take Profit Level: The final take profit level:
TP_Level3 = Entry Price * (1 + tp_level3 / 100) for long trades
TP_Level3 = Entry Price * (1 - tp_level3 / 100) for short trades
The remaining portion of the position (`tp_percent3`) is exited at this level.
This multi-step approach provides a balance between securing profits and allowing the remaining position to benefit from continued favorable market movement.
█ Trade Direction
The strategy allows traders to specify the trade direction through the `tradeDirection` input. The options are:
1. Both: The strategy will take both long and short positions based on the entry signals.
2. Long: The strategy will only take long positions.
3. Short: The strategy will only take short positions.
This flexibility enables traders to tailor the strategy to their market outlook or current trend analysis.
█ Usage
To use the Multi-Step FlexiSuperTrend strategy, traders need to set the input parameters according to their trading style and market conditions. The strategy is designed for versatility, allowing for various market environments, including trending and ranging markets.
Traders can also adjust the multi-step take profit levels and percentages to match their risk management and profit-taking preferences. For example, in highly volatile markets, traders might set wider take profit levels with smaller percentages at each level to capture larger price movements.
The normalization method and the incremental factor can be fine-tuned to adjust the sensitivity of the SuperTrend Polyfactor Oscillator, making the strategy more responsive to minor market shifts or more focused on significant trends.
█ Default Settings
The default settings of the strategy are carefully chosen to provide a balanced approach between risk management and profit potential. Here is a breakdown of the default settings and their effects on performance:
1. Indicator Length (10): This parameter controls the lookback period for the ATR calculation. A shorter length makes the strategy more sensitive to recent price movements, potentially generating more signals. A longer length smooths out the ATR, reducing sensitivity but filtering out noise.
2. Starting Factor (0.618): This is the initial multiplier used in the SuperTrend calculation. A lower starting factor makes the SuperTrend bands closer to the price, generating more frequent trend changes. A higher starting factor places the bands further away, filtering out minor fluctuations.
3. Increment Factor (0.382): This parameter controls how much the factor increases with each iteration of the SuperTrend calculation. A smaller increment factor results in more gradual changes in sensitivity, while a larger increment factor creates a wider range of sensitivity across the iterations.
4. Normalization Method (None): The default is no normalization, meaning the raw deviations are used. Normalization methods like Max-Min or Absolute Sum can make the deviations more consistent across different market conditions, improving the reliability of the oscillator.
5. Take Profit Levels (2%, 8%, 18%): These levels define the thresholds for exiting portions of the position. Lower levels (e.g., 2%) capture smaller profits quickly, while higher levels (e.g., 18%) allow positions to run longer for more significant gains.
6. Take Profit Percentages (30%, 20%, 15%): These percentages determine how much of the position is exited at each take profit level. A higher percentage at the first level locks in more profit early, reducing exposure to market reversals. Lower percentages at higher levels allow for a portion of the position to benefit from extended trends.
Fibonacci-Only StrategyFibonacci-Only Strategy
This script is a custom trading strategy designed for traders who leverage Fibonacci retracement levels to identify potential trade entries and exits. The strategy is versatile, allowing users to trade across multiple timeframes, with built-in options for dynamic stop loss, trailing stops, and take profit levels.
Key Features:
Custom Fibonacci Levels:
This strategy calculates three specific Fibonacci retracement levels: 19%, 82.56%, and the reverse 19% level. These levels are used to identify potential areas of support and resistance where price reversals or breaks might occur.
The Fibonacci levels are calculated based on the highest and lowest prices within a 100-bar period, making them dynamic and responsive to recent market conditions.
Dynamic Entry Conditions:
Touch Entry: The script enters long or short positions when the price touches specific Fibonacci levels and confirms the move with a bullish (for long) or bearish (for short) candle.
Break Entry (Optional): If the "Use Break Strategy" option is enabled, the script can also enter positions when the price breaks through Fibonacci levels, providing more aggressive entry opportunities.
Stop Loss Management:
The script offers flexible stop loss settings. Users can choose between a fixed percentage stop loss or an ATR-based stop loss, which adjusts based on market volatility.
The ATR (Average True Range) stop loss is multiplied by a user-defined factor, allowing for tailored risk management based on market conditions.
Trailing Stop Mechanism:
The script includes an optional trailing stop feature, which adjusts the stop loss level as the market moves in favor of the trade. This helps lock in profits while allowing the trade to run if the trend continues.
The trailing stop is calculated as a percentage of the difference between the entry price and the current market price.
Multiple Take Profit Levels:
The strategy calculates seven take profit levels, each at incremental percentages above (for long trades) or below (for short trades) the entry price. This allows for gradual profit-taking as the market moves in the trade's favor.
Each take profit level can be customized in terms of the percentage of the position to be closed, providing precise control over exit strategies.
Strategy Backtesting and Results:
Realistic Backtesting:
The script has been backtested with realistic account sizes, commission rates, and slippage settings to ensure that the results are applicable to actual trading scenarios.
The backtesting covers various timeframes and markets to ensure the strategy's robustness across different trading environments.
Default Settings:
The script is published with default settings that have been optimized for general use. These settings include a 15-minute timeframe, a 1.0% stop loss, a 2.0 ATR multiplier for stop loss, and a 1.5% trailing stop.
Users can adjust these settings to better fit their specific trading style or the market they are trading.
How It Works:
Long Entry Conditions:
The strategy enters a long position when the price touches the 19% Fibonacci level (from high to low) or the reverse 19% level (from low to high) and confirms the move with a bullish candle.
If the "Use Break Strategy" option is enabled, the script will also enter a long position when the price breaks below the 19% Fibonacci level and then moves back up, confirming the break with a bullish candle.
Short Entry Conditions:
The strategy enters a short position when the price touches the 82.56% Fibonacci level and confirms the move with a bearish candle.
If the "Use Break Strategy" option is enabled, the script will also enter a short position when the price breaks above the 82.56% Fibonacci level and then moves back down, confirming the break with a bearish candle.
Stop Loss and Take Profit Logic:
The stop loss for each trade is calculated based on the selected method (fixed percentage or ATR-based). The strategy then manages the trade by either trailing the stop or taking profit at predefined levels.
The take profit levels are set at increments of 0.5% above or below the entry price, depending on whether the position is long or short. The script gradually exits the trade as these levels are hit, securing profits while minimizing risk.
Usage:
For Fibonacci Traders:
This script is ideal for traders who rely on Fibonacci retracement levels to find potential trade entries and exits. The script automates the process, allowing traders to focus on market analysis and decision-making.
For Trend and Swing Traders:
The strategy's flexibility in handling both touch and break entries makes it suitable for trend-following and swing trading strategies. The multiple take profit levels allow traders to capture profits in trending markets while managing risk.
Important Notes:
Originality: This script uniquely combines Fibonacci retracement levels with dynamic stop loss management and multiple take profit levels. It is not just a combination of existing indicators but a thoughtful integration designed to enhance trading performance.
Disclaimer: Trading involves risk, and it is crucial to test this script in a demo account or through backtesting before applying it to live trading. Users should ensure that the settings align with their individual risk tolerance and trading strategy.
Monthly Day Long Strategy with VIX and Risk ManagementThis trading strategy is designed to open long positions on a specific day of the month, with the conditions for entry and exit based on the VIX index and additional risk management techniques. The strategy includes stop-loss and take-profit features to manage risk and lock in profits.
Inputs:
Entry Day of the Month (entry_day): Specifies which day of the month to consider for initiating a trade. The default value is the 27th.
Hold Duration (Days) (hold_duration_days): Defines how many days to hold the position after opening. The default value is 4 days.
VIX Threshold (vix_threshold): Sets the maximum acceptable value for the VIX index to consider an entry. If the VIX is below this threshold, it signals a potential trade. The default value is 20.0.
Stop Loss (%) (stop_loss_percentage): Determines the percentage below the entry price where the stop-loss will be triggered. The default value is 2.0%.
Take Profit (%) (take_profit_percentage): Sets the percentage above the entry price where the take-profit will be triggered. The default value is 5.0%.
Functions:
next_weekday(date): Adjusts the entry date to the next Monday if it falls on a weekend (Saturday or Sunday). This ensures trades do not occur on non-trading days.
Logic:
Entry Conditions:
Date Check: Opens a long position if the current date matches the adjusted entry date (the 27th or the next Monday if the 27th falls on a weekend).
VIX Filter: The VIX index value must be below the specified threshold (e.g., 20.0) to consider an entry.
Exit Conditions:
Time-Based Exit: Closes the position after the hold duration of 4 days.
Stop-Loss: Automatically closes the position if the price drops to a level that is a specified percentage below the entry price (e.g., 2.0%).
Take-Profit: Closes the position if the price rises to a level that is a specified percentage above the entry price (e.g., 5.0%).
Plots:
VIX Plot: Displays the VIX index on the chart for visual reference.
VIX Threshold Line: A horizontal line representing the VIX threshold value.
Summary:
The strategy aims to take advantage of specific entry days while filtering trades based on VIX levels to ensure market conditions are favorable. Risk management is enhanced through stop-loss and take-profit settings, which help in controlling potential losses and securing profits. The strategy ensures trades are only made on trading days and not on weekends, adjusting automatically to the next Monday if needed.
ChatGPT kann Fehler machen. Überprüfe wichtige Informationen.
Friday Bond Short StrategyStrategy: Friday Bond Short Strategy (1H Timeframe)
Objective:
This strategy aims to open short positions on a specified day and hour (Eastern Time) and close those positions on another specified day and hour. The background color of the chart will turn green when a position is active, providing a visual cue of an open trade.
Parameters:
1. Entry Day:
• Defines the day of the week on which the short position will be opened.
• Value: 6 for Friday (Pine Script’s weekday numbering: Monday = 2, Friday = 6).
2. Entry Hour:
• Specifies the hour (Eastern Time) when the short position will be opened.
• Value: 13 for 13:00 ET (1:00 PM).
3. Exit Day:
• Defines the day of the week on which the short position will be closed.
• Value: 2 for Monday.
4. Exit Hour:
• Specifies the hour (Eastern Time) when the position will be closed.
• Value: 13 for 13:00 ET (1:00 PM).
How It Works:
1. Time Adjustment to Eastern Time:
• The script converts all time references to Eastern Time (America/New_York) to ensure the strategy operates according to the desired time zone.
2. Entry Conditions:
• The strategy checks if the current day of the week matches the specified entry_day and if the current hour matches the specified entry_hour.
• If both conditions are met, a short position is opened (strategy.entry("Short", strategy.short)).
3. Exit Conditions:
• Similarly, the strategy checks if the current day of the week matches the specified exit_day and if the current hour matches the specified exit_hour.
• If both conditions are met, the open short position is closed (strategy.close("Short")).
4. Background Color:
• The background color of the chart is adjusted based on whether there is an open position:
• Green Background: If the strategy has an open position (strategy.position_size > 0), the background is set to light green.
• No Background Color: If there is no open position, the background color is not set (na).
Summary:
The Friday Bond Short Strategy is designed to enter short positions on Fridays at 1:00 PM ET and close them on Mondays at 1:00 PM ET. The chart background color turns green when a short position is active, providing a clear visual indication of when the strategy is engaged in a trade.
Gann + Laplace Smoothed Hybrid Volume Spread AnalysisThe Gann + Laplace Smoothed Hybrid Volume Spread Analysis ( GannLSHVSA ) Strategy/Indicator is an trading tool designed to fuse volume analysis with trend detection, offering traders a view of market dynamics.
This Strategy/Indicator stands apart by integrating the principles of the upgraded Discrete Fourier Transform (DFT), the Laplace Stieltjes Transform and volume spread analysis, enhanced with a layer of Fourier smoothing to distill market noise and highlight trend directions with unprecedented clarity.
The length of EMA and Strategy Entries are modified with the Gann swings .
This smoothing process allows traders to discern the true underlying patterns in volume and price action, stripped of the distractions of short-term fluctuations and noise.
The core functionality of the GannLSHVSA revolves around the innovative combination of volume change analysis, spread determination (calculated from the open and close price difference), and the strategic use of the EMA (default 10) to fine-tune the analysis of spread by incorporating volume changes.
Trend direction is validated through a moving average (MA) of the histogram, which acts analogously to the Volume MA found in traditional volume indicators. This MA serves as a pivotal reference point, enabling traders to confidently engage with the market when the histogram's movement concurs with the trend direction, particularly when it crosses the Trend MA line, signalling optimal entry points.
It returns 0 when MA of the histogram and EMA of the Price Spread are not align.
WHAT IS GannLSHVSA INDICATOR:
The GannLSHVSA plots a positive trend when a positive Volume smoothed Spread and EMA of Volume smoothed price is above 0, and a negative when negative Volume smoothed Spread and EMA of Volume smoothed price is below 0. When this conditions are not met it plots 0.
HOW TO USE THE STRATEGY:
Here you fine-tune the inputs until you find a combination that works well on all Timeframes you will use when creating your Automated Trade Algorithmic Strategy. I suggest 4h, 12h, 1D, 2D, 3D, 4D, 5D, 6D, W and M.
ORIGINALITY & USEFULNESS:
The GannLSHVSA Strategy is unique because it applies upgraded DFT, the Laplace Stieltjes Transform for data smoothing, effectively filtering out the minor fluctuations and leaving traders with a clear picture of the market's true movements. The DFT's ability to break down market signals into constituent frequencies offers a granular view of market dynamics, highlighting the amplitude and phase of each frequency component. This, combined with the strategic application of Ehler's Universal Oscillator principles via a histogram, furnishes traders with a nuanced understanding of market volatility and noise levels, thereby facilitating more informed trading decisions. The Gann swing strategy is developed by meomeo105, this Gann high and low algorithm forms the basis of the EMA modification.
DETAILED DESCRIPTION:
My detailed description of the indicator and use cases which I find very valuable.
What is the meaning of price spread?
In finance, a spread refers to the difference between two prices, rates, or yields. One of the most common types is the bid-ask spread, which refers to the gap between the bid (from buyers) and the ask (from sellers) prices of a security or asset.
We are going to use Open-Close spread.
What is Volume spread analysis?
Volume spread analysis (VSA) is a method of technical analysis that compares the volume per candle, range spread, and closing price to determine price direction.
What does this mean?
We need to have a positive Volume Price Spread and a positive Moving average of Volume price spread for a positive trend. OR via versa a negative Volume Price Spread and a negative Moving average of Volume price spread for a negative trend.
What if we have a positive Volume Price Spread and a negative Moving average of Volume Price Spread?
It results in a neutral, not trending price action.
Thus the Indicator/Strategy returns 0 and Closes all long and short positions.
I suggest using "Close all" input False when fine-tuning Inputs for 1 TimeFrame. When you export data to Excel/Numbers/GSheets I suggest using "Close all" input as True, except for the lowest TimeFrame. I suggest using 100% equity as your default quantity for fine-tune purposes. I have to mention that 100% equity may lead to unrealistic backtesting results. Be avare. When backtesting for trading purposes use Contracts or USDT.