D-Bot Alpha RSI Breakout StrategyHello dear Traders,
Here is a simple yet effective strategy to use, for best profit higher time frame, such as daily.
Structure of the code
The code defines inputs for SMA (simple moving average) length, RSI (relative strength index) length, RSI entry level, RSI stop loss level, and RSI take profit level. The default values of these variables can be customized as per the user's preferences.
The script calculates SMA and RSI based on the input parameters and the closing price of the asset.
Trading logic
This strategy allows the placement of a long position when:
The RSI crosses above the RSI entry level and
The close price is above the SMA value.
After entering a long position, it applies a trailing stop mechanism. The stop price is updated to the close price if the close price is lower than the last close price.
The script closes the long position when:
RSI falls below the stop loss level.
RSI reaches or exceeds the take profit level.
If the trailing stop is activated (once RSI reaches or exceeds the take profit level), the closing price falls below the trailing stop level.
Strengths
The strategy includes mechanisms for entering a position, taking profit, and stopping losses, which are fundamental aspects of a trading strategy.
It applies a trailing stop mechanism that allows to capture further gains if the price keeps increasing while protecting from losses if the price starts to decrease.
Weaknesses
This strategy only contemplates long positions. Depending on the market situation, the strategy may miss opportunities for short selling when the market is on a downward trend.
The choice of the fixed RSI entry, stop loss, and take profit levels may not be ideal for all market conditions or assets. It might benefit from a more adaptive mechanism that adjusts these levels according to market volatility or trend.
The strategy doesn't factor in trading costs (such as spread or commission), which could have a significant impact on the net profit, especially if the user is trading with a high frequency or in a low liquidity market.
How to trade with this strategy
Given these parameters and the strategy outlined by the code, the trader would enter a long position when the RSI crosses above the RSI entry level (default 34) and the closing price is above the SMA value (SMA calculated with default period of 200). The trader would exit the position when either the RSI falls below the RSI stop loss level (default 30), or RSI rises above the RSI take profit level (default 50), or when the trailing stop is hit.
Remember "The strategies I have prepared are entirely for educational purposes and should not be considered as investment advice. Support your trades using other tools. Wishing everyone profitable trades..."
Indicateurs et stratégies
Mechanical Trading StrategyThe "Mechanical Trading Strategy" is a simple and systematic approach to trading that aims to capture short-term price movements in the financial markets. This strategy focuses on executing trades based on specific conditions and predetermined profit targets and stop loss levels.
Key Features:
Profit Target: The strategy allows you to set a profit target as a percentage of the entry price. This target represents the desired level of profit for each trade.
Stop Loss: The strategy incorporates a stop loss level as a percentage of the entry price. This level represents the maximum acceptable loss for each trade, helping to manage risk.
Entry Condition: The strategy triggers trades at a specific time. In this case, the condition for entering a trade is based on the hour of the candle being 16 (4:00 PM). This time-based entry condition provides a systematic approach to executing trades.
Position Sizing: The strategy determines the position size based on a fixed percentage of the available equity. This approach ensures consistent risk management and allows for potential portfolio diversification.
Execution:
When the entry condition is met, signified by the hour being 16, the strategy initiates a long position using the strategy.entry function. It sets the exit conditions using the strategy.exit function, with a limit order for the take profit level and a stop order for the stop loss level.
Take Profit and Stop Loss:
The take profit level is calculated by adding a percentage of the entry price to the entry price itself. This represents the profit target for the trade. Conversely, the stop loss level is calculated by subtracting a percentage of the entry price from the entry price. This level represents the maximum acceptable loss for the trade.
By using this mechanical trading strategy, traders can establish a disciplined and systematic approach to their trading decisions. The predefined profit target and stop loss levels provide clear exit rules, helping to manage risk and potentially maximize returns. However, it is important to note that no trading strategy is guaranteed to be profitable, and careful analysis and monitoring of market conditions are always recommended.
RSI-CCI Fusion StrategyRSI-CCI Fusion Strategy: Harnessing the Power of RSI and CCI
The "RSI-CCI Fusion Strategy" is a powerful trading approach that combines the strengths of the Relative Strength Index (RSI) and the Commodity Channel Index (CCI) to provide enhanced trading insights. This strategy is based on the popular "RSI & CCI Fusion + Alerts" indicator, which utilizes the RSI and CCI indicators from TradingView .
1. Overview of RSI and CCI:
The Relative Strength Index (RSI) is a widely used momentum oscillator that measures the speed and change of price movements. It helps traders identify overbought and oversold conditions in the market. On the other hand, the Commodity Channel Index (CCI) is a versatile indicator that identifies cyclical trends and provides insights into overbought and oversold levels.
2. The RSI-CCI Fusion Strategy:
The RSI-CCI Fusion Strategy harnesses the combined power of the RSI and CCI indicators to generate robust trading signals. By blending the RSI and CCI, this strategy captures both momentum and cyclical trend dynamics, offering a more comprehensive view of the market.
3. Utilizing the RSI-CCI Fusion Indicator + Alerts:
The "RSI & CCI Fusion + Alerts" indicator serves as the backbone of the RSI-CCI Fusion Strategy. It integrates the RSI and CCI indicators from TradingView, providing traders with a clear and actionable trading signal.
4. How it Works:
- The indicator calculates the RSI and CCI values, standardizes them using z-score, and combines them with a weighted fusion approach.
- The resulting RSI-CCI Fusion indicator is plotted on the chart, accompanied by dynamic upper and lower bands, which help identify potential overbought and oversold conditions.
- Traders can customize alerts based on their preferred thresholds and timeframes, enabling them to receive timely notifications for potential buy and sell signals.
5. Implementing the RSI-CCI Fusion Strategy:
Traders following the RSI-CCI Fusion Strategy can utilize the buy and sell signals generated by the RSI-CCI Fusion indicator. When the indicator crosses below the upper band, it may signal a potential selling opportunity. Conversely, when it crosses above the lower band, it may indicate a potential buying opportunity. Traders can also consider additional factors and technical analysis tools to validate the signals before making trading decisions.
Conclusion: The RSI-CCI Fusion Strategy provides traders with a robust approach to analyze the market and make well-informed trading decisions. By incorporating the RSI and CCI indicators through the "RSI & CCI Fusion + Alerts" indicator, traders can take advantage of the combined strengths of these indicators. However, it is important to remember that no strategy guarantees success, and traders should always practice risk management and conduct thorough analysis before executing trades using this strategy.
Disclaimer: Trading involves risks, and it is important to conduct your own research and consult with a financial advisor before making any investment decisions.
Note: The RSI-CCI Fusion Strategy serves as a general guide, and individual traders may have different preferences and trading styles.
[SMA Cross + HHLL] Signal Clean Up Analysis with Backtest (TSO) This is a DEMO indicator with a simple 2 SMAs cross for signals + HHLL for TP/SL. It mainly demonstrates chained (NOTE: You can select several or ALL of the features, this is not limited to either one) signal cleanup and analysis approach with scheduling and alerting capabilities. Works with most popular timeframes: 1M, 5M, 15M, 1H, 4H, D.
===========================================================================
Here are some pre-set examples with nice Backtesting results (try em out!):
---------------------------------------------------------------------------
>>> Indexes – SPY (INTRADAY SETUP ): Timeframe: 5M | Trading Schedule: ON, 10:00-15:45 ET, EOD: At Market Close | Trading System: Open Until Closed by TP or SL | MULTIPROFIT: TP (take profit) System: Dynamic | MULTIPROFIT: SL (stop loss) System (This is only for “Dynamic” TP System ONLY!!!): Dynamic | # of TPs: 5 | Skip opposite candle types in signals, which are opposite to direction of candle color (for example: bearish green hammer) | Everything else: Default
>>> Bitcoin – BTCUSD (24/7 SETUP): Timeframe: 1H | Trading Schedule: OFF, End of Day (EOD): OFF | Trading System: Open Until Closed by TP or SL | MULTIPROFIT: TP (take profit) System: Dynamic | MULTIPROFIT: SL (stop loss) System (This is only for “Dynamic” TP System ONLY!!!): Dynamic | # of TPs: 3 | TP(s) Offset: on, TP(s) offset amount: 50 | ATR confirmation | Everything else: Default
===========================================================================
Explanation of all the Features | Configuration Guide | Indicator Settings
---------------------------------------------------------------------------
---------------------------------------------------------------------------
Signal cleanup analysis:
---------------------------------------------------------------------------
>>> Customizable Backtesting for a specific date range, results via TradingView strategy, which includes “Deep Backtesting” for largest amounts of data on trading results.
>>> Trading Schedule with customizable trading daily time range, automatic closing/alert trades before Power Hour or right before market closes or leave it open until next day.
>>> 3 Trading Systems.
>>> Static/Dynamic Take-Profit setups (HILIGHT: momentum catch dynamic Take-Profit approach).
>>> Static/Dynamic Stop-Loss setups (HIGHLIGHT: smart trailing Stop-Loss which minimizes risk).
>>> Single or Multiple profit targets (up to 5).
>>> Take-Profit customizable offset feature (set your Take-Profit targets slightly before everyone is expecting it!).
>>> Candle bar signal analysis (skip opposite structured and/or doji candle uncertain signals).
>>> Additional analysis of VWAP/EMA/ATR/EWO (Elliot Wave Oscillator)/Divergence MACD+RSI signal confirmation (clean up your chart with indicator showing only the best potential signals!).
>>> Advanced Alerts setup, which can be potentially setup with a trading bot over TradingView Webhook (NOTE: This will require advanced programming knowledge).
>>> Customize your signal SOURCE and your Take-Profit/Stop-Loss SOURCES as you desire.
===========================================================================
Labels, plots, colors explanations:
---------------------------------------------------------------------------
>>>>> Signal SOURCE: SMA crossings (green and red BIG circles) .
>>>>> Take-profit/Stop-loss SOURCE: HHLL (Highest High Lowest Low) .
>>>>> LONG open: green arrow below candle bar.
>>>>> SHORT open: red arrow above candle bar.
>>>>> LONG/SHORT take-profit target: green/red circles (multi-profit > TP2/3/4/5 smaller circles).
>>>>> LONG/SHORT take-profit hits: green/red diamonds.
>>>>> LONG/SHORT stop-loss target: green/red + crosses.
>>>>> LONG/SHORT stop-loss hits: green/red X-crosses.
>>>>> LONG/SHORT EOD close (profitable trade): green/red squares.
>>>>> LONG/SHORT EOD close (loss trade): green/red PLUS(+)-crosses.
===========================================================================
Date Range and Trading Schedule Settings
---------------------------------------------------------------------------
>>>>> Date Range: Select your start and/or end dates (uncheck “End” for indicator to show results up to the very moment and to use for LIVE trading) for backtesting results, if not using backtesting – uncheck “Start”/“End” to turn it off.
---------------------------------------------------------------------------
>>>>> Use TradingView “Strategy Tester” to see backtesting results
---------------------------------------------------------------------------
NOTE: If Strategy Tester does not show any results with Date Ranged fully unchecked, there may be an issue where a script opens a trade, but there is not enough TradingView power to set the Take-Profit and Stop-Loss and somehow an open trade gets stuck and never closes, so there are “no trades present”. In such case you will need to manually check “Start”/“End” dates or use “Depp Backtesting” feature!
---------------------------------------------------------------------------
>>>>> Trading Schedule: This is where you can setup Intraday Session or any custom session schedule you wish. Turn it ON. Select trading hours. Select EOD (End of Day) setting (NOTE: If it will be OFF, the indicator will assume you are holding your position open until next day!).
>>>>> Trading System: 1) Open Until Closed by TP or SL – once the trade is open, it can only be closed by Take-Profit, Stop-Loss or at EOD (if turned on) ||| 2) OCA – Opposite Trade will Open Closing Current Trade – Same as 1), except that when and if an OPPOSITE signal is received > indicator will close current trade immediately (profit or loss) and open a new one(NOTE: This will only happen with an OPPOSITE direction trade!) ||| 3) Open Until Opposite Signal or EOD (if turned on) – This approach is the simplest one, there are no Take-Profits or Stop-Losses, the trade is open until an OPPOSITE signal is received or until EOD (if turned on).
Take-Profit, Stop-Loss and Multi-Profit Settings
>>>>> MULTIPROFIT | TP (Take-Profit) System: 1) Static – Once the trade is open, all Take-Profit target(s) are immediately calculated and set for the trade > once the target(s) is hit > trade will be partially closed (if candle bar closes beyond several Take-Profit targets > trade will be reduced accordingly to the amount of how many Take-Profit targets were hit) ||| 2) Dynamic – Once the trade is open, only the 1st Take-Profit target is calculated, once the 1st Take-Profit is hit > next Take-Profit distance is calculated based on the distance from trade Entry to where 1st Take-Profit was taken, once 2nd Take-Profit is taken > 3rd Take-Profit is calculated per same logic, these are good for price momentum as with price speeding up – profits increase as well!
NOTE: Below 2 settings, each correspond to only 1 setting of the TP (Take-Profit) System, please pay attention to the above TP system setting before changing SL settings!
>>>>> MULTIPROFIT | SL (Stop-Loss) System : 1) Static – Once the trade is open, Stop-Loss is calculated and set for the remaining of the trade ||| 2) Dynamic – At trade open, Stop-Loss is calculated and set the same way, however once 1st Take-Profit is taken > Stop-Loss is moved to Entry, reducing the risk.
>>>>> MULTIPROFIT | SL (Stop-Loss) System : 1) Static - Once the trade is open, Stop-Loss is calculated and set for the remaining of the trade ||| 2) Dynamic – At trade open, Stop-Loss is calculated and set the same way, however with each Take-Profit taken, Stop-Loss will be moved to previous Take-Profit (TP1 taken > SL:Entry | TP2 taken > SL:TP1 | TP3 taken > SL:TP2 | TP4 taken > SL:TP3 | TP5 taken > trade closed), this is basically a smart Stop-Loss trailing system!
>>>>> # of TPs (number of take profit targets): Just like it is named, this is where you select the number of Take-Profit targets for your trading system (NOTE: If “3) Open Until Opposite Signal or EOD (if turned on)” Trading System is selected, this setting won’t do anything, since there are no TP or SLs for that system).
>>>>> TP(s) offset: This is a special feature for all Take-Profit targets, where you can turn on a customizable offset, so that if the price is almost hitting the Take-Profit target, but never actually touches it > you will capture it. This is good to use with HHLL (Highest High Lowest Low), which is pretty much a Support/Resistance as often the price will nearly touch these strong areas and turn around…
---------------------------------------------------------------------------
Dynamic/Static Take-Profit and Stop-Loss visual examples:
1) Fully Dynamic Take-Profit and Stop-Loss setup for BTCUSD
See how Take-Profit distances increase with price momentum and how Stop-Loss is following the trade reducing the risk!
2) Static/Dynamic, Static Take-Profit and Dynamic Stop-Loss setup for SPY (S&P500 ETF TRUST)
You can see a static Take-Profit set at position open, while Stop-Loss is semi-dynamic adjusting to Entry once TP1 target is taken!
3) Fully Static Take-Profit and Stop-Loss setup for SPY (S&P500 ETF TRUST)
This one is a fully static setup for both Take-Profit and Stop-Loss, you can also observe how trade is closed right before the Power Hour (trade can be closed right before Power Hour or right before Market Closes or left overnight as you desire).
---------------------------------------------------------------------------
Trade Analysis and Cleanup Settings
>>>>> Candle Analysis | Candle Color signal confirmation: If closed candle bar color does not match the signal direction > no trade will be open.
>>>>> Candle Analysis | Skip opposite candle signals: If closed candle bar color will match the signal direction, but candle structure will be opposite (for example: bearish green hammer, long high stick on top of a small green square) > no trade will be open.
>>>>> Candle Analysis | Skip doji candle signals: If closed candle bar will be the uncertain doji > no trade will be open.
>>>>> Divergence/Oscillator Analysis | EWO (Elliot Wave Oscillator) signal confirmation: LONG will only be open if at signal, EWO is green or will be at bullish slope (you can select which setting you desire), SHORT if EWO is red or will be at bearish slope.
>>>>> Divergence/Oscillator Analysis | VWAP signal confirmation: LONG will only be open if at signal, the price will be above VWAP, SHORT if below.
>>>>> Divergence/Oscillator Analysis | Moving Average signal confirmation: LONG will only be open if at signal, the price will be above selected Moving Average, SHORT if below.
>>>>> Divergence/Oscillator Analysis | ATR signal confirmation: LONG will only be open if at signal, the price will be above ATR, SHORT if below.
>>>>> Divergence/Oscillator Analysis | RSI + MACD signal confirmation: LONG will only be open if at signal, RSI + MACD will be bullish, SHORT if RSI + MACD will be bearish.
===========================================================================
Alert Settings (you don’t have to touch this section unless you will be using TradingView alerts through a Webhook to use with trading bot)
---------------------------------------------------------------------------
Here is how a LONG OPEN alert looks like (each label is customizable + I can add up more items/labels if needed):
COIN: BTCUSD
TIMEFRAME: 15M
LONG: OPEN
ENTRY: 20000
TP1: 20500
TP2: 21000
TP3: 21500
SL: 19000
Leverage: 0
===========================================================================
Trade Open Signal SOURCE + Take-Profit/Stop-Loss SOURCE
---------------------------------------------------------------------------
>>> Customize your signal SOURCE, Take-Profit and Stop-Loss SOURCE as desired (NOTE: These are pre-configured and should be usable on majority of markets, however feel free to play around with these settings as there is nearly an infinite amount of setups out there!
===========================================================================
Adding Alerts in TradngView
---------------------------------------------------------------------------
-Right-click anywhere on the TradingView chart
-Click on Add alert
-Condition: Select this indicator by it’s name
-Alert name: Whatever you want
-Hit “Create”
-Note: If you change ANY Settings within the indicator – you must DELETE the current alert and create a new one per steps above, otherwise it will continue triggering alerts per old Settings!
===========================================================================
If you have any questions or issues with the indicator, please message me directly via TradingView.
---------------------------------------------------------------------------
Good Luck! (NOTE: Trading is very risky, so please trade responsibly!)
Ultimate Balance StrategyThe Ultimate Balance Oscillator Strategy harnesses the power of the Ultimate Balance Oscillator to deliver a comprehensive and disciplined approach to trading. By combining the insights of the Rate of Change (ROC), Relative Strength Index (RSI), Commodity Channel Index (CCI), Williams Percent Range, and Average Directional Index (ADX) from TradingView, this strategy offers traders a systematic way to navigate the markets with precision.
The core principle of this strategy lies in its ability to identify optimal entry and exit points based on the movement of the Ultimate Balance Oscillator. When the oscillator line crosses below the 0.75 level, a buy signal is generated, indicating a potential opportunity for a bullish trend reversal. Conversely, when the oscillator line crosses above the 0.25 level, it triggers an exit signal, suggesting a possible end to a bullish trend.
Key Features:
1. Objective Market Analysis: The Ultimate Balance Oscillator Strategy provides a disciplined and objective approach to market analysis. By relying on the quantified insights of multiple indicators, it helps traders cut through market noise and focus on key signals, improving decision-making and reducing emotional biases.
2. Enhanced Timing and Precision: This strategy's entry and exit signals are based on the specific thresholds of the Ultimate Balance Oscillator. By waiting for confirmation through the crossing of these levels, traders can potentially enter trades at opportune moments and exit with greater precision, maximizing profit potential and minimizing risk exposure.
3. Customizability and Adaptability: The strategy offers flexibility, allowing traders to customize the parameters to fit their preferred trading style and timeframes. Whether you're a short-term trader or a long-term investor, the Ultimate Balance Oscillator Strategy can be adjusted to suit your specific needs, making it adaptable to various market conditions.
4. Real-time Alerts: Stay informed and never miss a potential trade opportunity with the strategy's built-in alert system. Set personalized alerts for buy and exit signals to receive timely notifications, ensuring you're always aware of the latest developments in the market.
5. Backtesting and Optimization: Before applying the strategy to live trading, it's recommended to conduct thorough backtesting and optimization. By testing the strategy's performance over historical data and fine-tuning the parameters, you can gain insights into its strengths and weaknesses, enabling you to make informed adjustments and increase its effectiveness.
Trading involves risk. Use the Ultimate Balance Oscillator Strategy at your own discretion. Past performance is not indicative of future results.
DCA EMA Simple Bot [Starbots]
This is a simple idea of DCA trading on EMA crosses. Strategy is not repainting.
The difference between this and any other strategy is, that this script allows you to preset DCA buy triggers at desired levels and customize each DCA order size independently. Alerts are working, this strategy is easily used for automatic trading.
I mainly trade on Cryptohopper, Pionex, 3commas. This was created for community, alerts are working and non-repainting. Should work on any other as well.
Trading Condition:
It's buying when Fast EMA crosses up Slow EMA. Set your paramters.
It's selling if EMA's crosses back, signaling a sell. Optional.
DCA:
You can enter DCA on 20 custom levels or layers. It buys DCA when price hits the plotted blue line on the chart that's set by input % triggers. (buy 1st DCA at 2% drop, buy 2nd DCA at 5% drop,...)
Set your Inital Capital and Pyramiding in Properties tab, Initial Order Size and DCA Order Size (lot1,lot2,lot3,..), Order Type are changed in strategy inputs.
-By default you can see that we buy when EMA's cross up and signal a buy for 10% of equity, if market is dropping you will then place a first DCA order ( 20% equity) at 2% drop (lower) from initial order. If market keeps dropping you have more DCA levels where you can buy and average down your holding position. For selling you can use Take profit and Stop Loss targets that averages down multiple open positions, it will sell it once it reaches your desirable Take Profit and close a deal. You can also close your trade if EMA signals a sell.
Pyramiding - number of orders you can open at a time
Your first buy order is pyramiding 1. To allow it to buy 1 DCA or merge one time, set pyramding to 2.
Want to DCA 10 times? Set pyramiding at 11. (+1 always)
More features:
- Profit Calendar
- Show Balance label before every new trade
- DCA table - visualize how much of your investment is used in trades. If a background of the table is green you are okay, if the background color is red - you are using more money for orders than you actually have.
Buy Orders << Strategy Equity/Capital
- Show / Hide DCA lines - if your chart processing is getting slow you should hide some DCA levels to speed it up
- Backtesting Range - for testing the strategy in different time windows
- Alerts
When all trades are closed on your chart, winning rate of the strategy is 100% actually.
Win rate is shown differently as it's actually closing and opening every trade individually by default in TradingView system. We merge positions together and average it down into one big position to later sell for a profit (DCA).
You use this Trading Algorithm at your own risk. Do not trade before testing or invest something you cannot afford to lose on markets.
DZ Strategy ICTThe script presented is a trading strategy called "Breaker Block Strategy with Price Channel". This strategy uses multiple time frames (1 minute, 5 minutes, 15 minutes, 1 hour, and 4 hours) to detect support and resistance areas on the chart.
The strategy uses parameters such as length, deviations, multiplier, Fibonacci level, move lag and volume threshold for each time frame. These parameters are adjustable by the user.
The script then calculates support and resistance levels using the simple moving average (SMA) and standard deviation (STDEV) of closing prices for each time frame.
It also detects "Breaker Blocks" based on price movement from support and resistance levels, as well as trade volume. A Breaker Block occurs when there is a significant breakout of a support or resistance level with high volume.
Buy and sell signals are generated based on the presence of a Breaker Block and price movement from support and resistance levels. When a buy signal is generated, a buy order is placed, and when a sell signal is generated, a sell order is placed.
The script also plots price channels for each time frame, representing resistance and support levels.
Profit limit levels are set for each time range, indicating that the price levels assigned to positions should be closed with a profit. Stop-loss levels are also set to limit losses in the event of canceled price movements.
In summary, this trading strategy uses a combination of Breaker Block detection, support and resistance levels, price channels and profit limit levels to generate buy and sell signals and manage positions on different time ranges.
Williams %R Strategy
The Williams %R Strategy is a trading approach that is based on the Williams Percent Range indicator, available on the TradingView platform.
This strategy aims to identify potential overbought and oversold conditions in the market, providing clear buy and sell signals for entry and exit.
The strategy utilizes the Williams %R indicator, which measures the momentum of the market by comparing the current close price with the highest high and lowest low over a specified period. When the Williams %R crosses above the oversold level, a buy signal is generated, indicating a potential upward price movement. Conversely, when the indicator crosses below the overbought level, a sell signal is generated, suggesting a possible downward price movement.
Position management is straightforward with this strategy. Upon receiving a buy signal, a long position is initiated, and the position is closed when a sell signal is generated. This strategy allows traders to capture potential price reversals and take advantage of short-term market movements.
To manage risk, it is recommended to adjust the position size based on the available capital. In this strategy, the position size is set to 10% of the initial capital, ensuring proper risk allocation and capital preservation.
It is important to note that the Williams %R Strategy should be used in conjunction with other technical analysis tools and risk management techniques. Backtesting and paper trading can help evaluate the strategy's performance and fine-tune the parameters before deploying it with real funds.
Remember, trading involves risks, and past performance is not indicative of future results. It is always advised to do thorough research, seek professional advice, and carefully consider your financial goals and risk tolerance before making any investment decisions.
9:22 5 MIN 15 MIN BANKNIFTY9:22 5 MIN 15 MIN BANKNIFTY Strategy with Additional Filters
The 9:22 5 MIN 15 MIN BANKNIFTY Strategy with Additional Filters is a trend-following strategy designed for trading the BANKNIFTY instrument on a 5-minute chart. It aims to capture potential price movements by generating buy and sell signals based on moving average crossovers, breakout confirmations, and additional filters.
Key Features:
Fast MA Length: 9
Slow MA Length: 22
ATR Length: 14
ATR Filter: 0.5
Trailing Stop Percentage: 1.5%
Pullback Threshold: 0.5
Minimum Candle Body Percentage: 0.5
Use Breakout Confirmation: Enabled
Additional Filters:
Volume Threshold: Set a minimum volume requirement for trades.
Trend Filter: Optionally enable a trend filter based on a higher timeframe moving average.
Momentum Filter: Optionally enable a momentum filter using the RSI indicator.
Support/Resistance Filter: Optionally enable a filter based on predefined support and resistance levels.
Buy and Sell Signals:
Buy Signal: A buy signal is generated when the fast moving average crosses above the slow moving average, with additional confirmation from breakout and volume criteria, along with optional trend, momentum, and support/resistance filters.
Sell Signal: A sell signal is generated when the fast moving average crosses below the slow moving average, with similar confirmation and filtering criteria as the buy signal.
Exit Strategy:
The strategy employs a trailing stop-loss mechanism based on a percentage of the average entry price. The stop-loss is dynamically adjusted to protect profits while allowing for potential upside.
Please note that this strategy should be thoroughly backtested and evaluated in different market conditions before applying it to live trading. It is also recommended to adjust the parameters and filters according to individual preferences and risk tolerance.
Feel free to customise and adapt the description as needed to suit your preferences and the specific details of your strategy.
HK Percentile Interpolation One
This script is designed to execute a trading strategy based on Heikin Ashi candlesticks, moving averages, and percentile levels.
Please note that you should keep your original chart in normal candlestick mode and not switch it to Heikin Ashi mode. The script itself calculates Heikin Ashi values from regular candlesticks. If your chart is already in Heikin Ashi mode, the script would be calculating Heikin Ashi values based on Heikin Ashi values, which would produce incorrect results.
The strategy begins trading from a start date that you can specify by modifying the `startDate` parameter. The format of the date is "YYYY MM DD". So, for example, to start the strategy from January 1, 2022, you would set `startDate = timestamp("2022 01 01")`.
The script uses Heikin Ashi candlesticks, which are plotted in the chart. This approach can be useful for spotting trends and reversals more easily than with regular candlestick charts. This is particularly useful when backtesting in TradingView's "Rewind" mode, as you can see how the Heikin Ashi candles behaved at each step of the strategy.
Buy and sell signals are generated based on two factors:
1. The crossing over or under of the Heikin Ashi close price and the 75th percentile price level.
2. The Heikin Ashi close price being above certain moving averages.
You have the flexibility to adjust several parameters in the script, including:
1. The stop loss and trailing stop percentages (`stopLossPercentage` and `trailStopPercentage`). These parameters allow the strategy to exit trades if the price moves against you by a certain percentage.
2. The lookback period (`lookback`) used to calculate percentile levels. This determines the range of past bars used in the percentile calculation.
3. The lengths of the two moving averages (`yellowLine_length` and `purplLine_length`). These determine how sensitive the moving averages are to recent price changes.
4. The minimum holding period (`holdPeriod`). This sets the minimum number of bars that a trade must be kept open before it can be closed.
Please adjust these parameters according to your trading preferences and risk tolerance. Happy trading!
Moving Average Crossover Strategymoving average crossover startegy 10*30
it indicates when to buy or sell
BB and KC StrategyThis script is designed as a TradingView strategy that uses Bollinger Bands (BB) and Keltner Channels (KC) as the primary indicators for generating trade signals. It aims to catch potential market trends by comparing the movements of these two popular volatility measures.
Key aspects of this strategy:
1. **Bollinger Bands and Keltner Channels:** Both are volatility-based indicators. The Bollinger Bands consist of a middle band (simple moving average) and two outer bands calculated based on standard deviation, which adjusts itself to market conditions. Keltner Channels are a set of bands placed above and below an exponential moving average of the price. The distance between the bands is calculated based on the Average True Range (ATR), a measure of price volatility.
2. **Entry Signals:** The strategy enters a long position when the upper KC line crosses above the upper BB line and the volume is above its moving average. Conversely, it enters a short position when the lower KC line crosses below the lower BB line and the volume is above its moving average.
3. **Exit Signals:** The strategy exits a position under two conditions. First, if the trade has been open for a certain number of bars defined by the user (default 20 bars). Second, a stop loss and trailing stop are in place to limit potential losses and lock in profits as the price moves favorably. The stop loss is set at a percentage of the entry price (default 1.5% for long and -1.5% for short), and the trailing stop is also a percentage of the entry price (default 2%).
4. **Trade Quantity:** The script allows specifying the investment amount for each trade, set to a default of 1000 currency units.
Remember, this is a strategy script, which means it is used for backtesting and not for real-time signals or live trading. It is also recommended that it is used as a tool to aid your trading, not as a standalone system. As with any strategy, it should be tested over different market conditions and used in conjunction with other aspects of technical and fundamental analysis to ensure robustness and effectiveness.
Premium Smart Exit HMA [ByteBoost]The Premium Smart Exit HMA strategy is designed for fast-paced trend detection and is well-suited for small trades in highly volatile markets. It utilizes the Hull Moving Average (HMA) as a signal to execute trades and offers customizable inputs for price calculation, period settings, and stop loss/take profit levels. The strategy aims to reduce lag associated with traditional moving averages, allowing it to catch trends quickly.
Development Notes
This Strategy was developed with the PineScript language, version 5. The aim of the strategy is to provide a trading system that catches fast trend reversals and uses a modified version of the Hull Moving Average. The HMA adeptly adapts to swift variations in price movements while offering better smoothing and utilizes a user selected moving averages, mitigating the smoothing effect and is controlled with a custom weight design.
Features
Customizable trading periods.
Customizable stop loss and take profit levels.
Adjustable date range for backtesting.
Allows setting of initial capital, commission type and value.
Provides visual aids for better understanding of the market trends.
Customize the visuals of the strategy.
Strategy Description
The Smart Exit HMA strategy offers the flexibility to use various types of moving averages, allowing customization of inputs for price calculation, period settings, and stop loss/take profit levels. The strategy relies on the Hull Moving Average (HMA) as a signal to execute trades. However, you have control over the signal frequency by selecting your preferred period value, which determines the number of candles used in the average calculation. This allows you to adapt the strategy to market tendencies and increase its effectiveness during clear trends.
The Smart Exit HMA strategy is designed to minimize lag associated with traditional moving averages, enabling it to respond more quickly to recent price movements based on your chosen period. It's worth noting that the strategy plots two lines on the graph: the average line and the square root line. Buy and sell signals are generated when both lines intersect, indicating favorable trading opportunities.
Inputs/Settings
Capital - If using any leverage multiply the amount of money to invest by the leverage, else input the amount to be invested in every trade.
Start date - The date from which the strategy should begin its analysis. Leave unchanged to start from the earliest available date based on your account's plan.
End date - The date until which the strategy should conduct its analysis. Leave unchanged to continue until the current date.
Period - The lookback period for the moving average calculation, a longer period will translate into fewer trades that last longer.
Stop loss - Allows the use of a stop loss for all trades.
Take profit - Activates the use of a take profit for all trades.
Stop loss value - The distance from the entry price at which the strategy should exit to prevent further losses.
Take profit value - The distance from the entry price at which the strategy should exit to secure profits.
Take profit % - The percentage of the capital to take as profit.
Stop loss % - The percentage of the capital to set as the maximum loss.
Candles exit - The minimum number of candles before the strategy is allowed to close a trade.
Candles change - The minimum number of candles before the strategy is allowed to change the current trend.
Moving average type - Determines the preprocessing method applied prior to utilizing the HMA.
Custom weight - Enables the utilization of a personalized weighting system for the HMA. If chosen, ensure that the sum of all weights equals 1.
Open weight - Determines the weight assigned to the candle's open value.
Close weight - Specifies the weight assigned to the candle's close value.
High weight - Sets the weight attributed to the candle's high value.
Low weight - Determines the weight assigned to the candle's low value.
Highlighter - Light coloring between the trend and average price of each bar.
Signal labels - View the labels indicating a new long or short position.
Exit labels - Displays the labels indicating exit points.
Color long - Sets the color scheme for a new long position.
Color short - Sets the color scheme for a new short position.
Color exit - Decides the color scheme for the exit tag and cross shown.
Indicator Visuals
The strategy plots the two trendlines on the chart and changes its color based on its direction. It also plots shapes on the chart to denote potential buy (Long) and sell (Short) points where the signals of short and long will appear, as well as crosses for the exit points.
Strategy Alerts
The strategy does not include built-in alerts. However, alerts can be added using the TradingView interface based on the strategy's buy, sell and exit conditions. This way you will be able to receive notifications on your computer or phone when a new signal goes out.
Details
Repainting: It is important to mention that the strategy can mark an uptrend signal during a candle and disappear at the end of it, so please just put long or short when the buy/sell conditions are followed and marked by the strategy at the end of each candle.
Conclusion
The Premium Smart Exit HMA is a versatile strategy that combines the benefits of the Hull Moving Average with adjustable parameters to suit individual trading styles. It offers a combination of speed and smoothness, which can be beneficial in volatile markets.
Disclaimer
This strategy is provided as-is, with no guarantee of profits or responsibility for losses. Trading involves risk, and you should only trade with money you can afford to lose. Always conduct your own research and consider your financial situation before engaging in trading.
Basic PRISM Algorithm [ByteBoost]The Basic ByteBoost PRISM strategy is designed to operate in various market conditions by leveraging the concept of brownian motion theory, which refers to the unpredictable movement of particles suspended in a fluid. This characteristic of random motion can be effectively utilized for analyzing time series data, such as market candles. Based on this notion, we are making the following assumptions regarding the market.
The stock price exhibits characteristics of Brownian motion.
The stock price is distributed in a log-normal pattern.
Volatility remains constant over time.
Options can only be exercised upon expiration.
Risk-free interest does not fluctuate over time.
There are no random or arbitrary opportunities present in the market.
Development Notes
This Strategy was developed with the PineScript language, version 5. This indicator, and most of the descriptions below, were derived largely from the TradingView reference manual. Feedback and suggestions for improvement are more than welcome, as well as recommended input settings and best practices to assist and guide new users effectively.
Features
The ByteBoost PRISM indicator is capable of analyzing multiple aspects of market behavior simultaneously such as:
Detection of potential trend reversals.
Assessment of trend strength and market sentiment.
Identification of stop loss levels.
Discovery of potential entry and exit points.
Ensuring compatibility and effectiveness with other indicators.
Visualization of strategy using historical data.
Strategy Description
PRISM is an all in one strategy that allows the visualization of entry and exit points as well as the historical performance for every set of parameters. PRISM is a slow paced indicator recommended for the 1h timeframe, because it operates on the belief that markets move in a Brownian motion, for which it leaves enough space and time for the market to decide a trend and catch it at the right time as well as finding appropriate exits given the trend.
PRISM can exist in either an uptrend or downtrend state, but it does not necessarily imply that it reflects the true trend being observed. Instead, it emphasizes capturing significant movements and capitalizing on them by utilizing oscillator levels and exit points calculated based on oversold or overbought values, along with the volatility associated with these movements.
Usage
To use this strategy it is first needed to select a correct set of inputs that correspond to the market you are using, the extra, win difference and oscillator length are dependent on the current market and the average price it manages, so these inputs need to be modified for every pair of assets used.
The long and short tags signify the opportune moment to initiate a new position in the market, whether it's a long or short position, respectively. The exit tags indicate when these positions should be closed. If no exits occur before a new long or short position emerges, it is essential to conclude the existing position and commence a new one in the opposite direction.
Regarding exits, up to two exits can be executed for each movement. The user has the flexibility to determine how these exits are utilized. In the input section, a specific percentage of equity can be selected to be sold during the first exit. If set to 100%, only a single exit will be presented. Otherwise, the remaining equity will be sold during the second exit or at the next trend reversal depending on which action occurs first.
In case the user requires additional exits beyond the initial two, the alternative exits option can be activated in the inputs. This will provide access to supplementary exits, although they may be less advisable compared to the primary exits.
Inputs / Settings
Capital - If using any leverage multiply the amount of money to invest by the leverage, else input the amount to be invested in every trade.
Start date - The date from which the strategy should begin its analysis. Leave unchanged to start from the earliest available date based on your account's plan.
End date - The date until which the strategy should conduct its analysis. Leave unchanged to continue until the current date.
Extra - The minimum gain required in the market to trigger an exit opportunity. It can be a negative number to allow exits at a loss, potentially minimizing losses.
First exit % - If an exit is decided to be partial, it is very likely that there will be a second exit, this parameter determines the percentage of equity to be sold at the first exit. Note that a second exit may not always be applicable.
Win difference - The minimum difference between the entry point and the first exit to determine whether it should be a full exit or a partial exit, as the exit price approaches the entry price, the probability of a trend reversal increases, a full exit is beneficial.
Oscillator - Enables or disables the main oscillator, which helps determine entry points. Not all assets may benefit from this parameter.
Oscillator length - Specifies the number of candles considered for the entry points oscillator.
Highlighter - Applies a light color between the trend and average price of each bar.
Labels - Displays all the labels on the chart indicating trends, positions and exits.
Candle color - Color codes the inside of the candles with the current signal.
Oscillator points - Adds visual dots to indicate when the oscillator has changed its trend.
Color uptrend - Determines the color scheme for identifying uptrend movements.
Color downtrend - Determines the color scheme for identifying downtrend movements.
Color long - Sets the color scheme for a new long position.
Color short - Sets the color scheme for a new short position.
Color exit - Decides the color scheme for the exit tag and cross shown.
Indicator Visuals
The strategy plots the direction of the trend on the chart and changes its color based on this. It also plots shapes on the chart to denote potential buy (Long) and sell (Short) points, where the signals of short and long will appear as well as exit points which can be found as three different,
Exit 1 - A partial exit which sells the previously selected percentage of equity.
Exit 2 - A second exit that can only happen after an Exit 1 has happened, and sell the remaining amount of equity.
Exit Full - A full exit is executed when the price at the exit point is lower than the entry price plus the win difference value. This condition indicates that it is more advantageous to take a single exit rather than waiting for a second exit.
Strategy Alerts
The strategy does not include built-in alerts. However, alerts can be added using the TradingView interface based on the strategy's buy and sell conditions. This way you will be able to receive notifications on your computer or phone when a new signal goes out.
Details
Repainting: It is important to mention that the strategy can mark false long or short signals, as the oscillator is allowed to repaint on the same candle. So users must make sure the candle has closed on buy/sell conditions.
Excessive capital issue: If you configure the strategy with a big amount of capital (+$1,000,000 for example) it is possible that it will completely stop calculating exit signals, as they will be too big for TradingView’s engine to process.
Conclusion
The ByteBoost PRISM strategy empowers traders by providing comprehensive market analysis, clear entry and exit signals, and the ability to visualize strategy performance using historical data. It is a superior algorithm that maximizes profit potential and minimizes risks, making it the preferred choice for traders seeking a competitive edge in the financial markets.
Disclaimer
This strategy is provided as-is, with no guarantee of profits or responsibility for losses. Trading involves risk, and you should only trade with money you can afford to lose. Always conduct your own research and consider your financial situation before engaging in trading.
Equity Curve Trading with EMAWhat Is Equity Curve Trading?
In equity curve trading, traders apply a moving average to the curve. The idea is when the equity curve drops below the moving average, the strategy is put on hold. This is done to stop losses when either the hopes of the plan working start dimming or when the trader knows he cannot afford more losses on a strategy. The trader can resume trading this particular strategy when the equity curve is above the moving average.
Equity Curve Trading puts an investor at the ease of knowing that his investment is covered even when he is not actively tracking his strategy. When the equity curve dips below a level investor is comfortable with, it can be paused until such time that the equity curve is back above the determined moving average.
Example:
Equity Curve Trading Example
Trading Strategy
I choosed the SuperTrend strategy for BTCUSDT on 4 hour time frame. That shows nice equity curve with default settings. Let's find out and check can we improve the equity curve with this modern money management trade method?
Some shift is exist in original equity curve relatively to filtered equity curve, because of array usage, but it is not affected on calculations.
Conclusion
I tested a different time frames, settings and equity curves shapes, but it not gives advantages in equity curve. You can look at the table on the top right corner of the strategy with equity curve and you will see some statistic information for the original strategy and for the modified equity curve trade strategy. In most cases we have lower Win Rate and lower Net Profit after turning on Equity curve trading method. In some cases this can be help if you have the equity curve looks like at the picture above, but this equity curve is really bad for choosing this strategy to trade. I found that EMA works better than SMA, and RMA works better then EMA applied to Equity Curve. You can test your strategy with this trade method if you want, I make the source code opened for it. Please share your results, I hope it will helps.
Conclusion 2
Equity Curve Trading definitely has its proponents in the industry, some of them quite vocal. But, the overall efficacy of the approach is certainly not crystal clear. In fact, what is clear is that it is relatively easy to take a good strategy, and significantly degrade its performance by employing equity curve trading. While the overall objective of equity curve trading is unquestionable – cease trading poor performing strategies - it is probable that there are better ways of accomplishing that goal. From this study, the conclusion is equity curve trading with simple indicators has more downside than upside.
Master Supertrend Strategy [Trendoscope]Here is the strategy version of the indicator - Master Supertrend
Options and variations are same throughout.
🎲 Variations
Following variations are provided in the form of settings.
🎯 Range Type
Instead of ATR, different types of ranges can be used for stop calculation. Here is the complete list used in the script.
Plus/Minus Range* - Calculates plus range and minus range for each candle and uses them for different sides of stop calculation
Ladder ATR - Based on the existing concept of Ladder ATR defined in Supertrend-Ladder-ATR
True Range - True range derived from standard function ta.tr
Standard Deviation - Standard deviation of close prices
🎯 Applied Calculation
In standard ATR, rma of TR is used for calculations. But, the application calculation provides option to users to use different mechanisms. It can be a type of moving average or few other types of calculations.
Available values are
sma
ema
hma
rma
wma
high
median
🎯 Other options
Few other options provided are
Use Close Price - If selected stops are calculated based on the close price instead of high/low prices
Wait for Close If selected, change of supertrend direction is calculated based on close price instead of high/low prices
Diminishing Stop Distance - When selected, stop distance for the trend direction can only reduce and cannot increase. This option is useful for keeping the tight stops on strong trends.
🎯 Plus Minus Range*
One of the range type used is Plus/Minus Range. What it means and how are these ranges calculated? Let's have a look.
Plus Range is an upward movement of a candle from its last price or open price whichever is lower.
Minus Range is a downward movement of a candle from its last price or open price whichever is higher.
This divides True Range into two separate range for positive and negative side.
Note : Effectiveness on daily charts are quire visible. However, if you want to use it for lower timeframes, please play around with settings before settling on suitable configuration.
Premium PRISM Algorithm [ByteBoost]The ByteBoost PRISM strategy is designed to operate in various market conditions by leveraging the concept of brownian motion theory, which refers to the unpredictable movement of particles suspended in a fluid. This characteristic of random motion can be effectively utilized for analyzing time series data, such as market candles. Based on this notion, we are making the following assumptions regarding the market.
The stock price exhibits characteristics of Brownian motion.
The stock price is distributed in a log-normal pattern.
Volatility remains constant over time.
Options can only be exercised upon expiration.
Risk-free interest does not fluctuate over time.
There are no random or arbitrary opportunities present in the market.
Development Notes
This Strategy was developed with the PineScript language, version 5. This indicator, and most of the descriptions below, were derived largely from the TradingView reference manual. Feedback and suggestions for improvement are more than welcome, as well as recommended input settings and best practices to assist and guide new users effectively.
Features
The ByteBoost PRISM indicator is capable of analyzing multiple aspects of market behavior simultaneously such as:
Detection of potential trend reversals.
Assessment of trend strength and market sentiment.
Identification of stop loss levels.
Discovery of potential entry and exit points.
Ensuring compatibility and effectiveness with other indicators.
Visualization of strategy using historical data.
Customization options available.
Strategy Description
PRISM is an all in one strategy that allows the visualization of entry and exit points as well as the historical performance for every set of parameters. PRISM is a slow paced indicator recommended for the 1h timeframe, because it operates on the belief that markets move in a Brownian motion, for which it leaves enough space and time for the market to decide a trend and catch it at the right time as well as finding appropriate exits given the trend.
PRISM can exist in either an uptrend or downtrend state, but it does not necessarily imply that it reflects the true trend being observed. Instead, it emphasizes capturing significant movements and capitalizing on them by utilizing oscillator levels and exit points calculated based on oversold or overbought values, along with the volatility associated with these movements.
Usage
To use this strategy it is first needed to select a correct set of inputs that correspond to the market you are using, the extra, win difference and oscillator length are dependent on the current market and the average price it manages, so these inputs need to be modified for every pair of assets used.
The long and short tags signify the opportune moment to initiate a new position in the market, whether it's a long or short position, respectively. The exit tags indicate when these positions should be closed. If no exits occur before a new long or short position emerges, it is essential to conclude the existing position and commence a new one in the opposite direction.
Regarding exits, up to two exits can be executed for each movement. The user has the flexibility to determine how these exits are utilized. In the input section, a specific percentage of equity can be selected to be sold during the first exit. If set to 100%, only a single exit will be presented. Otherwise, the remaining equity will be sold during the second exit or at the next trend reversal depending on which action occurs first.
In case the user requires additional exits beyond the initial two, the alternative exits option can be activated in the inputs. This will provide access to supplementary exits, although they may be less advisable compared to the primary exits.
Inputs / Settings
Capital - If using any leverage multiply the amount of money to invest by the leverage, else input the amount to be invested in every trade.
Start date - The date from which the strategy should begin its analysis. Leave unchanged to start from the earliest available date based on your account's plan.
End date - The date until which the strategy should conduct its analysis. Leave unchanged to continue until the current date.
Extra - The minimum gain required in the market to trigger an exit opportunity. It can be a negative number to allow exits at a loss, potentially minimizing losses.
First exit % - If an exit is decided to be partial, it is very likely that there will be a second exit, this parameter determines the percentage of equity to be sold at the first exit. Note that a second exit may not always be applicable.
Win difference - The minimum difference between the entry point and the first exit to determine whether it should be a full exit or a partial exit, as the exit price approaches the entry price, the probability of a trend reversal increases, a full exit is beneficial.
Limit length - Specifies the number of candles to consider for the overbought and oversold market calculation.
Low limit - Sets the minimum value of the limit to decide a short exit.
High limit - Sets the maximum value of the limit to decide a long exit.
Band length - Determines the number of candles to consider for the volatility analysis.
Band height - Sets the multiplication factor of the band to set the maximum and minimum height.
Increment - Determines the rate at which trend reversals occur. A higher value brings the line closer to the current price faster.
Candles exit - Specifies the minimum number of candles required to pass for an exit to become available after initiating a new position.
Oscillator - Enables or disables the main oscillator, which helps determine entry points. Not all assets may benefit from this parameter.
Oscillator length - Specifies the number of candles considered for the entry points oscillator.
Highlighter - Applies a light color between the trend and average price of each bar.
Trend Labels - Displays labels indicating an uptrend or downtrend.
Signal Labels - View the labels indicating a new long or short position.
Exit Labels - Displays the labels indicating exit points.
Candle color - Color codes the inside of the candles with the current signal.
Cloud - Visualize the average price cloud to determine trend direction.
Oscillator points - Adds visual dots to indicate when the oscillator has changed its trend.
Oscillator line - Displays the values of the oscillator to indicate upcoming trend changes.
Alternative exits - Shows additional exits to the ones we recommend, useful if the user missed an exit or needs to have more than two.
Color uptrend - Determines the color scheme for identifying uptrend movements.
Color downtrend - Determines the color scheme for identifying downtrend movements.
Color long - Sets the color scheme for a new long position.
Color short - Sets the color scheme for a new short position.
Color exit - Decides the color scheme for the exit tag and cross shown.
Color alternative exit - Changes the color scheme for the alternative exit cross.
Color oscillator line - Determines the color scheme used for the oscillator line.
Indicator Visuals
The strategy plots the direction of the trend on the chart and changes its color based on this. It also plots shapes on the chart to denote potential buy (Long) and sell (Short) points, where the signals of short and long will appear as well as exit points which can be found as three different,
Exit 1 - A partial exit which sells the previously selected percentage of equity.
Exit 2 - A second exit that can only happen after an Exit 1 has happened, and sell the remaining amount of equity.
Exit Full - A full exit is executed when the price at the exit point is lower than the entry price plus the win difference value. This condition indicates that it is more advantageous to take a single exit rather than waiting for a second exit.
Strategy Alerts
The strategy does not include built-in alerts. However, alerts can be added using the TradingView interface based on the strategy's buy and sell conditions. This way you will be able to receive notifications on your computer or phone when a new signal goes out.
Details
Repainting: It is important to mention that the strategy can mark false long or short signals, as the oscillator is allowed to repaint on the same candle. So users must make sure the candle has closed on buy/sell conditions.
Excessive capital issue: If you configure the strategy with a big amount of capital (+$1,000,000 for example) it is possible that it will completely stop calculating exit signals, as they will be too big for TradingView’s engine to process.
Conclusion
The ByteBoost PRISM strategy empowers traders by providing comprehensive market analysis, clear entry and exit signals, and the ability to visualize strategy performance using historical data. It is a superior algorithm that maximizes profit potential and minimizes risks, making it the preferred choice for traders seeking a competitive edge in the financial markets.
Disclaimer
This strategy is provided as-is, with no guarantee of profits or responsibility for losses. Trading involves risk, and you should only trade with money you can afford to lose. Always conduct your own research and consider your financial situation before engaging in trading.
Entropy, Liquidity, and Momentum - ELMoELMo is a momentum trading strategy based on two concepts: entropy and liquidity
The core concept behind the strategy is twofold: trade based on reversals in momentum based on the strength of a trend, and trade when market liquidity is beneficial to the position.
Entries and exits are determined by first calculating Shannon entropy for the time series and applying various moving averages. Separately, the Hui-Heubel Liquidity Ratio (lhh) is calculated and applied as a filter. Finally, additional conditionals such as RSI are applied to reduce false entries.
Entropy is defined as the amount of 'randomness' in a system and in this application can be thought of as a measure of the strength or weakness of a trend. The main moving averages and visible components in ELMo represent the normalized entropy score of the 'close' value (0 is series minimum, 1 is maximum). lhh will measure illiquid/fragile markets with low values and liquid/resilient markets with a high value. In general, the strategy will prefer to enter long when liquidity is high and short when liquidity is low, based off of cross events in the displayed entropy moving averages. I have published lhh as a separate indicator but it is not required for this strategy to function.
Several settings can be configured inside the strategy, including long/short bias, lookback window, MA band lengths, RSI boundaries, and more, but I have tried to choose sensible defaults that work for a large variety of situations and equities. My preferred time scales are 1m 1h 4h 1d 1w 1mo but others may work fine. Trailing stops are implemented using configurable ATR values. Additional settings are available to limit entry times (default is set to US options market open/close), and backtesting start date.
The long strategy is generally more accurate than short. Since Pinescript does not have a way to manage long/short exposure in a hedged fashion, I prefer to run two separate instances of ELMo in long-only and short-only modes for signaling. I prefer to trade this strategy with a long bias using the short signals as indications of windows of weakness where hedging could be prudent.
Monthly Strategy Performance TableWhat Is This?
This script code adds a Monthly Strategy Performance Table to your Pine Script strategy scripts so you can see a month-by-month and year-by-year breakdown of your P&L as a percentage of your account balance.
The table is based on realized equity rather than open equity, so it only updates the metrics when a trade is closed.
That's why some numbers will not match the Strategy Tester metrics (such as max drawdown), as the Strategy Tester bases metrics like max drawdown on open trade equity and not realized equity (closed trades).
The script is still a work-in-progress, so make sure to read the disclaimer below. But I think it's ready to release the code for others to play around with.
How To Use It
The script code includes one of my strategies as an example strategy. You need to replace my strategy code with your own. To do that just copy the source code below into a blank script, delete lines 11 -> 60 and paste your strategy code in there instead of mine. The script should work with most systems, but make sure to read the disclaimer below.
It works best with a significant amount of historical data, so it may not work very effectively on intraday timeframes as there is a severe limitation of available bars on TradingView. I recommend using it on 4HR timeframes and above, as anything less will produce very little usable data. Having a premium TradingView plan will also help boost the number of available bars.
You can hover your mouse over a table cell to get more information in the form of tooltips (such as the Long and Short win rate if you hover over your total return cell).
Credit
The code in this script is based on open-source code originally written by QuantNomad, I've made significant changes and additions to the original script but all credit for the idea and especially the display table code goes to them - I just built on top of it:
Why Did I Make This?
None of this is trading or investment advice, just my personal opinion based on my experience as a trader and systems developer these past 6+ years:
The TradingView Strategy Tester is severely limited in some important ways. And unless you use complex Excel formulas on exported test data, you can't see a granular perspective of your system's historical performance.
There is much more to creating profitable and tradeable systems than developing a strategy with a good win rate and a good return with a reasonable drawdown.
Some additional questions we need to ask ourselves are:
What did the system's worst drawdown look like?
How long did it last?
How often do drawdowns occur, and how quickly are they typically recovered?
How often do we have a break-even or losing month or year?
What is our expected compounded annual growth rate, and how does that growth rate compare to our max drawdown?
And many more questions that are too long to list and take a lifetime of trading experience to answer.
Without answering these kinds of questions, we run the risk of developing systems that look good on paper, but when it comes to live trading, we are uncomfortable or incapable of enduring the system's granular characteristics.
This Monthly Performance Table script code is intended to help bridge some of that gap with the Strategy Tester's limited default performance data.
Disclaimer
I've done my best to ensure the numbers this code outputs are accurate, and according to my testing with my personal strategy scripts it appears to work fine. But there is always a good chance I've missed something, or that this code will not work with your particular system.
The majority of my TradingView systems are extremely simple single-target systems that operate on a closed-candle basis to minimize many of the data reliability issues with the Strategy Tester, so I was unable to do much testing with multiple targets and pyramiding etc.
I've included a Debug option in the script that will display important data and information on a label each time a trade is closed. I recommend using the Debug option to confirm that the numbers you see in the table are accurate and match what your strategy is actually doing.
Always do your own due diligence, verify all claims as best you can, and never take anyone's word for anything.
Take care, and best of luck with your trading :)
Kind regards,
Matt.
PS. If you're interested in learning how this script works, I have a free hour-long video lesson breaking down the source code - just check out the links below this script or in my profile.
Premium Volatility Breakout Strategy [wbburgin]This the premium version of my Volatility Breakout strategy, which improves significantly on the original strategy (publicly available on my profile). Improvements are below. A note about any of my premium scripts: I will continue updating and improving the original (public) versions.
This strategy is not built for any specific asset or timeframe, and has been backtested on crypto, equities, and forex from 1min - 1day. However, I recommend using it on more volatile assets because it is a breakout strategy.
********** My Background
I am an investor, trader, and entrepreneur with 10 years of cryptocurrency and equity trading experience and founder of two fintech startups. I am a graduate of a prestigious university in the United States and carry broad and inclusive interests in mathematical finance, computer science, machine learning / artificial intelligence, as well as other fields.
**********
Improvements over the original Volatility Breakout strategy include:
Faster Trend Detection → The Premium Volatility Breakout strategy will catch trends faster by using adaptive volatility-weighted bands instead of standard-width volatility-weighted bands. This can improve win size and has performed well in my backtesting.
ADX Filter → False breakouts dampen the overall results of the original script, as well as the % profitable,so an ADX filter has been programmed into the script (toggle on/off in settings). This filter will only enter long and short trades when the ADX is above a certain threshold. This is by default toggled off because in most instances it will not be necessary, but in certain environments may be useful.
MA Configuration → Different types of moving averages and weights are now configurable in the settings. These can change the responsiveness of the strategy.
External Trend Filter → I use this strategy as a filter for some of my low-timeframe algorithms. I have added an external trend filter (a plot only displayed in the data window) that will return “1” when the trend is long and “-1” when the trend is short (displayed on-chart with red and green trend curves).
Customizable Alert Messages In-Strategy → In the settings, there will be text boxes where you can create your own alerts. All you will need to do is create an alert in the alert panel on TradingView and leave the message box blank - if you fill out the alert boxes in the settings, these will automatically populate into your alerts. There are in total four different customizable alerts messages: Entry and Exit alerts for both Long and Short sides. If you disable stop loss and/or take profit, these alerts will also be disabled. Similarly, if you disable shorts, all short alerts will be disabled.
About stop losses: This strategy does not come with a stop loss because the moving average acts as a stop loss / trade exit for both long and short entries.
**********
Display
You can turn off highlighting or barcolor in the settings. Additionally, future updates may include a color scheme for users using a light-themed window.
**********
Configuring Alerts
In TradingView desktop, go to the ‘Alerts’ tab on the right panel. Click the “+” button to create a new alert. Select this strategy for the condition and one of the two options that includes alert() function calls. Name the alert what you wish and clear the default message, because your text in the settings will replace this message.
Now that the alert is configured, you can go to the settings of the strategy and fill in your chosen text for the specific alert condition. You will need to check “Long and Short” in the “Trade Direction” setting in order for any Short Alerts to become active.
**********
Disclaimer
Copyright by wbburgin.
The information contained in my Scripts/Indicators/Algorithms does not constitute financial advice or a solicitation to buy or sell any securities of any type. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
Cyatophilum SmartStrategy MakerThis indicator allows you to use any other indicator from the TradingView library and create complex entry and exit conditions with ease thanks to several external inputs. Add risk management to your strategy and backtest it before creating alerts!
Key Features:
1 — Entry Conditions: Traders can define their entry conditions using up to three sources. They can choose from several options such as "Cross," "Crossover," "Crossunder," "Above," "Below," or "Equal" for comparing the selected sources.
2 — Entry Gates: Users can set logical gates (e.g., "AND," "OR," "XOR," "NAND," "XNOR") to combine multiple entry conditions.
3 — Exit Conditions: Similar to entry conditions, traders can define exit conditions based on two sources and select from various comparison options.
4 — Stop Loss: The indicator allows users to enable or disable a stop-loss feature. The stop-loss value is calculated based on a percentage of the base order price.
5 — Take Profit: Traders can set multiple take-profit levels by specifying the number of take profits, a base percentage, and a step value. Take profits can be defined as a percentage from the total volume or the base order.
6 — Safety Orders (DCA): The indicator supports the use of safety orders (Dollar Cost Averaging) to help manage risks. Users can set the number of safety orders, price deviation, step scale, and volume scale.
7 — Backtest Settings: Traders can define the start and end periods for backtesting their strategy. This feature allows them to analyze the performance of their strategy within specific timeframes.
8 — Alerts: The indicator provides the option to create alerts for entry, exit, stop loss, take profit, and safety orders. Users can customize the alert messages using placeholders for dynamic values like price, symbol, and order size.
Hobbiecode - RSI + Close previous dayThis is a simple strategy that is working well on SPY but also well performing on Mini Futures SP500. The strategy is composed by the followin rules:
1. If RSI(2) is less than 15, then enter at the close.
2. Exit on close if today’s close is higher than yesterday’s high.
If you backtest it on Mini Futures SP500 you will be able to track data from 1993. It is important to select D1 as timeframe.
Please share any comment or idea below.
Have a good trading,
Ramón.
Hobbiecode - Five Day Low RSI StrategyThis is a simple strategy that is working well on SPY but also well performing on Mini Futures SP500. The strategy is composed by the followin rules:
1. If today’s close is below yesterday’s five-day low, go long at the close.
2. Sell at the close when the two-day RSI closes above 50.
3. There is a time stop of five days if the sell criterium is not triggered.
If you backtest it on Mini Futures SP500 you will be able to track data from 1993. It is important to select D1 as timeframe.
Please share any comment or idea below.
Have a good trading,
Ramón.