CVD Divergence Strategy.1.mmThis is the matching Strategy version of Indicator of the same name.
As a member of the K1m6a Lions discussion community we often use versions of the Cumulative Volume Delta indicator
as one of our primary tools along with RSI, RSI Divergences, Open interest, Volume Profile, TPO and Fibonacci levels.
We also discuss visual interpretations of CVD Divergences across multiple time frames much like RSI divergences.
RSI Divergences can be identified as possible Bullish reversal areas when the RSI is making higher low points while
the price is making lower low points.
RSI Divergences can be identified as possible Bearish reversal areas when the RSI is making lower high points while
the price is making higher high points.
CVD Divergences can also be identified the same way on any timeframe as possible reversal signals. As with RSI, these Divergences
often occur as a trend's momentum is giving way to lower volume and areas when profits are being taken signaling a possible reversal
of the current trending price movement.
Hidden Divergences are identified as calculations that may be signaling a continuation of the current trend.
Having not found any public domain versions of a CVD Divergence indicator I have combined some public code to create this
indicator and matching strategy. The calculations for the Cumulative Volume Delta keep a running total for the differences between
the positive changes in volume in relation to the negative changes in volume. A relative upward spike in CVD is created when
there is a large increase in buying vs a low amount of selling. A relative downward spike in CVD is created when
there is a large increase in selling vs a low amount of buying.
In the settings menu, the is a drop down to be used to view the results in alternate timeframes while the chart remains on current timeframe. The Lookback settings can be adjusted so that the divs show on a more local, spontaneous level if set at 1,1,60,1. For a deeper, wider view of the divs, they can be set higher like 7,7,60,7. Adjust them all to suit your view of the divs.
To create this indicator/strategy I used a portion of the code from "Cumulative Volume Delta" by @ contrerae which calculates
the CVD from aggregate volume of many top exchanges and plots the continuous changes on a non-overlay indicator.
For the identification and plotting of the Divergences, I used similar code from the Tradingview Technical "RSI Divergence Indicator"
This indicator should not be used as a stand-alone but as an additional tool to help identify Bullish and Bearish Divergences and
also Bullish and Bearish Hidden Divergences which, as opposed to regular divergences, may indicate a continuation.
Indicadores e estratégias
Bitcoin Momentum StrategyThis is a very simple long-only strategy I've used since December 2022 to manage my Bitcoin position.
I'm sharing it as an open-source script for other traders to learn from the code and adapt it to their liking if they find the system concept interesting.
General Overview
Always do your own research and backtesting - this script is not intended to be traded blindly (no script should be) and I've done limited testing on other markets beyond Ethereum and BTC, it's just a template to tweak and play with and make into one's own.
The results shown in the strategy tester are from Bitcoin's inception so as to get a large sample size of trades, and potential returns have diminished significantly as BTC has grown to become a mega cap asset, but the script includes a date filter for backtesting and it has still performed solidly in recent years (speaking from personal experience using it myself - DYOR with the date filter).
The main advantage of this system in my opinion is in limiting the max drawdown significantly versus buy & hodl. Theoretically much better returns can be made by just holding, but that's also a good way to lose 70%+ of your capital in the inevitable bear markets (also speaking from experience).
In saying all of that, the future is fundamentally unknowable and past results in no way guarantee future performance.
System Concept:
Capture as much Bitcoin upside volatility as possible while side-stepping downside volatility as quickly as possible.
The system uses a simple but clever momentum-style trailing stop technique I learned from one of my trading mentors who uses this approach on momentum/trend-following stock market systems.
Basically, the system "ratchets" up the stop-loss to be much tighter during high bearish volatility to protect open profits from downside moves, but loosens the stop loss during sustained bullish momentum to let the position ride.
It is invested most of the time, unless BTC is trading below its 20-week EMA in which case it stays in cash/USDT to avoid holding through bear markets. It only trades one position (no pyramiding) and does not trade short, but can easily be tweaked to do whatever you like if you know what you're doing in Pine.
Default parameters:
HTF: Weekly Chart
EMA: 20-Period
ATR: 5-period
Bar Lookback: 7
Entry Rule #1:
Bitcoin's current price must be trading above its higher-timeframe EMA (Weekly 20 EMA).
Entry Rule #2:
Bitcoin must not be in 'caution' condition (no large bearish volatility swings recently).
Enter at next bar's open if conditions are met and we are not already involved in a trade.
"Caution" Condition:
Defined as true if BTC's recent 7-bar swing high minus current bar's low is > 1.5x ATR, or Daily close < Daily 20-EMA.
Trailing Stop:
Stop is trailed 1 ATR from recent swing high, or 20% of ATR if in caution condition (ie. 0.2 ATR).
Exit on next bar open upon a close below stop loss.
I typically use a limit order to open & exit trades as close to the open price as possible to reduce slippage, but the strategy script uses market orders.
I've never had any issues getting filled on limit orders close to the market price with BTC on the Daily timeframe, but if the exchange has relatively low slippage I've found market orders work fine too without much impact on the results particularly since BTC has consistently remained above $20k and highly liquid.
Cost of Trading:
The script uses no leverage and a default total round-trip commission of 0.3% which is what I pay on my exchange based on their tier structure, but this can vary widely from exchange to exchange and higher commission fees will have a significantly negative impact on realized gains so make sure to always input the correct theoretical commission cost when backtesting any script.
Static slippage is difficult to estimate in the strategy tester given the wide range of prices & liquidity BTC has experienced over the years and it largely depends on position size, I set it to 150 points per buy or sell as BTC is currently very liquid on the exchange I trade and I use limit orders where possible to enter/exit positions as close as possible to the market's open price as it significantly limits my slippage.
But again, this can vary a lot from exchange to exchange (for better or worse) and if BTC volatility is high at the time of execution this can have a negative impact on slippage and therefore real performance, so make sure to adjust it according to your exchange's tendencies.
Tax considerations should also be made based on short-term trade frequency if crypto profits are treated as a CGT event in your region.
Summary:
A simple, but effective and fairly robust system that achieves the goals I set for it.
From my preliminary testing it appears it may also work on altcoins but it might need a bit of tweaking/loosening with the trailing stop distance as the default parameters are designed to work with Bitcoin which obviously behaves very differently to smaller cap assets.
Good luck out there!
Inside Candle StrategyIntroduction
The Inside Candle Breakout Strategy leverages the concept of inside candles as a primary signal for potential breakouts. Unlike common trend-following or scalping strategies, this method focuses on the volatility squeeze indicated by inside candles and aims to capture the momentum that follows these periods of consolidation. The strategy's originality lies in its specific integration of timeframes for signal detection and its application across diverse market conditions without relying on conventional trend indicators.
Strategy Description and Mechanics
Inside Candle Identification: At the heart of this strategy is the detection of inside candles, defined as candles fully contained within the range of the preceding candle. This pattern signifies a temporary balance between buyers and sellers, often preceding significant price movements. The strategy scans for these candles within a user-specified timeframe in the input section of the settings of the strategy, allowing for tailored signal generation based on individual trading preferences.
Entry Points and Market Entries: Upon identifying an inside candle and only once this candle closes, the strategy prepares to enter a trade in the direction of the breakout. Trades are executed in the timeframe selected on the chart, ensuring that entry points are aligned with real-time market movements. This process highlights the strategy's adaptability, making it suitable for various trading styles, from day trading to swing trading.
Overlay Indicator for Enhanced Market Analysis: Accompanying the breakout signals is an overlay indicator comprising two moving averages and a volatility cloud. This feature serves as a secondary tool for market analysis, offering insights into the prevailing market trend and volatility levels. While it doesn't influence the entry or exit signals directly, it provides traders with additional context for refining their decisions, enhancing the strategy's utility. This assistance tool is composed by one moving average and a second line which is calculated adding or subtracting the historical volatility of the asset on the moving average, depending on his momentum.
Strategy Results and Commitment to Realism
Backtesting Protocol: In our commitment to transparency and realism, backtesting results are derived from a dataset that ensures a sufficient number of trades (over 100) to validate the strategy's effectiveness. This approach underscores our dedication to providing traders with reliable and actionable insights.
Risk Management and Trade Sizing: Recognizing the importance of sustainable trading practices, the strategy incorporates strict risk management guidelines. Trades are sized to ensure that only a small percentage of equity is risked on a single trade, adhering to widely accepted risk tolerance levels. The initial account size for this script is set to 10000$.
Strategy Defaults and Justification: The default properties of the strategy, including the risk-reward ratio, average length for moving averages, and other parameters, are carefully chosen based on extensive testing and analysis. These settings represent a balanced approach, aiming to optimize the strategy's performance across a variety of market conditions.
Strategy Components:
- Inside Candles: An inside candle occurs when a candle's high and low are completely contained within the high and low of the previous candle. This pattern indicates a period of consolidation or indecision in the market, often preceding a significant price movement. The strategy detects inside candles based on the user-selected timeframe, allowing traders to capture potential breakouts.
Indicator Overlays:
- Moving Average: A simple moving average (SMA) is calculated over a user-defined length (`Average Length`), providing a dynamic baseline to gauge the market's direction. The strategy offers an option (`Show Moving Average`) to display or hide this moving average on the chart, giving traders control over the visual complexity.
- Volatility Measurement: Alongside the moving average, the strategy assesses market volatility using the standard deviation of the closing prices over the same period defined by the `Average Length`. The moving average is adjusted upwards or downwards by this volatility measure, creating a dynamic channel that reflects the current market conditions.
- Color Gradients for Volatility: The strategy uses a color gradient to fill the area between the moving average and its volatility-adjusted counterpart. This gradient visually represents the volatility level, transitioning from gray (low volatility) to a lighter shade (higher volatility), aiding in the assessment of market sentiment and volatility.
Trading Entries:
- Long Entry: A long position is triggered when the closing price exceeds the high of an inside candle, indicating potential bullish momentum. The strategy places a stop-loss at the low of the inside candle and sets a take-profit level based on the predefined risk-reward ratio (`RR Ratio`).
- Short Entry: Conversely, a short position is initiated when the closing price falls below the low of an inside candle, suggesting bearish pressure. A stop-loss is set at the high of the inside candle, with the take-profit level adjusted according to the risk-reward ratio.
Customization Settings:
- Timeframe: Traders can select the desired timeframe for inside candle detection, tailoring the strategy to fit various trading styles and time horizons.
- RR Ratio: The risk-reward ratio is adjustable, allowing traders to manage the potential risk and return of each trade according to their risk tolerance.
- Average Length: This setting determines the period over which the moving average and volatility are calculated, affecting the sensitivity of the strategy to price movements.
- Visual Settings: Users can customize the appearance of the strategy on their charts, including the colors of the moving average and volatility lines, as well as the line width, enhancing chart readability and personal preference adherence.
Disclaimer
Trading involves significant risk, and it is crucial for traders to conduct their own due diligence before engaging with any strategy. The Inside Candle Breakout Strategy is presented for informational purposes only and does not constitute financial advice.
DCA StrategyIntroducing the DCA Strategy, a powerful tool for identifying long entry and exit opportunities in uptrending assets like cryptocurrencies, stocks, and gold. This strategy leverages the Heikin Ashi candlestick pattern and the RSI indicator to navigate potential price swings.
Core Functionality:
Buy Signal : A buy signal is generated when a bullish (green) Heikin Ashi candle appears after a bearish (red) one, indicating a potential reversal in a downtrend. Additionally, the RSI must be below a user-defined threshold (default: 85) to prevent buying overbought assets.
Sell Signal : The strategy exits the trade when the RSI surpasses the user-defined exit level (default: 85), suggesting the asset might be overbought.
Backtesting Flexibility : Users can customize the backtesting period by specifying the start and end years.
Key Advantages:
Trend-Following: Designed specifically for uptrending assets, aiming to capture profitable price movements.
Dynamic RSI Integration: The RSI indicator helps refine entry signals by avoiding overbought situations.
User-Defined Parameters: Allows customization of exit thresholds and backtesting periods to suit individual trading preferences.
Commission and Slippage: The script factors in realistic commission fees (0.1%) and slippage (2%) for a more accurate backtesting experience.
Beats Buy-and-Hold: Backtesting suggests this strategy outperforms a simple buy-and-hold approach in uptrending markets.
Overall, the DCA Strategy offers a valuable approach for traders seeking to capitalize on long opportunities in trending markets with the help of Heikin Ashi candles and RSI confirmation.
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.
Trend Deviation strategy - BTC [IkkeOmar]Intro:
This is an example if anyone needs a push to get started with making strategies in pine script. This is an example on BTC, obviously it isn't a good strategy, and I wouldn't share my own good strategies because of alpha decay.
This strategy integrates several technical indicators to determine market trends and potential trade setups. These indicators include:
Directional Movement Index (DMI)
Bollinger Bands (BB)
Schaff Trend Cycle (STC)
Moving Average Convergence Divergence (MACD)
Momentum Indicator
Aroon Indicator
Supertrend Indicator
Relative Strength Index (RSI)
Exponential Moving Average (EMA)
Volume Weighted Average Price (VWAP)
It's crucial for you guys to understand the strengths and weaknesses of each indicator and identify synergies between them to improve the strategy's effectiveness.
Indicator Settings:
DMI (Directional Movement Index):
Length: This parameter determines the number of bars used in calculating the DMI. A higher length may provide smoother results but might lag behind the actual price action.
Bollinger Bands:
Length: This parameter specifies the number of bars used to calculate the moving average for the Bollinger Bands. A longer length results in a smoother average but might lag behind the price action.
Multiplier: The multiplier determines the width of the Bollinger Bands. It scales the standard deviation of the price data. A higher multiplier leads to wider bands, indicating increased volatility, while a lower multiplier results in narrower bands, suggesting decreased volatility.
Schaff Trend Cycle (STC):
Length: This parameter defines the length of the STC calculation. A longer length may result in smoother but slower-moving signals.
Fast Length: Specifies the length of the fast moving average component in the STC calculation.
Slow Length: Specifies the length of the slow moving average component in the STC calculation.
MACD (Moving Average Convergence Divergence):
Fast Length: Determines the number of bars used to calculate the fast EMA (Exponential Moving Average) in the MACD.
Slow Length: Specifies the number of bars used to calculate the slow EMA in the MACD.
Signal Length: Defines the number of bars used to calculate the signal line, which is typically an EMA of the MACD line.
Momentum Indicator:
Length: This parameter sets the number of bars over which momentum is calculated. A longer length may provide smoother momentum readings but might lag behind significant price changes.
Aroon Indicator:
Length: Specifies the number of bars over which the Aroon indicator calculates its values. A longer length may result in smoother Aroon readings but might lag behind significant market movements.
Supertrend Indicator:
Trendline Length: Determines the length of the period used in the Supertrend calculation. A longer length results in a smoother trendline but might lag behind recent price changes.
Trendline Factor: Specifies the multiplier used in calculating the trendline. It affects the sensitivity of the indicator to price changes.
RSI (Relative Strength Index):
Length: This parameter sets the number of bars over which RSI calculates its values. A longer length may result in smoother RSI readings but might lag behind significant price changes.
EMA (Exponential Moving Average):
Fast EMA: Specifies the number of bars used to calculate the fast EMA. A shorter period results in a more responsive EMA to recent price changes.
Slow EMA: Determines the number of bars used to calculate the slow EMA. A longer period results in a smoother EMA but might lag behind recent price changes.
VWAP (Volume Weighted Average Price):
Default settings are typically used for VWAP calculations, which consider the volume traded at each price level over a specific period. This indicator provides insights into the average price weighted by trading volume.
backtest range and rules:
You can specify the start date for backtesting purposes.
You can can select the desired trade direction: Long, Short, or Both.
Entry and Exit Conditions:
LONG:
DMI Cross Up: The Directional Movement Index (DMI) indicates a bullish trend when the positive directional movement (+DI) crosses above the negative directional movement (-DI).
Bollinger Bands (BB): The price is below the upper Bollinger Band, indicating a potential reversal from the upper band.
Momentum Indicator: Momentum is positive, suggesting increasing buying pressure.
MACD (Moving Average Convergence Divergence): The MACD line is above the signal line, indicating bullish momentum.
Supertrend Indicator: The Supertrend indicator signals an uptrend.
Schaff Trend Cycle (STC): The STC indicates a bullish trend.
Aroon Indicator: The Aroon indicator signals a bullish trend or crossover.
When all these conditions are met simultaneously, the strategy considers it a favorable opportunity to enter a long trade.
SHORT:
DMI Cross Down: The Directional Movement Index (DMI) indicates a bearish trend when the negative directional movement (-DI) crosses above the positive directional movement (+DI).
Bollinger Bands (BB): The price is above the lower Bollinger Band, suggesting a potential reversal from the lower band.
Momentum Indicator: Momentum is negative, indicating increasing selling pressure.
MACD (Moving Average Convergence Divergence): The MACD line is below the signal line, signaling bearish momentum.
Supertrend Indicator: The Supertrend indicator signals a downtrend.
Schaff Trend Cycle (STC): The STC indicates a bearish trend.
Aroon Indicator: The Aroon indicator signals a bearish trend or crossover.
When all these conditions align, the strategy considers it an opportune moment to enter a short trade.
Disclaimer:
THIS ISN'T AN OPTIMAL STRATEGY AT ALL! It was just an old project from when I started learning pine script!
The backtest doesn't promise the same results in the future, always do both in-sample and out-of-sample testing when backtesting a strategy. And make sure you forward test it as well before implementing it!
Furthermore this strategy uses both trend and mean-reversion systems, that is usually a no-go if you want to build robust trend systems .
Don't hesitate to comment if you have any questions or if you have some good notes for a beginner.
Aroon and ASH strategy - ETHERIUM [IkkeOmar]Intro:
This post introduces a Pine Script strategy, as an example if anyone needs a push to get started. This example is a strategy on ETH, obviously it isn't a good strategy, and I wouldn't share my own good strategies because of alpha decay. This strategy combines two technical indicators: Aroon and Absolute Strength Histogram (ASH).
Overview:
The strategy employs the Aroon indicator alongside the Absolute Strength Histogram (ASH) to determine market trends and potential trade setups. Aroon helps identify the strength and direction of a trend, while ASH provides insights into the strength of momentum. By combining these indicators, the strategy aims to capture profitable trading opportunities in Ethereum markets. Normally when developing strats using indicators, you want to find some good indicators, but you NEED to understand their strengths and weaknesses, other indicators can be incorporated to minimize the downs of another indicator. Try to look for synergy in your indicators!
Indicator settings:
Aroon Indicator:
- Two sets of parameters are used for the Aroon indicator:
- For Long Positions: Aroon periods are set to 56 (upper) and 20 (lower).
- For Short Positions: Aroon periods are set to 17 (upper) and 55 (lower).
Absolute Strength Histogram (ASH):
ASH is calculated with a length of 9 bars using the closing price as the data source.
Trading Conditions:
The strategy incorporates specific conditions to initiate and exit trades:
Start Date:
Traders can specify the start date for backtesting purposes.
Trade Direction:
Traders can select the desired trade direction: Long, Short, or Both.
Entry and Exit Conditions:
1. Long Position Entry: A long position is initiated when the Aroon indicator crosses over (crossover) the lower Aroon threshold, indicating a potential uptrend.
2. Long Position Exit: A long position is closed when the Aroon indicator crosses under (crossunder) the lower Aroon threshold.
3. Short Position Entry: A short position is initiated when the Aroon indicator crosses under (crossunder) the upper Aroon threshold, signaling a potential downtrend.
4. Short Position Exit: A short position is closed when the Aroon indicator crosses over (crossover) the upper Aroon threshold.
Disclaimer:
THIS ISN'T AN OPTIMAL STRATEGY AT ALL! It was just an old project from when I started learning pine script!
The backtest doesn't promise the same results in the future, always do both in-sample and out-of-sample testing when backtesting a strategy. And make sure you forward test it as well before implementing it!
How to force strategies fire exit alerts not reversalsPineScript has gone a long way, from very simple and little-capable scripting language to a robust coding platform with reliable execution endpoints. However, this one small intuitivity glitch is still there and is likely to stay, because it is traditionally justified and quite intuitive for significant group of traders. I'm sharing this workaround in response to frequent inquiries about it.
What's the glitch? When setting alerts on strategies to be synchronized with TradingView's Strategy Tester events, using simple alert messages such as "buy" or "sell" based on entry direction seems straightforward by inserting {{strategy.order.action}} into the Create Alert's "Message" field. Because "buy" or "sell" are exactly the strings produced by {{strategy.order.action}} placeholder. However, complications arise when attempting to EXIT positions without reversing, whether triggered by price levels like Stop Loss or Take Profit, or logical conditions to close trades. Those bricks fall apart, because on such events {{strategy.order.action}} sends the same "sell" for exiting buy positions and "buy" for exiting sell positions, instead of something more differentiating like "closebuy" or "closesell". As a result reversal trades are opened, instead of simply closing the open ones.
This convention harkens back to traditional stock market practices, where traders either bought shares to enter positions or sold them to exit. However, modern trading encompasses diverse instruments like CFDs, indices, and Forex, alongside advanced features such as Stop Loss, reshaping the landscape. Despite these advancements, the traditional nomenclature persists.
And is poised to stay on TradingView as well, so we need a workaround to get a simple strategy going. Luckily it is here and is called alert_message . It is a parameter, which needs to be added into each strategy.entry() / strategy.exit() / strategy.close() function call - each call, which causes Strategy Tester to produce entry or exit orders. As in this example script:
line 12: strategy.entry(... alert_message ="buy")
line 14: strategy.entry(... alert_message ="sell")
line 19: strategy.exit(... alert_message ="closebuy")
line 20: strategy.exit(... alert_message ="closesell")
line 24: strategy.close(... alert_message ="closebuy")
line 26: strategy.close(... alert_message ="closesell")
These alert messages are compatible with the Alerts Syntax of TradingConnector - a tool facilitating auto-execution of TradingView alerts in MetaTrader 4 or 5. Yes, simple alert messages like "buy" / "sell" / "closebuy" / "closesell" suffice to carry the execution of simple strategy, without complex JSON files with multiple ids and such. Other parameters can be added (actually plenty), but they are only option and that's not a part of this story :)
Last thing left to do is to replace "Message" in Create Alert popup with {{strategy.order.alert_message}} . This placeholder transmits the string defined in the PineScript alert_message= parameter, as outlined in this publication. With this workaround, executing closing alerts becomes seamless within PineScript strategies on TradingView.
Disclaimer: this content is purely educational, especially please don't pay attention to backtest results on any timeframe/ticker.
Strategy / Connectable [Azullian]The connectable strategy serves as a foundational component in our indicator system on TradingView, designed for intuitive testing, visualization, and construction of trading strategies. In concert with the connectable signal filter , it forms a cohesive unit that allows for efficient signal processing and strategy implementation. This integration enables the strategy to receive and act on weighted signals from various connectable indicators, making it a versatile tool for both novice and experienced traders.
Let's review the separate parts of this indicator.
█ STRATEGY INPUTS
We've provided an input to connect a signal filter or indicators or chains (→) which is set to 'Close' by default.
An input has several controls:
• Input: Connect indicators or signal filter here, choose indicators with a compatible : Signal connector.
• SM - Signal Mode: Choose a trading direction compatible with the settings in your signal filter
█ POSITION INVESTMENT
Determine the percentage of your trading budget you would like to use in each position based on the strategy's profit or loss.
• LINVB - Loss Investment Base: Choose which base to use to determine the investment percentage when the strategy is in a loss.
○ Equity: Use the equity as the base for percentage calculation.
○ Initial capital: Use the initial capital as the base for percentage calculation.
• LINV% - Loss Investment Percentage: Set a percentage of the chosen investment base as the investment for a new position.
○ For example, when 10% in loss, and a initial capital of $100, and the investment base is set to equity with a percentage of 50%, your investment will be 50% of $90, $45.
• PINVB - Profit Investment Base: Choose which base to use to determine the investment percentage when the strategy is in profit.
○ Equity: Use the equity as the base for percentage calculation.
○ Initial capital: Use the initial capital as the base for percentage calculation.
• PINV% - Profit Investment Percentage: Set a percentage of the chosen investment base as the investment for a new position.
○ For example, when 10% in profit, and an initial capital of $100, and the investment base is set to equity with a percentage of 100%, your investment will be 100% of $110, $110.
• RISK% - Risk Percentage:
○ Determine how much of the calculated position investment is at risk when the stop-loss is hit.
- For example, 1% of $45 represents a maximum loss of $0.45.
○ Risk percentage works together with the stop loss and the max leverage.
• MXLVG - Maximum Leverage:
○ Investigate the trading rules for your trading pair and use the maximum allowed amount of leverage.
○ To determine the number of contracts to be bought or sold, considering the stop loss and the specified risk percentage, the maximum leverage available will constrain the amount of leverage utilized to ensure that the maximum risk threshold is not exceeded. For instance, suppose the stop loss is set at 1%, and the risk percentage is defined as 10%. Initially, the calculated leverage to be used would be 10. However, if there is a maximum leverage cap set at 5, it would constrain the calculated leverage of 10 to adhere to the maximum limit of 5.
█ EXIT STOP LOSS
Determine the Stop Loss price based on your selected configuration.
As the stop loss is an integral part of the ordered contracts calculation used in conjunction with the Risk and Max leverage, you'll always need to provide a stop loss price.
• SLB - Stop Loss Base: Choose a stop loss mode for calculating stop loss prices.
○ Risk: Determines the price using the Risk parameter (RISK%) and maximum leverage (MXLVG). In this case, SLB% will not have any impact.
○ Price Entry + Offset: Calculates the stop loss price based on a offset percentage (SLB%) from the entry price of the position.
• SLB% - Stop Loss Base Percentage: Define an offset percentage that will be applied in the price entry + offset stop loss mode.
• SLT - Stop Loss Trailing:
○ Fixed: The initial stop loss will be kept and no trailing stop loss will be applied.
○ Trail Price: Computes the trailing stop loss price based on an offset percentage (SLT%) from the closing price of the current candle.
- If a better stop loss price is calculated, it will be set as the new stop loss price.
○ Trail Incr: Adapts the trailing stop loss price based on the offset percentage (SLT%).
- Each price change in favor of your position will incrementally adapt the trailing stop loss with SLT%.
• SLT% - Stop Loss Trailing Percentage: This percentage serves as an offset or increment depending on your chosen trailing mode.
█ EXIT TAKE PROFIT
Determine the Take Profit price based on your selected configuration.
• TPB - Take Profit Base: Choose a take profit mode for calculating take profit prices.
○ Reward: Determines the take profit price using the Risk parameter (RISK%) and the calculated Stop Loss price and the set reward percentage (TPB%).
- For example: Risk 1%, Calculated Stop loss price: $90, Entry price: $100, Reward (TPB%): 2%, will result in a take profit price on $120.
○ Price Entry + Offset: Calculates the take profit price based on a offset percentage (TPB%) from the entry price of the position.
- For example: Entry price: $100, Offset (TPB%): 2%, will result in a take profit price on $102.
• TPB% - Take Profit Base Percentage: Define an offset percentage that will be applied in the price entry + offset take profit mode.
• TPT - Take Profit Trailing:
○ Fixed: The initial take profit will be kept and no trailing take profit will be applied.
○ Trail Price: Computes the trailing take profit price based on an offset percentage (TPT%) from the closing price of the current candle.
- If an applicable take profit price is calculated, it will be set as the new take profit price.
○ Trail Incr: Adapts the trailing take profit price based on the offset percentage (TPT%). Each price change against your position will incrementally adapt the trailing take profit with TPT%.
• TPT% - Take Profit Trailing Percentage: This percentage serves as an offset or increment depending on your chosen trailing mode.
█ STRATEGY CONDITIONS
Specify when the strategy is permitted to execute trades.
• DATE: Enable the Date Range filter to restrict entries to a specific date range.
○ START: Set a start date and hour to commence trading.
○ END: Set an end date and hour to conclude trading within the defined range.
■ VISUALS
• LINE: Activate a colored dashed diagonal line to visually connect the entry and exit points of positions.
• SLTP: Enable visualization of stop loss, take profit, and break-even levels.
• PNL: Enable Break-Even and Close Lines along with a colored area in between to visualize profit and loss.
• ☼: Brightness % : Adjust the opacity of the plotted trading visuals.
• P - Profit Color : Choose the color for profit-related elements.
• L - Loss Color: Choose the color for loss-related elements.
• B - Breakeven Color : Select the color for break-even points.
• EL - Long Color: Specify the color for long positions.
• ES - Short Color: Specify the color for short positions.
• TRADE LABELING: For better analysis we've labeled all entries and exits conform with the type of order your strategy has executed, some examples:
○ XL-TP-150: Exit Long - Take Profit - Position 150
○ XS-TP-154: Exit Short - Take Profit - Position 154
○ XL-SL-160: Exit Long - Stop Loss - Position 160
○ XS-SL-164: Exit Short - Stop Loss - Position 164
█ USAGE OF CONNECTABLE INDICATORS
■ Connectable chaining mechanism
Connectable indicators can be connected directly to the signal monitor, signal filter or strategy , or they can be daisy chained to each other while the last indicator in the chain connects to the signal monitor, signal filter or strategy. When using a signal filter you can chain the filter to the strategy input to make your chain complete.
• Direct chaining: Connect an indicator directly to the signal monitor, signal filter or strategy through the provided inputs (→).
• Daisy chaining: Connect indicators using the indicator input (→). The first in a daisy chain should have a flow (⌥) set to 'Indicator only'. Subsequent indicators use 'Both' to pass the previous weight. The final indicator connects to the signal monitor, signal filter, or strategy.
■ Set up the strategy with a signal filter and an RSI indicator
Let's connect the Strategy to a connectable signal filter and a connectable RSI indicator :
1. Load all relevant indicators
• Load RSI / Connectable
• Load Signal filter / Connectable
• Load Strategy / Connectable
2. Signal Filter: Connect the RSI to the Signal Filter
• Open the signal filter settings
• Choose one of the three input dropdowns (1→, 2→, 3→) and choose : RSI / Connectable: Signal Connector
• Toggle the enable box before the connected input to enable the incoming signal
3. Signal Filter: Update the filter signals settings if needed
• The default settings of the filter enable EL (Enter Long), XL (Exit Long), ES (Enter Short) and XS (Exit Short).
4. Signal Filter: Update the weight threshold settings if needed
• All connectable indicators load by default with a score of 6 for each direction (EL, XL, ES, XS)
• By default, weight threshold (TH) is set at 5. This allows each occurrence to score, as the default score in each connectable indicator is 1 point above the threshold. Adjust to your liking.
5. Strategy: Connect the strategy to the signal filter in the strategy settings
• Select the strategy input → and select the Signal filter: Signal connector
6. Strategy: Enable filter compatible directions
• Set the signal mode of the strategy to a compatible direction with the signal filter.
Now that everything is connected, you'll notice green spikes in the signal filter representing long signals, and red spikes indicating short signals. Trades will also appear on the chart, complemented by a performance overview. Your journey is just beginning: delve into different scoring mechanisms, merge diverse connectable indicators, and craft unique chains. Instantly test your results and discover the potential of your configurations. Dive deep and enjoy the process!
█ BENEFITS
• Adaptable Modular Design: Arrange indicators in diverse structures via direct or daisy chaining, allowing tailored configurations to align with your analysis approach.
• Streamlined Backtesting: Simplify the iterative process of testing and adjusting combinations, facilitating a smoother exploration of potential setups.
• Intuitive Interface: Navigate TradingView with added ease. Integrate desired indicators, adjust settings, and establish alerts without delving into complex code.
• Signal Weight Precision: Leverage granular weight allocation among signals, offering a deeper layer of customization in strategy formulation.
• Advanced Signal Filtering: Define entry and exit conditions with more clarity, granting an added layer of strategy precision.
• Clear Visual Feedback: Distinct visual signals and cues enhance the readability of charts, promoting informed decision-making.
• Standardized Defaults: Indicators are equipped with universally recognized preset settings, ensuring consistency in initial setups across different types like momentum or volatility.
• Reliability: Our indicators are meticulously developed to prevent repainting. We strictly adhere to TradingView's coding conventions, ensuring our code is both performant and clean.
█ COMPATIBLE INDICATORS
Each indicator that incorporates our open-source 'azLibConnector' library and adheres to our conventions can be effortlessly integrated and used as detailed above.
For clarity and recognition within the TradingView platform, we append the suffix ' / Connectable' to every compatible indicator.
█ COMMON MISTAKES AND CLARIFICATIONS
• Removing an indicator from a chain: Deleting a linked indicator and confirming the "remove study tree" alert will also remove all underlying indicators in the object tree. Before removing one, disconnect the adjacent indicators and move it to the object stack's bottom.
• Point systems: The azLibConnector provides 500 points for each direction (EL: Enter long, XL: Exit long, ES: Enter short, XS: Exit short) Remember this cap when devising a point structure.
• Flow misconfiguration: In daisy chains the first indicator should always have a flow (⌥) setting of 'indicator only' while other indicator should have a flow (⌥) setting of 'both'.
• Recalculate: While this strategy has undergone extensive testing, enabling recalculation options like 'After order is filled' or 'On every tick' may lead to unexpected behavior.
• Fill orders: The strategy is thoroughly tested, yet enabling fill order options such as 'Using bar magnifier', 'On bar close', or 'Using standard OHLC' might result in unexpected outcomes.
• Layout and abbreviations: To maintain a consistent structure, we use abbreviations for each input. While this may initially seem complex, you'll quickly become familiar with them. Each abbreviation is also explained in the inline tooltips.
• Optimized for crypto trading: While many principles are common across markets, this strategy is specifically optimized and tested for crypto trading.
• Inputs: Connecting a connectable indicator directly to the strategy delivers the raw signal without a weight threshold, meaning every signal will trigger a trade.
█ A NOTE OF GRATITUDE
Through years of exploring TradingView and Pine Script, we've drawn immense inspiration from the community's knowledge and innovation. Thank you for being a constant source of motivation and insight.
█ RISK DISCLAIMER
Azullian's content, tools, scripts, articles, and educational offerings are presented purely for educational and informational uses. Please be aware that past performance should not be considered a predictor of future results.
Bitcoin Leverage Sentiment - Strategy [presentTrading]█ Introduction and How it is Different
The "Bitcoin Leverage Sentiment - Strategy " represents a novel approach in the realm of cryptocurrency trading by focusing on sentiment analysis through leveraged positions in Bitcoin. Unlike traditional strategies that primarily rely on price action or technical indicators, this strategy leverages the power of Z-Score analysis to gauge market sentiment by examining the ratio of leveraged long to short positions. By assessing how far the current sentiment deviates from the historical norm, it provides a unique lens to spot potential reversals or continuation in market trends, making it an innovative tool for traders who wish to incorporate market psychology into their trading arsenal.
BTC 4h L/S Performance
local
█ Strategy, How It Works: Detailed Explanation
🔶 Data Collection and Ratio Calculation
Firstly, the strategy acquires data on leveraged long (**`priceLongs`**) and short positions (**`priceShorts`**) for Bitcoin. The primary metric of interest is the ratio of long positions relative to the total of both long and short positions:
BTC Ratio=priceLongs / (priceLongs+priceShorts)
This ratio reflects the prevailing market sentiment, where values closer to 1 indicate a bullish sentiment (dominance of long positions), and values closer to 0 suggest bearish sentiment (prevalence of short positions).
🔶 Z-Score Calculation
The Z-Score is then calculated to standardize the BTC Ratio, allowing for comparison across different time periods. The Z-Score formula is:
Z = (X - μ) / σ
Where:
- X is the current BTC Ratio.
- μ is the mean of the BTC Ratio over a specified period (**`zScoreCalculationPeriod`**).
- σ is the standard deviation of the BTC Ratio over the same period.
The Z-Score helps quantify how far the current sentiment deviates from the historical norm, with high positive values indicating extreme bullish sentiment and high negative values signaling extreme bearish sentiment.
🔶 Signal Generation: Trading signals are derived from the Z-Score as follows:
Long Entry Signal: Occurs when the BTC Ratio Z-Score crosses above the thresholdLongEntry, suggesting bullish sentiment.
- Condition for Long Entry = BTC Ratio Z-Score > thresholdLongEntry
Long Exit/Short Entry Signal: Triggered when the BTC Ratio Z-Score drops below thresholdLongExit for exiting longs or below thresholdShortEntry for entering shorts, indicating a shift to bearish sentiment.
- Condition for Long Exit/Short Entry = BTC Ratio Z-Score < thresholdLongExit or BTC Ratio Z-Score < thresholdShortEntry
Short Exit Signal: Happens when the BTC Ratio Z-Score exceeds the thresholdShortExit, hinting at reducing bearish sentiment and a potential switch to bullish conditions.
- Condition for Short Exit = BTC Ratio Z-Score > thresholdShortExit
🔶Implementation and Visualization: The strategy applies these conditions for trade management, aligning with the selected trade direction. It visualizes the BTC Ratio Z-Score with horizontal lines at entry and exit thresholds, illustrating the current sentiment against historical norms.
█ Trade Direction
The strategy offers flexibility in trade direction, allowing users to choose between long, short, or both, depending on their market outlook and risk tolerance. This adaptability ensures that traders can align the strategy with their individual trading style and market conditions.
█ Usage
To employ this strategy effectively:
1. Customization: Begin by setting the trade direction and adjusting the Z-Score calculation period and entry/exit thresholds to match your trading preferences.
2. Observation: Monitor the Z-Score and its moving average for potential trading signals. Look for crossover events relative to the predefined thresholds to identify entry and exit points.
3. Confirmation: Consider using additional analysis or indicators for signal confirmation, ensuring a comprehensive approach to decision-making.
█ Default Settings
- Trade Direction: Determines if the strategy engages in long, short, or both types of trades, impacting its adaptability to market conditions.
- Timeframe Input: Influences signal frequency and sensitivity, affecting the strategy's responsiveness to market dynamics.
- Z-Score Calculation Period: Affects the strategy’s sensitivity to market changes, with longer periods smoothing data and shorter periods increasing responsiveness.
- Entry and Exit Thresholds: Set the Z-Score levels for initiating or exiting trades, balancing between capturing opportunities and minimizing false signals.
- Impact of Default Settings: Provides a balanced approach to leverage sentiment trading, with adjustments needed to optimize performance across various market conditions.
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值以下。
TTP Intelligent AccumulatorThe intelligent accumulator is a proof of concept strategy. A hybrid between a recurring buy and TA-based entries and exits.
Distribute the amount of equity and add to your position as long as the TA condition is valid.
Use the exit TA condition to define your exit strategy.
Decide between adding only into losing positions to average down or take a riskier approach by allowing to add into a winning position as well.
Take full profit or distribute your exit into multiple take profit exists of the same size.
You can also decide if you allow your exit conditions to close your position in a loss or require a minimum take profit %.
The strategy includes a default built-in TA conditions just for showcasing the idea but the final intent of this script is to delegate the TA entries and exists to external sources.
The internal conditions use RSI length 7 crossing below the BB with std 1 for entries and above for exits.
To control the number of orders use the properties from settings:
- adjust the pyramiding
- adjust the percentage of equity
- make sure that pyramiding * % equity equals 100 to prevent over use of equity (unless using leverage)
The script is designed as an alternative to daily or weekly recurring buys but depending on the accuracy of your TA conditions it might prove profitable also in lower timeframes.
The reason the script is named Intelligent is because recurring buy is most commonly used without any decision making: buy no matter what with certain frequency. This strategy seeks to still perform recurring buys but filtering out some of the potential bad entries that can delay unnecessarily seeing the position in profits. The second reason is also securing an exit strategy from the beginning which no recurring buy option offers out-of-the-box.
Long EMA Strategy with Advanced Exit OptionsThis strategy is designed for traders seeking a trend-following system with a focus on precision and adaptability.
**Core Strategy Concept**
The essence of this strategy lies in use of Exponential Moving Averages (EMAs) to identify potential long (buy) positions based on the relative positions of short-term, medium-term, and long-term EMAs. The use of EMAs is a classic yet powerful approach to trend detection, as these indicators smooth out price data over time, emphasizing the direction of recent price movements and potentially signaling the beginning of new trends.
**Customizable Parameters**
- **EMA Periods**: Users can define the periods for three EMAs - long-term, medium-term, and short-term - allowing for a tailored approach to capture trends based on individual trading styles and market conditions.
- **Volatility Filter**: An optional Average True Range (ATR)-based volatility filter can be toggled on or off. When activated, it ensures that trades are only entered when market volatility exceeds a user-defined threshold, aiming to filter out entries during low-volatility periods which are often characterized by indecisive market movements.
- **Trailing Stop Loss**: A trailing stop loss mechanism, expressed as a percentage of the highest price achieved since entry, provides a dynamic way to manage risk by allowing profits to run while cutting losses.
- **EMA Exit Condition**: This advanced exit option enables closing positions when the short-term EMA crosses below the medium-term EMA, serving as a signal that the immediate trend may be reversing.
- **Close Below EMA Exit**: An additional exit condition, which is disabled by default, allows positions to be closed if the price closes below a user-selected EMA. This provides an extra layer of flexibility and risk management, catering to traders who prefer to exit positions based on specific EMA thresholds.
**Operational Mechanics**
Upon activation, the strategy evaluates the current price in relation to the set EMAs. A long position is considered when the current price is above the long-term EMA, and the short-term EMA is above the medium-term EMA. This setup aims to identify moments where the price momentum is strong and likely to continue.
The strategy's versatility is further enhanced by its optional settings:
- The **Volatility Filter** adjusts the sensitivity of the strategy to market movements, potentially improving the quality of the entries during volatile market conditions.
The Average True Range (ATR) is a key component of this filter, providing a measure of market volatility by calculating the average range between the high and low prices over a specified number of periods. Here's how you can adjust the volatility filter settings for various market conditions, focusing on filtering out low-volatility markets:
Setting Examples for Volatility Filter
1. High Volatility Markets (e.g., Cryptocurrencies, Certain Forex Pairs):
ATR Periods: 14 (default)
ATR Multiplier: Setting the multiplier to a lower value, such as 1.0 or 1.2, can be beneficial in high-volatility markets. This sensitivity allows the strategy to react to volatility changes more quickly, ensuring that you're entering trades during periods of significant movement.
2. Medium Volatility Markets (e.g., Major Equity Indices, Medium-Volatility Forex Pairs):
ATR Periods: 14 (default)
ATR Multiplier: A multiplier of 1.5 (default) is often suitable for medium volatility markets. It provides a balanced approach, ensuring that the strategy filters out low-volatility conditions without being overly restrictive.
3. Low Volatility Markets (e.g., Some Commodities, Low-Volatility Forex Pairs):
ATR Periods: Increasing the ATR period to 20 or 25 can smooth out the volatility measure, making it less sensitive to short-term fluctuations. This adjustment helps in focusing on more significant trends in inherently stable markets.
ATR Multiplier: Raising the multiplier to 2.0 or even 2.5 increases the threshold for volatility, effectively filtering out low-volatility conditions. This setting ensures that the strategy only triggers trades during periods of relatively higher volatility, which are more likely to result in significant price movements.
How to Use the Volatility Filter for Low-Volatility Markets
For traders specifically interested in filtering out low-volatility markets, the key is to adjust the ATR Multiplier to a higher level. This adjustment increases the threshold required for the market to be considered sufficiently volatile for trade entries. Here's a step-by-step guide:
Adjust the ATR Multiplier: Increase the ATR Multiplier to create a higher volatility threshold. A multiplier of 2.0 to 2.5 is a good starting point for very low-volatility markets.
Fine-Tune the ATR Periods: Consider lengthening the ATR calculation period if you find that the strategy is still entering trades in undesirable low-volatility conditions. A longer period provides a more averaged-out measure of volatility, which might better suit your needs.
Monitor and Adjust: Volatility is not static, and market conditions can change. Regularly review the performance of your strategy in the context of current market volatility and adjust the settings as necessary.
Backtest in Different Conditions: Before applying the strategy live, backtest it across different market conditions with your adjusted settings. This process helps ensure that your approach to filtering low-volatility conditions aligns with your trading objectives and risk tolerance.
By fine-tuning the volatility filter settings according to the specific characteristics of the market you're trading in, you can enhance the performance of this strategy
- The **Trailing Stop Loss** and **EMA Exit Conditions** provide two layers of exit strategies, focusing on capital preservation and profit maximization.
**Visualizations**
For clarity and ease of use, the strategy plots the three EMAs and, if enabled, the ATR threshold on the chart. These visual cues not only aid in decision-making but also help in understanding the market's current trend and volatility state.
**How to Use**
Traders can customize the EMA periods to fit their trading horizon, be it short, medium, or long-term trading. The volatility filter and exit options allow for further customization, making the strategy adaptable to different market conditions and personal risk tolerance levels.
By offering a blend of trend-following principles with advanced risk management features, this strategy aims to cater to a wide range of trading styles, from cautious to aggressive. Its strength lies in its flexibility, allowing traders to fine-tune settings to their specific needs, making it a potentially valuable tool in the arsenal of any trader looking for a disciplined approach to navigating the markets.
Octopus Nest Strategy Hello Fellas,
Hereby, I come up with a popular strategy from YouTube called Octopus Nest Strategy. It is a no repaint, lower timeframe scalping strategy utilizing PSAR, EMA and TTM Squeeze.
The strategy considers these market factors:
PSAR -> Trend
EMA -> Trend
TTM Squeeze -> Momentum and Volatility by incorporating Bollinger Bands and Keltner Channels
Note: As you can see there is a potential improvement by incorporating volume.
What's Different Compared To The Original Strategy?
I added an option which allows users to use the Adaptive PSAR of @loxx, which will hopefully improve results sometimes.
Signals
Enter Long -> source above EMA 100, source crosses above PSAR and TTM Squeeze crosses above 0
Enter Short -> source below EMA 100, source crosses below PSAR and TTM Squeeze crosses below 0
Exit Long and Exit Short are triggered from the risk management. Thus, it will just exit on SL or TP.
Risk Management
"High Low Stop Loss" and "Automatic High Low Take Profit" are used here.
High Low Stop Loss: Utilizes the last high for short and the last low for long to calculate the stop loss level. The last high or low gets multiplied by the user-defined multiplicator and if no recent high or low was found it uses the backup multiplier.
Automatic High Low Take Profit: Utilizes the current stop loss level of "High Low Stop Loss" and gets calculated by the user-defined risk ratio.
Now, follows the bunch of knowledge for the more inexperienced readers.
PSAR: Parabolic Stop And Reverse; Developed by J. Welles Wilders and a classic trend reversal indicator.
The indicator works most effectively in trending markets where large price moves allow traders to capture significant gains. When a security’s price is range-bound, the indicator will constantly be reversing, resulting in multiple low-profit or losing trades.
TTM Squeeze: TTM Squeeze is a volatility and momentum indicator introduced by John Carter of Trade the Markets (now Simpler Trading), which capitalizes on the tendency for price to break out strongly after consolidating in a tight trading range.
The volatility component of the TTM Squeeze indicator measures price compression using Bollinger Bands and Keltner Channels. If the Bollinger Bands are completely enclosed within the Keltner Channels, that indicates a period of very low volatility. This state is known as the squeeze. When the Bollinger Bands expand and move back outside of the Keltner Channel, the squeeze is said to have “fired”: volatility increases and prices are likely to break out of that tight trading range in one direction or the other. The on/off state of the squeeze is shown with small dots on the zero line of the indicator: red dots indicate the squeeze is on, and green dots indicate the squeeze is off.
EMA: Exponential Moving Average; Like a simple moving average, but with exponential weighting of the input data.
Don't forget to check out the settings and keep it up.
Best regards,
simwai
---
Credits to:
@loxx
@Bjorgum
@Greeny
Triple MA HTF strategy - Dynamic SmoothingThe triple MA strategy is a simple but effective method to trade the trend. The advantage of this script over the existing triple MA strategies is that the user can open a lower time frame chart and select higher time frame inputs for different MA types mainting the visibility on the chart. The dynamic smoothing code makes sure the HTF trendlines are not jagged, but a fluid line visiable on the lower time frame chart. The script comes with a MA crossover and crossunder strategy explained below.
Moving Averages (MA) Crossover for Entry:
Long Entry: A long entry signal is triggered when the moving average line 1 crosses above the moving average line 2. This crossover indicates a potential shift in market sentiment towards the upside. However, to validate this signal, the strategy checks if the moving average 3 on a higher time frame (eg. 4 hour) is in an upward trend. This additional filter ensures that the trade aligns with the prevailing trend on a broader time scale, increasing the probability of success.
Short Entry: Conversely, a short entry signal occurs when the moving average line 1 crosses below the moving average line 2. This crossover suggests a possible downturn in market momentum. However, for a short trade to be confirmed, the strategy verifies that the moving average 3 on the higher time frame is in a downward trend. This confirmation ensures that the trade is in harmony with the overarching market direction.
Exit from Long Position: The strategy triggers an exit signal from a long position when the moving average line 1 crosses below the moving average line 2. This crossover indicates a potential reversal in the market trend, prompting the trader to close their long position and take profits or minimize losses.
Exit from Short Position: Similarly, an exit signal from a short position occurs when the moving average line 1 crosses above the moving average line 2. This crossover suggests a potential shift in market sentiment towards the upside, prompting the trader to exit their short position and manage their risk accordingly.
Features of the script
This Triple MA Strategy is basically the HTF Trend Filter displayed 3 times on the chart. For more infomation on how the MA with dynamic smoothing is calculated I recommend reading the following script:
For risk management I included a simple script to opt for % of eauity or # of contracts of in the instrument. For explanation on how the risk management settings work I refer to my ealier published script:
The strategy is a simplified example for setting up an entry and exit logic based on multiple moving avarages. Hence the script is meant for educational purposes only.
Crypto MVRV ZScore - Strategy [PresentTrading]█ Introduction and How it is Different
The "Crypto Valuation Extremes: MVRV ZScore - Strategy " represents a cutting-edge approach to cryptocurrency trading, leveraging the Market Value to Realized Value (MVRV) Z-Score. This metric is pivotal for identifying overvalued or undervalued conditions in the crypto market, particularly Bitcoin. It assesses the current market valuation against the realized capitalization, providing insights that are not apparent through conventional analysis.
BTCUSD 6h Long/Short Performance
Local
█ Strategy, How It Works: Detailed Explanation
The strategy leverages the Market Value to Realized Value (MVRV) Z-Score, specifically designed for cryptocurrencies, with a focus on Bitcoin. This metric is crucial for determining whether Bitcoin is currently undervalued or overvalued compared to its historical 'realized' price. Below is an in-depth explanation of the strategy's components and calculations.
🔶Conceptual Foundation
- Market Capitalization (MC): This represents the total dollar market value of Bitcoin's circulating supply. It is calculated as the current price of Bitcoin multiplied by the number of coins in circulation.
- Realized Capitalization (RC): Unlike MC, which values all coins at the current market price, RC is computed by valuing each coin at the price it was last moved or traded. Essentially, it is a summation of the value of all bitcoins, priced at the time they were last transacted.
- MVRV Ratio: This ratio is derived by dividing the Market Capitalization by the Realized Capitalization (The ratio of MC to RC (MVRV Ratio = MC / RC)). A ratio greater than 1 indicates that the current price is higher than the average price at which all bitcoins were purchased, suggesting potential overvaluation. Conversely, a ratio below 1 suggests undervaluation.
🔶 MVRV Z-Score Calculation
The Z-Score is a statistical measure that indicates the number of standard deviations an element is from the mean. For this strategy, the MVRV Z-Score is calculated as follows:
MVRV Z-Score = (MC - RC) / Standard Deviation of (MC - RC)
This formula quantifies Bitcoin's deviation from its 'normal' valuation range, offering insights into market sentiment and potential price reversals.
🔶 Spread Z-Score for Trading Signals
The strategy refines this approach by calculating a 'spread Z-Score', which adjusts the MVRV Z-Score over a specific period (default: 252 days). This is done to smooth out short-term market volatility and focus on longer-term valuation trends. The spread Z-Score is calculated as follows:
Spread Z-Score = (Market Z-Score - MVVR Ratio - SMA of Spread) / Standard Deviation of Spread
Where:
- SMA of Spread is the simple moving average of the spread over the specified period.
- Spread refers to the difference between the Market Z-Score and the MVRV Ratio.
🔶 Trading Signals
- Long Entry Condition: A long (buy) signal is generated when the spread Z-Score crosses above the long entry threshold, indicating that Bitcoin is potentially undervalued.
- Short Entry Condition: A short (sell) signal is triggered when the spread Z-Score falls below the short entry threshold, suggesting overvaluation.
These conditions are based on the premise that extreme deviations from the mean (as indicated by the Z-Score) are likely to revert to the mean over time, presenting opportunities for strategic entry and exit points.
█ Practical Application
Traders use these signals to make informed decisions about opening or closing positions in the Bitcoin market. By quantifying market valuation extremes, the strategy aims to capitalize on the cyclical nature of price movements, identifying high-probability entry and exit points based on historical valuation norms.
█ Trade Direction
A unique feature of this strategy is its configurable trade direction. Users can specify their preference for engaging in long positions, short positions, or both. This flexibility allows traders to tailor the strategy according to their risk tolerance, market outlook, or trading style, making it adaptable to various market conditions and trader objectives.
█ Usage
To implement this strategy, traders should first adjust the input parameters to align with their trading preferences and risk management practices. These parameters include the trade direction, Z-Score calculation period, and the thresholds for long and short entries. Once configured, the strategy automatically generates trading signals based on the calculated spread Z-Score, providing clear indications for potential entry and exit points.
It is advisable for traders to backtest the strategy under different market conditions to validate its effectiveness and adjust the settings as necessary. Continuous monitoring and adjustment are crucial, as market dynamics evolve over time.
█ Default Settings
- Trade Direction: Both (Allows for both long and short positions)
- Z-Score Calculation Period: 252 days (Approximately one trading year, capturing a comprehensive market cycle)
- Long Entry Threshold: 0.382 (Indicative of moderate undervaluation)
- Short Entry Threshold: -0.382 (Signifies moderate overvaluation)
These default settings are designed to balance sensitivity to market valuation extremes with a pragmatic approach to trade execution. They aim to filter out noise and focus on significant market movements, providing a solid foundation for both new and experienced traders looking to exploit the unique insights offered by the MVRV Z-Score in the cryptocurrency market.
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.
Supertrend & CCI Strategy ScalpThis strategy is based on 2 Super Trend Indicators along with CCI .
The longer factor length gives you the current trend and the deviation in the short factor length gives us the opportunity to enter in the trade .
CCI indicator is used to determine the overbought and oversold levels.
Setup :
Long : When atrLength1 > close and atrLength2 < close and CCI < -100 we look for long trades as the longer factor length will be bullish .
Short : When atrLength1 < close and atrLength2 > close and CCI > 100 we look for short trades as the longer factor length will be bearish .
Please tune the settings according to your use .
Trade what you see not what you feel .
Please consult with your financial advisor before you deploy any real money for trading .
PresentTrend RMI Synergy - Strategy [presentTrading] █ Introduction and How it is Different
The "PresentTrend RMI Synergy Strategy" is the combined power of the Relative Momentum Index (RMI) and a custom presentTrend indicator. This strategy introduces a multifaceted approach, integrating momentum analysis with trend direction to offer traders a more nuanced and responsive trading mechanism.
BTCUSD 6h L/S Performance
Local
█ Strategy, How It Works: Detailed Explanation
The "PresentTrend RMI Synergy Strategy" intricately combines the Relative Momentum Index (RMI) and a custom SuperTrend indicator to create a powerful tool for traders.
🔶 Relative Momentum Index (RMI)
The RMI is a variation of the Relative Strength Index (RSI), but instead of using price closes against itself, it measures the momentum of up and down movements in price relative to previous prices over a given period. The RMI for a period length `N` is calculated as follows:
RMI = 100 - 100/ (1 + U/D)
where:
- `U` is the average upward price change over `N` periods,
- `D` is the average downward price change over `N` periods.
The RMI oscillates between 0 and 100, with higher values indicating stronger upward momentum and lower values suggesting stronger downward momentum.
RMI = 21
RMI = 42
For more information - RMI Trend Sync - Strategy :
🔶 presentTrend Indicator
The presentTrend indicator combines the Average True Range (ATR) with a moving average to determine trend direction and dynamic support or resistance levels. The presentTrend for a period length `M` and a multiplier `F` is defined as:
- Upper Band: MA + (ATR x F)
- Lower Band: MA - (ATR x F)
where:
- `MA` is the moving average of the close price over `M` periods,
- `ATR` is the Average True Range over the same period,
- `F` is the multiplier to adjust the sensitivity.
The trend direction switches when the price crosses the presentTrend bands, signaling potential entry or exit points.
presentTrend length = 3
presentTrend length = 10
For more information - PresentTrend - Strategy :
🔶 Strategy Logic
Entry Conditions:
- Long Entry: Triggered when the RMI exceeds a threshold, say 60, indicating a strong bullish momentum, and when the price is above the presentTrend, confirming an uptrend.
- Short Entry: Occurs when the RMI drops below a threshold, say 40, showing strong bearish momentum, and the price is below the present trend, indicating a downtrend.
Exit Conditions with Dynamic Trailing Stop:
- Long Exit: Initiated when the price crosses below the lower presentTrend band or when the RMI falls back towards a neutral level, suggesting a weakening of the bullish momentum.
- Short Exit: Executed when the price crosses above the upper presentTrend band or when the RMI rises towards a neutral level, indicating a reduction in bearish momentum.
Equations for Dynamic Trailing Stop:
- For Long Positions: The exit price is set at the lower SuperTrend band once the entry condition is met.
- For Short Positions: The exit price is determined by the upper SuperTrend band post-entry.
These dynamic trailing stops adjust as the market moves, providing a method to lock in profits while allowing room for the position to grow.
This strategy's strength lies in its dual analysis approach, leveraging RMI for momentum insights and presentTrend for trend direction and dynamic stops. This combination offers traders a robust framework to navigate various market conditions, aiming to capture trends early and exit positions strategically to maximize gains and minimize losses.
█ Trade Direction
The strategy provides flexibility in trade direction selection, offering "Long," "Short," or "Both" options to cater to different market conditions and trader preferences. This adaptability ensures that traders can align the strategy with their market outlook, risk tolerance, and trading goals.
█ Usage
To utilize the "PresentTrend RMI Synergy Strategy," traders should input their preferred settings in the Pine Script™ and apply the strategy to their charts. Monitoring RMI for momentum shifts and adjusting positions based on SuperTrend signals can optimize entry and exit points, enhancing potential returns while managing risk.
█ Default Settings
1. RMI Length: 21
The 21-period RMI length strikes a balance between capturing momentum and filtering out market noise, offering a medium-term outlook on market trends.
2. Super Trend Length: 7
A SuperTrend length of 7 periods is chosen for its responsiveness to price movements, providing a dynamic framework for trend identification without excessive sensitivity.
3. Super Trend Multiplier: 4.0
The multiplier of 4.0 for the SuperTrend indicator widens the trend bands, focusing on significant market moves and reducing the impact of minor fluctuations.
---
The "PresentTrend RMI Synergy Strategy" represents a significant step forward in trading strategy development, blending momentum and trend analysis in a unique way. By providing a detailed framework for understanding market dynamics, this strategy empowers traders to make more informed decisions.
PS January Barometer BacktesterPS January Barometer Backtester (PS JBB)
The PS January Barometer Backtester (PS JBB) is a simple strategy designed to test the "January Effect" hypothesis in financial markets. This effect theorizes that stock market performance in January can predict the trend for the rest of the year. The script operates on a monthly timeframe, focusing on capturing and analyzing the price movements in January and their subsequent influence on the market until the end of each year.
User Input:
January Trifecta Selectors
These are user-selectable options allowing traders to incorporate additional criteria into their market analysis.
The Santa Claus Rally refers to a stock market increase typically seen in the last week of December through the first two trading days in January.
The First Five Days Indicator assesses market performance during the initial five days of the year.
Script Operation:
The script automatically detects the start of each year, tracks January's high, and signals entry and exit points for trades based on the strategy's logic. It's an excellent tool for traders and investors looking to explore the January Effect's validity and its potential impact on their trading decisions.
In essence, the "PS January Barometer Backtester" is designed to exploit specific seasonal market trends, particularly focusing on the early part of the year, by analyzing and acting upon defined market movements. This strategy is ideal for traders who focus on yearly cyclical patterns and seek to incorporate historical trends into their trading decisions.
Note: This script is intended for educational and research purposes and should not be construed as financial advice. Always conduct your own due diligence before making trading/investment decisions.
Candle StrategyThis strategy is based candle count number also strategy analysis -
Rules for buy-
1) choose Candle Number(Ex.-47) For Trade
2) Trade Sell if price is above high of day 1st candle that mean direction is upside
3) We are taking stop loss on lowest low of candle since day first candle to trade no.
4) close Trade at last bar of the day
5) Trader Can Choose Trade Direction From input
Rules for Sell-
1) Choose Candle Number(Ex.-47) For Trade
2) Trade Sell if price is below low of day 1st candle that mean direction is downside
3) We are taking stop loss on highest of candle since day first candle to trade no.
4) close Trade at last bar of the day
5) Trader Can Choose Trade Direction From input
Note - this strategy can be also use for static to understand which candle will make low/high of the day high chance Example in bank nifty 5 minutes chart candle no 47 have highest trade
opportunity appear on long side ...this data is small based on 5000 previous bar ...
Disclaimer: market involves significant risks, including complete possible loss of funds. Consequently trading is not suitable for all investors and traders. By increasing leverage risk increases as well.With the demo account you can test any trading strategies you wish in a risk-free environment. Please bear in mind that the results of the transactions of the practice account are virtual, and do not reflect any real profit or loss or a real trading environment, whereas market conditions may affect both the quotation and execution
AI SuperTrend x Pivot Percentile - Strategy [PresentTrading]█ Introduction and How it is Different
The AI SuperTrend x Pivot Percentile strategy is a sophisticated trading approach that integrates AI-driven analysis with traditional technical indicators. Combining the AI SuperTrend with the Pivot Percentile strategy highlights several key advantages:
1. Enhanced Accuracy in Trend Prediction: The AI SuperTrend utilizes K-Nearest Neighbors (KNN) algorithm for trend prediction, improving accuracy by considering historical data patterns. This is complemented by the Pivot Percentile analysis which provides additional context on trend strength.
2. Comprehensive Market Analysis: The integration offers a multi-faceted approach to market analysis, combining AI insights with traditional technical indicators. This dual approach captures a broader range of market dynamics.
BTC 6H L/S Performance
Local
█ Strategy: How it Works - Detailed Explanation
🔶 AI-Enhanced SuperTrend Indicators
1. SuperTrend Calculation:
- The SuperTrend indicator is calculated using a moving average and the Average True Range (ATR). The basic formula is:
- Upper Band = Moving Average + (Multiplier × ATR)
- Lower Band = Moving Average - (Multiplier × ATR)
- The moving average type (SMA, EMA, WMA, RMA, VWMA) and the length of the moving average and ATR are adjustable parameters.
- The direction of the trend is determined based on the position of the closing price in relation to these bands.
2. AI Integration with K-Nearest Neighbors (KNN):
- The KNN algorithm is applied to predict trend direction. It uses historical price data and SuperTrend values to classify the current trend as bullish or bearish.
- The algorithm calculates the 'distance' between the current data point and historical points. The 'k' nearest data points (neighbors) are identified based on this distance.
- A weighted average of these neighbors' trends (bullish or bearish) is calculated to predict the current trend.
For more please check: Multi-TF AI SuperTrend with ADX - Strategy
🔶 Pivot Percentile Analysis
1. Percentile Calculation:
- This involves calculating the percentile ranks for high and low prices over a set of predefined lengths.
- The percentile function is typically defined as:
- Percentile = Value at (P/100) × (N + 1)th position
- Where P is the desired percentile, and N is the number of data points.
2. Trend Strength Evaluation:
- The calculated percentiles for highs and lows are used to determine the strength of bullish and bearish trends.
- For instance, a high percentile rank in the high prices may indicate a strong bullish trend, and vice versa for bearish trends.
For more please check: Pivot Percentile Trend - Strategy
🔶 Strategy Integration
1. Combining SuperTrend and Pivot Percentile:
- The strategy synthesizes the insights from both AI-enhanced SuperTrend and Pivot Percentile analysis.
- It compares the trend direction indicated by the SuperTrend with the strength of the trend as suggested by the Pivot Percentile analysis.
2. Signal Generation:
- A trading signal is generated when both the AI-enhanced SuperTrend and the Pivot Percentile analysis agree on the trend direction.
- For instance, a bullish signal is generated when both the SuperTrend is bullish, and the Pivot Percentile analysis shows strength in bullish trends.
🔶 Risk Management and Filters
- ADX and DMI Filter: The strategy uses the Average Directional Index (ADX) and the Directional Movement Index (DMI) as filters to assess the trend's strength and direction.
- Dynamic Trailing Stop Loss: Based on the SuperTrend indicator, the strategy dynamically adjusts stop-loss levels to manage risk effectively.
This strategy stands out for its ability to combine real-time AI analysis with established technical indicators, offering traders a nuanced and responsive tool for navigating complex market conditions. The equations and algorithms involved are pivotal in accurately identifying market trends and potential trade opportunities.
█ Usage
To effectively use this strategy, traders should:
1. Understand the AI and Pivot Percentile Indicators: A clear grasp of how these indicators work will enable traders to make informed decisions.
2. Interpret the Signals Accurately: The strategy provides bullish, bearish, and neutral signals. Traders should align these signals with their market analysis and trading goals.
3. Monitor Market Conditions: Given that this strategy is sensitive to market dynamics, continuous monitoring is crucial for timely decision-making.
4. Adjust Settings as Needed: Traders should feel free to tweak the input parameters to suit their trading preferences and to respond to changing market conditions.
█Default Settings and Their Impact on Performance
1. Trading Direction (Default: "Both")
Effect: Determines whether the strategy will take long positions, short positions, or both. Adjusting this setting can align the strategy with the trader's market outlook or risk preference.
2. AI Settings (Neighbors: 3, Data Points: 24)
Neighbors: The number of nearest neighbors in the KNN algorithm. A higher number might smooth out noise but could miss subtle, recent changes. A lower number makes the model more sensitive to recent data but may increase noise.
Data Points: Defines the amount of historical data considered. More data points provide a broader context but may dilute recent trends' impact.
3. SuperTrend Settings (Length: 10, Factor: 3.0, MA Source: "WMA")
Length: Affects the sensitivity of the SuperTrend indicator. A longer length results in a smoother, less sensitive indicator, ideal for long-term trends.
Factor: Determines the bandwidth of the SuperTrend. A higher factor creates wider bands, capturing larger price movements but potentially missing short-term signals.
MA Source: The type of moving average used (e.g., WMA - Weighted Moving Average). Different MA types can affect the trend indicator's responsiveness and smoothness.
4. AI Trend Prediction Settings (Price Trend: 10, Prediction Trend: 80)
Price Trend and Prediction Trend Lengths: These settings define the lengths of weighted moving averages for price and SuperTrend, impacting the responsiveness and smoothness of the AI's trend predictions.
5. Pivot Percentile Settings (Length: 10)
Length: Influences the calculation of pivot percentiles. A shorter length makes the percentile more responsive to recent price changes, while a longer length offers a broader view of price trends.
6. ADX and DMI Settings (ADX Length: 14, Time Frame: 'D')
ADX Length: Defines the period for the Average Directional Index calculation. A longer period results in a smoother ADX line.
Time Frame: Sets the time frame for the ADX and DMI calculations, affecting the sensitivity to market changes.
7. Commission, Slippage, and Initial Capital
These settings relate to transaction costs and initial investment, directly impacting net profitability and strategy feasibility.