Way of ControlThis strategy meets all basic needs of most traders. The entry method is based off of the Point of Control (the Grey and changing red, green basis lines) and the Supertrend as a directional Filter for what is consider Bullish/Bearish Trend. The Entry Method can be adjusted at the bottom of the settings changing how the strategy enters trades based on the Point of Control and NOT the Supertrend.
It is important to note the Risk Management Filters. Initial balance is critical within any trading system as it prevents a lot of losing trade from occurring by not trading within it's zone.
The Time Management is by default filtering out the first hour to also prevent many losses that would occur as there is no direction in the first hour but this is adjustable to your liking for better back testing results if you only want to see performance in certain Time Sesssions (London, New York, Asia)
The William Filter is best at 130 but also is adjustable to your liking and is not entirely important to the strategy but it is a wonderful addition
Wskaźniki i strategie
Original Strategy Bot TradingDoesn't need a description it's Drat's liquidity sweep strategy with alerts
PTS - Bollinger Bands with Trailing StopPTS - Bollinger Bands with Trailing Stop Strategy
Overview
The "PTS - Bollinger Bands with Trailing Stop" strategy is designed to capitalize on strong bullish market movements by combining the Bollinger Bands indicator with a dynamic trailing stop based on the Average True Range (ATR). This strategy aims to enter long positions during upward breakouts and protect profits through an adaptive exit mechanism.
Key Features
1. Bollinger Bands Indicator
Basis Moving Average Type: Choose from SMA, EMA, SMMA, WMA, or VWMA for the Bollinger Bands' basis line. Length: Adjustable period for calculating the moving average and standard deviation (default is 20). Standard Deviation Multiplier (StdDev): Determines the width of the bands (default is 2.0). Source: Select the price data used for calculations (default is the closing price).
2. Entry Conditions
The strategy enters a long position when the closing price crosses above the upper Bollinger Band , indicating strong upward momentum.
3. Exit Conditions
Trailing Stop Loss: Implemented using ATR to adjust dynamically with market volatility. ATR Length: Period for calculating ATR (default is 14). ATR Multiplier for Trailing Stop: Determines how closely the trailing stop follows the price (default is 2.0). Close Below Lower Bollinger Band: The strategy exits the long position if the closing price crosses below the lower Bollinger Band .
4. Risk Management
Commission and Slippage: Commission is set at 0.1%; slippage is set to 3. Position Sizing: Uses 100% of equity per trade (adjustable).
5. Date Range Filter
Specify the time period during which the strategy is active. Start Date: January 1, 2018. End Date: December 31, 2069.
Customizable Inputs
BB Length: Adjust the period for Bollinger Bands calculation. BB StdDev: Modify the standard deviation multiplier. Basis MA Type: Select the moving average type. Source: Choose the price data source. Offset: Shift the Bollinger Bands on the chart. ATR Length: Set the period for ATR calculation. ATR Multiplier for Trailing Stop: Adjust the trailing stop sensitivity.
Thought for 1m 7s
Description for the "PTS - Bollinger Bands with Trailing Stop" Strategy
PTS - Bollinger Bands with Trailing Stop Strategy
Overview
The "PTS - Bollinger Bands with Trailing Stop" strategy is designed to capitalize on strong bullish market movements by combining the Bollinger Bands indicator with a dynamic trailing stop based on the Average True Range (ATR). This strategy aims to enter long positions during upward breakouts and protect profits through an adaptive exit mechanism.
Key Features
1. Bollinger Bands Indicator
Basis Moving Average Type: Choose from SMA, EMA, SMMA, WMA, or VWMA for the Bollinger Bands' basis line. Length: Adjustable period for calculating the moving average and standard deviation (default is 20). Standard Deviation Multiplier (StdDev): Determines the width of the bands (default is 2.0). Source: Select the price data used for calculations (default is the closing price).
2. Entry Conditions
The strategy enters a long position when the closing price crosses above the upper Bollinger Band , indicating strong upward momentum.
3. Exit Conditions
Trailing Stop Loss: Implemented using ATR to adjust dynamically with market volatility. ATR Length: Period for calculating ATR (default is 14). ATR Multiplier for Trailing Stop: Determines how closely the trailing stop follows the price (default is 2.0). Close Below Lower Bollinger Band: The strategy exits the long position if the closing price crosses below the lower Bollinger Band .
4. Risk Management
Commission and Slippage: Commission is set at 0.1%; slippage is set to 3. Position Sizing: Uses 100% of equity per trade (adjustable).
5. Date Range Filter
Specify the time period during which the strategy is active. Start Date: January 1, 2018. End Date: December 31, 2069.
Customizable Inputs
BB Length: Adjust the period for Bollinger Bands calculation. BB StdDev: Modify the standard deviation multiplier. Basis MA Type: Select the moving average type. Source: Choose the price data source. Offset: Shift the Bollinger Bands on the chart. ATR Length: Set the period for ATR calculation. ATR Multiplier for Trailing Stop: Adjust the trailing stop sensitivity.
How the Strategy Works
1. Initialization
Calculates Bollinger Bands and ATR based on selected parameters.
2. Entry Logic
Opens a long position when the closing price exceeds the upper Bollinger Band.
3. Exit Logic
Uses a trailing stop loss based on ATR. Exits if the closing price drops below the lower Bollinger Band.
4. Date Filtering
Executes trades only within the specified date range.
Advantages
Adaptive Risk Management: Trailing stop adjusts to market volatility. Simplicity: Clear entry and exit signals. Customizable Parameters: Tailor the strategy to different assets or conditions.
Considerations
Aggressive Position Sizing: Using 100% equity per trade is high-risk. Market Conditions: Best in trending markets; may produce false signals in sideways markets. Backtesting: Always test on historical data before live trading.
Disclaimer
This strategy is intended for educational and informational purposes only. Trading involves significant risk, and past performance is not indicative of future results. Assess your financial situation and consult a financial advisor if necessary.
Usage Instructions
1. Apply the Strategy: Add it to your TradingView chart. 2. Configure Inputs: Adjust parameters to suit your style and asset. 3. Analyze Backtest Results: Use the Strategy Tester. 4. Optimize Parameters: Experiment with input values. 5. Risk Management: Evaluate position sizing and incorporate risk controls.
Final Notes
The "PTS - Bollinger Bands with Trailing Stop" strategy provides a framework to leverage momentum breakouts while managing risk through adaptive trailing stops. Customize and test thoroughly to align with your trading objectives.
Fibonacci ATR Fusion - Strategy [presentTrading]Open-script again! This time is also an ATR-related strategy. Enjoy! :)
If you have any questions, let me know, and I'll help make this as effective as possible.
█ Introduction and How It Is Different
The Fibonacci ATR Fusion Strategy is an advanced trading approach that uniquely integrates Fibonacci-based weighted averages with the Average True Range (ATR) to identify and capitalize on significant market trends.
Unlike traditional strategies that rely on single indicators or static parameters, this method combines multiple timeframes and dynamic volatility measurements to enhance precision and adaptability. Additionally, it features a 4-step Take Profit (TP) mechanism, allowing for systematic profit-taking at various levels, which optimizes both risk management and return potential in long and short market positions.
BTCUSD 6hr Performance
█ Strategy, How It Works: Detailed Explanation
The Fibonacci ATR Fusion Strategy utilizes a combination of technical indicators and weighted averages to determine optimal entry and exit points. Below is a breakdown of its key components and operational logic.
🔶 1. Enhanced True Range Calculation
The strategy begins by calculating the True Range (TR) to measure market volatility accurately.
TR = max(High - Low, abs(High - Previous Close), abs(Low - Previous Close))
High and Low: Highest and lowest prices of the current trading period.
Previous Close: Closing price of the preceding trading period.
max: Selects the largest value among the three calculations to account for gaps and limit movements.
🔶 2. Buying Pressure (BP) Calculation
Buying Pressure (BP) quantifies the extent to which buyers are driving the price upwards within a period.
BP = Close - True Low
Close: Current period's closing price.
True Low: The lower boundary determined in the True Range calculation.
🔶 3. Ratio Calculation for Different Periods
To assess the strength of buying pressure relative to volatility, the strategy calculates a ratio over various Fibonacci-based timeframes.
Ratio = 100 * (Sum of BP over n periods) / (Sum of TR over n periods)
n: Length of the period (e.g., 8, 13, 21, 34, 55).
Sum of BP: Cumulative Buying Pressure over n periods.
Sum of TR: Cumulative True Range over n periods.
This ratio normalizes buying pressure, making it comparable across different timeframes.
🔶 4. Weighted Average Calculation
The strategy employs a weighted average of ratios from multiple Fibonacci-based periods to smooth out signals and enhance trend detection.
Weighted Avg = (w1 * Ratio_p1 + w2 * Ratio_p2 + w3 * Ratio_p3 + w4 * Ratio_p4 + Ratio_p5) / (w1 + w2 + w3 + w4 + 1)
w1, w2, w3, w4: Weights assigned to each ratio period.
Ratio_p1 to Ratio_p5: Ratios calculated for periods p1 to p5 (e.g., 8, 13, 21, 34, 55).
This weighted approach emphasizes shorter periods more heavily, capturing recent market dynamics while still considering longer-term trends.
🔶 5. Simple Moving Average (SMA) of Weighted Average
To further smooth the weighted average and reduce noise, a Simple Moving Average (SMA) is applied.
Weighted Avg SMA = SMA(Weighted Avg, m)
- m: SMA period (e.g., 3).
This smoothed line serves as the primary signal generator for trade entries and exits.
🔶 6. Trading Condition Thresholds
The strategy defines specific threshold values to determine optimal entry and exit points based on crossovers and crossunders of the SMA.
Long Condition = Crossover(Weighted Avg SMA, Long Entry Threshold)
Short Condition = Crossunder(Weighted Avg SMA, Short Entry Threshold)
Long Exit = Crossunder(Weighted Avg SMA, Long Exit Threshold)
Short Exit = Crossover(Weighted Avg SMA, Short Exit Threshold)
Long Entry Threshold (T_LE): Level at which a long position is triggered.
Short Entry Threshold (T_SE): Level at which a short position is triggered.
Long Exit Threshold (T_LX): Level at which a long position is exited.
Short Exit Threshold (T_SX): Level at which a short position is exited.
These conditions ensure that trades are only executed when clear trends are identified, enhancing the strategy's reliability.
Previous local performance
🔶 7. ATR-Based Take Profit Mechanism
When enabled, the strategy employs a 4-step Take Profit system to systematically secure profits as the trade moves in the desired direction.
TP Price_1 Long = Entry Price + (TP1ATR * ATR Value)
TP Price_2 Long = Entry Price + (TP2ATR * ATR Value)
TP Price_3 Long = Entry Price + (TP3ATR * ATR Value)
TP Price_1 Short = Entry Price - (TP1ATR * ATR Value)
TP Price_2 Short = Entry Price - (TP2ATR * ATR Value)
TP Price_3 Short = Entry Price - (TP3ATR * ATR Value)
- ATR Value: Calculated using ATR over a specified period (e.g., 14).
- TPxATR: User-defined multipliers for each take profit level.
- TPx_percent: Percentage of the position to exit at each TP level.
This multi-tiered exit strategy allows for partial position closures, optimizing profit capture while maintaining exposure to potential further gains.
█ Trade Direction
The Fibonacci ATR Fusion Strategy is designed to operate in both long and short market conditions, providing flexibility to traders in varying market environments.
Long Trades: Initiated when the SMA of the weighted average crosses above the Long Entry Threshold (T_LE), indicating strong upward momentum.
Short Trades: Initiated when the SMA of the weighted average crosses below the Short Entry Threshold (T_SE), signaling robust downward momentum.
Additionally, the strategy can be configured to trade exclusively in one direction—Long, Short, or Both—based on the trader’s preference and market analysis.
█ Usage
Implementing the Fibonacci ATR Fusion Strategy involves several steps to ensure it aligns with your trading objectives and market conditions.
1. Configure Strategy Parameters:
- Trading Direction: Choose between Long, Short, or Both based on your market outlook.
- Trading Condition Thresholds: Set the Long Entry, Short Entry, Long Exit, and Short Exit thresholds to define when to enter and exit trades.
2. Set Take Profit Levels (if enabled):
- ATR Multipliers: Define how many ATRs away from the entry price each take profit level is set.
- Take Profit Percentages: Allocate what percentage of the position to close at each TP level.
3. Apply to Desired Chart:
- Add the strategy to the chart of the asset you wish to trade.
- Observe the plotted Fibonacci ATR and SMA Fibonacci ATR indicators for visual confirmation.
4. Monitor and Adjust:
- Regularly review the strategy’s performance through backtesting.
- Adjust the input parameters based on historical performance and changing market dynamics.
5. Risk Management:
- Ensure that the sum of take profit percentages does not exceed 100% to avoid over-closing positions.
- Utilize the ATR-based TP levels to adapt to varying market volatilities, maintaining a balanced risk-reward ratio.
█ Default Settings
Understanding the default settings is crucial for optimizing the Fibonacci ATR Fusion Strategy's performance. Here's a precise and simple overview of the key parameters and their effects:
🔶 Key Parameters and Their Effects
1. Trading Direction (`tradingDirection`)
- Default: Both
- Effect: Determines whether the strategy takes both long and short positions or restricts to one direction. Selecting Both allows maximum flexibility, while Long or Short can be used for directional bias.
2. Trading Condition Thresholds
Long Entry (long_entry_threshold = 58.0): Higher values reduce false positives but may miss trades.
Short Entry (short_entry_threshold = 42.0): Lower values capture early short trends but may increase false signals.
Long Exit (long_exit_threshold = 42.0): Exits long positions early, securing profits but potentially cutting trends short.
Short Exit (short_exit_threshold = 58.0): Delays short exits to capture favorable movements, avoiding premature exits.
3. Take Profit Configuration (`useTakeProfit` = false)
- Effect: When enabled, the strategy employs a 4-step TP mechanism to secure profits at multiple levels. By default, it is disabled to allow users to opt-in based on their trading style.
4. ATR-Based Take Profit Multipliers
TP1 (tp1ATR = 3.0): Sets the first TP at 3 ATRs for initial profit capture.
TP2 (tp2ATR = 8.0): Targets larger trends, though less likely to be reached.
TP3 (tp3ATR = 14.0): Optimizes for extreme price moves, seldom triggered.
5. Take Profit Percentages
TP Level 1 (tp1_percent = 12%): Secures 12% at the first TP.
TP Level 2 (tp2_percent = 12%): Exits another 12% at the second TP.
TP Level 3 (tp3_percent = 12%): Closes an additional 12% at the third TP.
6. Weighted Average Parameters
Ratio Periods: Fibonacci-based intervals (8, 13, 21, 34, 55) balance responsiveness.
Weights: Emphasizes recent data for timely responses to market trends.
SMA Period (weighted_avg_sma_period = 3): Smoothens data with minimal lag, balancing noise reduction and responsiveness.
7. ATR Period (`atrPeriod` = 14)
Effect: Sets the ATR calculation length, impacting TP sensitivity to volatility.
🔶 Impact on Performance
- Sensitivity and Responsiveness:
- Shorter Ratio Periods and Higher Weights: Make the weighted average more responsive to recent price changes, allowing quicker trade entries and exits but increasing the likelihood of false signals.
- Longer Ratio Periods and Lower Weights: Provide smoother signals with fewer false positives but may delay trade entries, potentially missing out on significant price moves.
- Profit Taking:
- ATR Multipliers: Higher multipliers set take profit levels further away, targeting larger price movements but reducing the probability of reaching these levels.
- Fixed Percentages: Allocating equal percentages at each TP level ensures consistent profit realization and risk management, preventing overexposure.
- Trade Direction Control:
- Selecting Specific Directions: Restricting trades to Long or Short can align the strategy with market trends or personal biases, potentially enhancing performance in trending markets.
- Risk Management:
- Take Profit Percentages: Dividing the position into smaller percentages at multiple TP levels helps lock in profits progressively, reducing risk and allowing the remaining position to ride further trends.
- Market Adaptability:
- Weighted Averages and ATR: By combining multiple timeframes and adjusting to volatility, the strategy adapts to different market conditions, maintaining effectiveness across various asset classes and timeframes.
---
If you want to know more about ATR, can also check "SuperATR 7-Step Profit".
Enjoy trading.
Demo GPT - Day Trading Scalping StrategyOverview:
This strategy is designed for day trading and scalping, utilizing a combination of technical indicators, candlestick patterns, and volume analysis to determine entry and exit points. It focuses on capturing short-term price movements while ensuring that trades are executed under specific market conditions.
Key Components:
Technical Indicators Used:
Exponential Moving Average (EMA): The strategy uses the 20-period EMA to identify the trend direction. The EMA smooths out price data, helping traders make more informed decisions about potential buy or sell signals.
Volume Weighted Average Price (VWAP): VWAP is used to measure the average price a security has traded at throughout the day, based on both volume and price. This indicator helps assess whether the current price is above or below the average trading price.
Camarilla Pivot Points: The strategy calculates four levels of Camarilla pivots (S2, S3, R2, R3) based on the highest and lowest prices over the last 14 daily candles. These levels act as potential support and resistance zones, guiding entry and exit decisions.
Candlestick Analysis:
Buy Condition: A buy signal is triggered when:
The first candle (previous candle) is green (close > open).
The second candle (current candle) is also green and opens above the first candle.
The volume of the current candle exceeds the 20-period moving average of volume, indicating strong buying interest.
Sell Condition: A sell signal is triggered when:
The first candle is red (close < open).
The second candle opens below the first red candle.
The volume of the current candle also exceeds the 20-period moving average of volume, indicating strong selling pressure.
Position Management:
The strategy enters a long position (buy) when the buy condition is met and closes the long position when the sell condition is met. This approach aims to capture upward momentum while avoiding extended exposure to downside risks.
Trading Settings:
Capital Management: The strategy uses 100% of available capital for each trade, allowing for maximum exposure to potential gains.
Commission and Slippage: The script includes settings for a commission rate of 0.1% and slippage of 3, accounting for trading costs and potential price changes during order execution.
Date Filtering: The strategy allows users to set a start date (January 1, 2018) and an end date (December 31, 2069) for trade execution, providing flexibility in backtesting and live trading.
Visualization:
The script plots the 20 EMA, VWAP, and the Camarilla pivot levels on the chart for visual reference.
Buy and sell signals are visually represented with shapes on the chart, making it easy to identify potential trade opportunities at a glance.
Volume is plotted in a separate pane to assess trading activity, and a horizontal line at zero provides a reference point.
Summary:
This Day Trading Scalping Strategy is designed to exploit short-term price movements by using a combination of EMAs, VWAP, and Camarilla pivot levels, alongside candlestick patterns and volume analysis. It is well-suited for traders looking to make quick trades based on real-time market conditions while maintaining a disciplined approach to entry and exit points. The strategy is highly visual, allowing traders to quickly assess market conditions and make informed trading decisions.
Feel free to modify or adjust any aspects of the strategy according to your specific trading goals or preferences!
VWAP Stdev Bands Strategy (Long Only)The VWAP Stdev Bands Strategy (Long Only) is designed to identify potential long entry points in trending markets by utilizing the Volume Weighted Average Price (VWAP) and standard deviation bands. This strategy focuses on capturing upward price movements, leveraging statistical measures to determine optimal buy conditions.
Key Features:
VWAP Calculation: The strategy calculates the VWAP, which represents the average price a security has traded at throughout the day, weighted by volume. This is an essential indicator for determining the overall market trend.
Standard Deviation Bands: Two bands are created above and below the VWAP, calculated using specified standard deviations. These bands act as dynamic support and resistance levels, providing insight into price volatility and potential reversal points.
Trading Logic:
Long Entry Condition: A long position is triggered when the price crosses below the lower standard deviation band and then closes above it, signaling a potential price reversal to the upside.
Profit Target: The strategy allows users to set a predefined profit target, closing the long position once the specified target is reached.
Time Gap Between Orders: A customizable time gap can be specified to prevent multiple orders from being placed in quick succession, allowing for a more controlled trading approach.
Visualization: The VWAP and standard deviation bands are plotted on the chart with distinct colors, enabling traders to visually assess market conditions. The strategy also provides optional plotting of the previous day's VWAP for added context.
Use Cases:
Ideal for traders looking to engage in long-only positions within trending markets.
Suitable for intraday trading strategies or longer-term approaches based on market volatility.
Customization Options:
Users can adjust the standard deviation values, profit target, and time gap to tailor the strategy to their specific trading style and market conditions.
Note: As with any trading strategy, it is important to conduct thorough backtesting and analysis before live trading. Market conditions can change, and past performance does not guarantee future results.
Dual Momentum StrategyThis Pine Script™ strategy implements the "Dual Momentum" approach developed by Gary Antonacci, as presented in his book Dual Momentum Investing: An Innovative Strategy for Higher Returns with Lower Risk (McGraw Hill Professional, 2014). Dual momentum investing combines relative momentum and absolute momentum to maximize returns while minimizing risk. Relative momentum involves selecting the asset with the highest recent performance between two options (a risky asset and a safe asset), while absolute momentum considers whether the chosen asset has a positive return over a specified lookback period.
In this strategy:
Risky Asset (SPY): Represents a stock index fund, typically more volatile but with higher potential returns.
Safe Asset (TLT): Represents a bond index fund, which generally has lower volatility and acts as a hedge during market downturns.
Monthly Momentum Calculation: The momentum for each asset is calculated based on its price change over the last 12 months. Only assets with a positive momentum (absolute momentum) are considered for investment.
Decision Rules:
Invest in the risky asset if its momentum is positive and greater than that of the safe asset.
If the risky asset’s momentum is negative or lower than the safe asset's, the strategy shifts the allocation to the safe asset.
Scientific Reference
Antonacci's work on dual momentum investing has shown the strategy's ability to outperform traditional buy-and-hold methods while reducing downside risk. This approach has been reviewed and discussed in both academic and investment publications, highlighting its strong risk-adjusted returns (Antonacci, 2014).
Reference: Antonacci, G. (2014). Dual Momentum Investing: An Innovative Strategy for Higher Returns with Lower Risk. McGraw Hill Professional.
Dynamic RSI Mean Reversion StrategyDynamic RSI Mean Reversion Strategy
Overview:
This strategy uses an RSI with ATR-Adjusted OB/OS levels in order to enhance the quality of it's mean reversion trades. It also incorporates a form of trend filtering in an effort to minimize downside and maximize upside. The backtest has fewer trades, as it uses substantial filtering to enhance trade quality. As you can see, I didn't cherry pick the results, so the results aren't the most beautiful thing you'll see in your life. I did this to ensure nobody gets misled. If you need a higher frequency of trades, consider removing the trend filter or increasing the length of the EMAs used for trend detection.
Features:
Dynamic OB/OS Levels: Uses ATR to adjust overbought and oversold thresholds dynamically, making the RSI more responsive in varying volatility conditions. This approach enhances signal strength by expanding the RSI range in high volatility and tightening it in low volatility.
Mean Reversion Focus: Designed for mean reversion but incorporates a trend-following filter to reduce countertrend trades. When the RSI is high, it often indicates an uptrend, so a trend filter prevents shorting in these cases and the same goes for downtrends and longing.
Trend Filtering: A moving average cross trend filter checks for the trend direction, with the RSI signal line color-coded to reflect trend shifts. Entries occur when the RSI crosses above or below the dynamic thresholds and is not a countertrend trade.
Stop Losses: Stop losses are set based on ATR distance from the entry price, providing volatility-adjusted protection.
Note:
If you're using this strategy on assets with a higher price, remember to increase the initial capital in the strategy settings. Otherwise, the strategy won't generate any (or many) trades and you'll end up with some inaccurate results.
Recommended Use:
Test it on different assets and timeframes. I’ve found the best results with standard RSI inputs, a relatively slow ATR, and a slower MA cross for trend filtering. Thus, the defaults are set that way. If the trend metrics are too slow, you’ll filter out too many good trades while allowing crummy ones; if too fast, most trades may be filtered out. As always, this has a lot of configurability so experiment to find the balance that works for your trading style.
QQE with EMA Cross Strategy - GauravThis QQE and EMA Crossover based strategy is made to test on Index. Test and use wisely.
only 200-40ema.....Gotta just check the resultsGoing long when the price crosses 200ema and close when the price goes below 40 ema.Just to test the outcomes.
Trade Moments MA's + DPO + MACD StrategyExplanation of Key Components
Zero-Lag Moving Average (ZLMA): Uses an EMA-based approach to reduce lag.
EMA & SMA: Classic moving averages for trend confirmation.
DPO: Detrends the price, helping to see cyclical movement in the data.
Impulse MACD: Difference between the MACD line and signal line for momentum tracking.
Trade Logic:
Buy Signal: ZLMA crossing above SMA with a positive Impulse MACD.
Sell Signal: ZLMA crossing below EMA with a negative Impulse MACD.
This strategy provides visual buy/sell signals on the chart with customizable moving average lengths, which you can adjust as needed to optimize your trading approach.
Premium Intraday//@version=5
// DISCLAIMER: This script is for educational purposes only.
// It is not intended as financial advice or a recommendation to trade any specific assets.
// Trading involves risk, and you should conduct your own research and consult with a financial advisor before making any trading decisions.
strategy("Premium Intraday", overlay=true, default_qty_type=strategy.fixed, default_qty_value=100, initial_capital=100000)
// Non-editable inputs
atrPeriod = 4
factor = 3.83
stopLossATR = 3.6
targetProfitATR = 7
// Non-editable intraday trading times
startHour = 9
startMinute = 30
endHour = 15
endMinute = 15
// Calculate Supertrend
= ta.supertrend(factor, atrPeriod)
// Get ATR value
atrValue = ta.atr(atrPeriod)
// Reverse long and short conditions
longCondition = ta.change(direction) > 0
shortCondition = ta.change(direction) < 0
// Get current time
currentHour = hour(time)
currentMinute = minute(time)
startTime = timestamp(year(time), month(time), dayofmonth(time), startHour, startMinute)
endTime = timestamp(year(time), month(time), dayofmonth(time), endHour, endMinute)
// Entry and exit logic with stop loss and take profit
if (time >= startTime and time <= endTime)
if (longCondition)
longStopPrice = close - (stopLossATR * atrValue)
longTargetPrice = close + (targetProfitATR * atrValue)
strategy.entry("My Long Entry Id", strategy.long)
strategy.exit("Long Take Profit/Stop Loss", from_entry="My Long Entry Id", limit=longTargetPrice, stop=longStopPrice)
if (shortCondition)
shortStopPrice = close + (stopLossATR * atrValue)
shortTargetPrice = close - (targetProfitATR * atrValue)
strategy.entry("My Short Entry Id", strategy.short)
strategy.exit("Short Take Profit/Stop Loss", from_entry="My Short Entry Id", limit=shortTargetPrice, stop=shortStopPrice)
// Close all positions at the end of the day
if (time > endTime and strategy.opentrades > 0)
strategy.close_all()
// Ichimoku Cloud for visual purposes only
conversionPeriods = 9
basePeriods = 26
laggingSpan2Periods = 52
displacement = 26
donchian(len) => math.avg(ta.lowest(len), ta.highest(len))
conversionLine = donchian(conversionPeriods)
baseLine = donchian(basePeriods)
leadLine1 = math.avg(conversionLine, baseLine)
leadLine2 = donchian(laggingSpan2Periods)
plot(conversionLine, color=#2962FF, title="Conversion Line")
plot(baseLine, color=#B71C1C, title="Base Line")
plot(close, offset=-displacement + 1, color=#43A047, title="Lagging Span")
p1 = plot(leadLine1, offset=displacement - 1, color=#A5D6A7, title="Leading Span A")
p2 = plot(leadLine2, offset=displacement - 1, color=#EF9A9A, title="Leading Span B")
plot(leadLine1 > leadLine2 ? leadLine1 : leadLine2, offset=displacement - 1, title="Kumo Cloud Upper Line", display=display.none)
plot(leadLine1 < leadLine2 ? leadLine1 : leadLine2, offset=displacement - 1, title="Kumo Cloud Lower Line", display=display.none)
fill(p1, p2, color=leadLine1 > leadLine2 ? color.rgb(67, 160, 71, 90) : color.rgb(244, 67, 54, 90))
Long and Short Strategy1Long and Short
Этот базовый скрипт можно модифицировать, добавляя дополнительные индикаторы, фильтры и правила управления рисками для улучшения эффективности стратегии.
Cruce Medias RSI - SISTEMASTRADING.ioEstrategia Combinada: Cruce de Medias y RSI
Sistema avanzado que combina el poder del seguimiento de tendencia de las medias móviles con la detección de momentum del RSI.
Componentes Técnicos:
Media Móvil Corta (20 períodos)
Media Móvil Larga (200 períodos)
RSI (14 períodos)
Niveles de sobrecompra/sobreventa personalizables
Lógica de Trading:
Medias móviles: Identifican la dirección de la tendencia
RSI: Confirma momentum y reversiones potenciales
Combinación: Proporciona señales más robustas
CCI Threshold StrategyThe CCI Threshold Strategy is a trading approach that utilizes the Commodity Channel Index (CCI) as a momentum indicator to identify potential buy and sell signals in financial markets. The CCI is particularly effective in detecting overbought and oversold conditions, providing traders with insights into possible price reversals. This strategy is designed for use in various financial instruments, including stocks, commodities, and forex, and aims to capitalize on price movements driven by market sentiment.
Commodity Channel Index (CCI)
The CCI was developed by Donald Lambert in the 1980s and is primarily used to measure the deviation of a security's price from its average price over a specified period.
The formula for CCI is as follows:
CCI=(TypicalPrice−SMA)×0.015MeanDeviation
CCI=MeanDeviation(TypicalPrice−SMA)×0.015
where:
Typical Price = (High + Low + Close) / 3
SMA = Simple Moving Average of the Typical Price
Mean Deviation = Average of the absolute deviations from the SMA
The CCI oscillates around a zero line, with values above +100 indicating overbought conditions and values below -100 indicating oversold conditions (Lambert, 1980).
Strategy Logic
The CCI Threshold Strategy operates on the following principles:
Input Parameters:
Lookback Period: The number of periods used to calculate the CCI. A common choice is 9, as it balances responsiveness and noise.
Buy Threshold: Typically set at -90, indicating a potential oversold condition where a price reversal is likely.
Stop Loss and Take Profit: The strategy allows for risk management through customizable stop loss and take profit points.
Entry Conditions:
A long position is initiated when the CCI falls below the buy threshold of -90, indicating potential oversold levels. This condition suggests that the asset may be undervalued and due for a price increase.
Exit Conditions:
The long position is closed when the closing price exceeds the highest price of the previous day, indicating a bullish reversal. Additionally, if the stop loss or take profit thresholds are hit, the position will be exited accordingly.
Risk Management:
The strategy incorporates optional stop loss and take profit mechanisms, which can be toggled on or off based on trader preference. This allows for flexibility in risk management, aligning with individual risk tolerances and trading styles.
Benefits of the CCI Threshold Strategy
Flexibility: The CCI Threshold Strategy can be applied across different asset classes, making it versatile for various market conditions.
Objective Signals: The use of quantitative thresholds for entry and exit reduces emotional bias in trading decisions (Tversky & Kahneman, 1974).
Enhanced Risk Management: By allowing traders to set stop loss and take profit levels, the strategy aids in preserving capital and managing risk effectively.
Limitations
Market Noise: The CCI can produce false signals, especially in highly volatile markets, leading to potential losses (Bollinger, 2001).
Lagging Indicator: As a lagging indicator, the CCI may not always capture rapid market movements, resulting in missed opportunities (Pring, 2002).
Conclusion
The CCI Threshold Strategy offers a systematic approach to trading based on well-established momentum principles. By focusing on overbought and oversold conditions, traders can make informed decisions while managing risk effectively. As with any trading strategy, it is crucial to backtest the approach and adapt it to individual trading styles and market conditions.
References
Bollinger, J. (2001). Bollinger on Bollinger Bands. New York: McGraw-Hill.
Lambert, D. (1980). Commodity Channel Index. Technical Analysis of Stocks & Commodities, 2, 3-5.
Pring, M. J. (2002). Technical Analysis Explained. New York: McGraw-Hill.
Tversky, A., & Kahneman, D. (1974). Judgment under uncertainty: Heuristics and biases. Science, 185(4157), 1124-1131.
Crypto Swing Levels with StrategyAuthor: Ravi Kumar
Description :
AIM: This indicator helps you identify the swing level for crypto.
Background : This strategy is based on the last 5 min candle closed for the day as per Indian time standard. i.e: 23:55
Strategy 1: The code identifies the high and low of the 23:55 5-minute candle and draws 0.83% from the high and 0.83% from below to identify the first-level range.
Repeat the above steps to get further above and below ranges.
Strategy 2:
Using Strategy 1 , one can find the beautiful swing levels but when to buy and when to sell I am merging default indicators settings
1. MACD indicator
2. RSI
Buy Condition:
A long (buy) signal is generated when:
delta (MACD histogram) crosses above the threshold.
The closing price is above the longMA (indicating an uptrend).
rsi Value is below overbought Level, avoiding overbought conditions.
----------------------------------------------------------------------------------------------------
Sell Condition:
A short (sell) signal is triggered when:
delta crosses below the -threshold.
The closing price is below longMA (indicating a downtrend).
rsi Value is above oversold Level, avoiding oversold conditions.
How to use Indicator :
-----------------------------------
Step-1: Chart timeframe should be in 5 min
Step -2:Once Indicator will came you will see a message to select date and time range. Select yesterday date to forecast the levels for upcoming days.
Example : if you want to see levels for 4th nov then in setting select the date as 3rd Nov.
Step-3 : Now your levels are ready.
Note: It will help you to identify crucial levels of cryptos.
MACD & Stochastic Oscillator StrategyThis script uses the MACD crossover along with a Stochastic Oscillator filter to generate buy/sell signals. The MACD is effective for identifying momentum, while the Stochastic helps confirm overbought or oversold conditions.
MA Crossover with RSI FilterThis script combines a short-term moving average crossover with an RSI filter to reduce false signals. A buy is triggered when the short-term MA crosses above the long-term MA, provided RSI is above a threshold (indicating an uptrend), and a sell is triggered when the crossover reverses.
2 dây EMA (Đường trung bình động theo cấp số mũ) với các thông số bạn đã yêu cầu. Chiến lược này sẽ thực hiện mua khi EMA 22 cắt lên EMA 250 và bán khi EMA 22 cắt xuống EMA 250, với điểm dừng lỗ (SL) được xác định dựa trên giá trung bình của 4 phiên gần nhất. Tỷ lệ R
là 1:2 và có khả năng dời SL lên tới tỷ lệ R
1:10.
Monday Friday breakoutĐiều kiện Mua: Khi giá đóng cửa phá vỡ đỉnh của ngày thứ Hai hoặc thứ Sáu, chiến lược sẽ vào lệnh mua.
Điều kiện Bán: Khi giá đóng cửa phá vỡ đáy của ngày thứ Hai hoặc thứ Sáu, chiến lược sẽ vào lệnh bán.
Cắt lỗ và Chốt lời: Mức cắt lỗ được đặt dưới đáy đối với lệnh mua và trên đỉnh đối với lệnh bán. Mức chốt lời được tính với tỷ lệ R
là 1:1.