Strategy Tester [Cometreon]The Strategy Tester is a powerful backtesting tool that allows you to evaluate and optimize strategies created with the Strategy Builder or signals generated by the Signal Tester. It offers a comprehensive suite of options for risk management and optimization of trading performance.
Key Features:
Testing strategies on different symbols and timeframes
Advanced risk management with multiple Take Profit and Stop Loss options
Customization of trading sessions and initial capital
Generation of customized alerts for entry, exit, and TP/SL modifications
Technical Details and Customizable Inputs:
Source Entry Long and Short: Select entry conditions for the strategy from the "Signal Tester" or "Strategy Builder".
Source Exit Long and Short: Select exit conditions for the strategy from the "Signal Tester" or "Strategy Builder".
Trading Session: Choose the period in which the strategy will enter positions, selecting from: Months, Days, up to 3 hourly sessions, and the strategy's activity range, i.e., start and end date.
Alert Message: Set custom messages for each type of Alert, such as Entry Long, Exit Short, or Change SL Long
Plot: Choose whether to show Long and Short positions on the chart
Risk Management:
Customize the exits and risk management of your strategy, with a wide range of options including:
Initial Capital: Set the starting capital for the strategy
Quantity: Choose the entry quantity for each type of position, selecting from: Contracts, USD, Percentage of equity, and percentage of initial capital.
Take Profit: Configure up to 4 different Take Profits, choosing each type of level from:
- % : Percentage from the entry price.
- USD : Distance in USD from the entry price.
- Pip : Distance in Pips from the entry price.
- ATR : Set the ATR Take Profit multiplier using the length of the "ATR Period Long".
- Swing : Set the length to calculate the Swing as Take Profit Level
- Risk Reward : Set the Take Profit based on the Risk-Reward of the Stop Loss, vice versa for the Stop Loss (Take Profit or Stop Loss cannot both have the Risk Reward option).
Stop Loss: Set the Stop Loss to reduce the loss in case of defeat, also choosing the type of level as for the "Take Profit".
Break Even: Choose whether to modify the Stop Loss level when the price breaks a certain Take Profit level, you can choose the Stop level, adding or removing (%, USD, or Pip) from the entry level.
Trailing Take Profit: When the price breaks a set price, it allows activating an exit level by subtracting/increasing from the chosen Stop level, the level will continue to update every time the Stop source is updated, for example in Long every time High exceeds the previous one.
Trailing Stop Loss: When the price breaks a set price, it allows activating an exit level by subtracting/increasing from the chosen Stop level, the level will continue to update every time the Stop source is updated, for example in Long every time Low exceeds the previous one.
Exit Before End Session: Allows setting an exit time, for example to exit 1 candle before the end of the daily session.
How to Use The Indicator:
Add the Strategy Tester to the chart
Input signals generated by other TradeLab Beta indicators
Configure risk and capital management settings
Run the strategy backtesting and analyze the results
Optimize the strategy based on the obtained results
Take your trading to the next level with TradeLab Beta's Strategy Tester this powerful backtesting tool and start optimizing your trading strategies today.
Don't waste any more time and visit the link to get access to all Cometreon indicators.
Strategybuilder
Strategy Builder [Cometreon]The Strategy Builder is an advanced indicator that allows you to create customized trading strategies directly on TradingView. With the ability to define up to five entry conditions and two exit conditions, this tool offers unprecedented flexibility in creating complex strategies.
Key Features:
Creation of strategies with 5 entry conditions and 2 exit conditions
Use of any indicator available on TradingView, including private indicators
Advanced options for signal and condition management
Technical Details and Customizable Inputs:
Activate Signal: Option to activate or deactivate the Long or Short condition
Special Condition:** It's possible to activate a "Special" condition, choosing from:
1) Precedent Signal: Searches for the condition in a previous candle. For example, entering 4 will check the condition in the fourth previous candle.
2) Check Signal: Verifies if the condition has occurred in a certain number of candles. For example, entering 6 will check if the condition has occurred in at least one of the 6 previous candles.
3) Multiple Signal: Checks multiple consecutive conditions. For example, with 3 the condition must occur in all 3 previous candles, unlike the "Check Signal" where a single occurrence is sufficient.
4) Confirm Signal: Checks that the condition has not occurred previously. For example, entering 5 verifies that the condition has not been activated in any of the 5 previous candles.
Source Long and Short: Allows choosing the first value to create the condition, using any indicator on TradingView, including our private indicators with derived signals
Type Long and Short":** Defines the type of condition, with a wide range of intuitive options including:
1) Cross Over Value: Source Long/Short crosses upward the second value.
2) Cross Under Value: Source Long/Short crosses downward the second value.
3) Greater Than: Source Long/Short is greater than the second value.
4) Lower Than: Source Long/Short is less than the second value.
5) Equal To: Source Long/Short is equal to the second value.
6) Increase: Source Long/Short is greater than the previous candle.
7) Decrease: Source Long/Short is less than the previous candle.
8) No Change: Source Long/Short is equal to the previous candle.
9) Change Value: Source Long/Short is different from the previous candle.
Only First: Avoids multiple or repeated signals, excluding a signal if the condition was active in the previous candle.
Type Value: Allows choosing the type of the second value:
1) Normal: allows manually entering a value (for example, 20 or 50).
2) Choose: allows selecting a value from another indicator, as for the first value.
How to Use The Indicator:
Define entry and exit conditions using desired indicators
Configure signal management options for each condition
Test the created strategy directly on the chart or in combination with the Strategy Tester
Unlock the potential of your trading strategies with TradeLab Beta's Strategy Builder start creating customized strategies optimized for your trading goals.
Don't waste any more time and visit the link to get access to all Cometreon indicators.
AlgoBuilder [Trend-Following] | FractalystWhat's the strategy's purpose and functionality?
This strategy is designed for both traders and investors looking to rely on and trade based on historical and backtested data using automation. The main goal is to build profitable trend-following strategies that outperform the underlying asset in terms of returns while minimizing drawdown. For example, as for a benchmark, if the S&P 500 (SPX) has achieved an estimated 10% annual return with a maximum drawdown of -57% over the past 20 years, using this strategy with different entry and exit techniques, users can potentially seek ways to achieve a higher Compound Annual Growth Rate (CAGR) while maintaining a lower maximum drawdown.
Although the strategy can be applied to all markets and timeframes, it is most effective on stocks, indices, future markets, cryptocurrencies, and commodities and JPY currency pairs given their trending behaviors.
In trending market conditions, the strategy employs a combination of moving averages and diverse entry models to identify and capitalize on upward market movements. It integrates market structure-based trailing stop-loss mechanisms across different timeframes and provides exit techniques, including percentage-based and risk-reward (RR) based take profit levels.
Additionally, the strategy has also a feature that includes a built-in probability and sentiment function for traders who want to implement probabilities and market sentiment right into their trading strategies.
Performance summary, weekly, and monthly tables enable quick visualization of performance metrics like net profit, maximum drawdown, compound annual growth rate (CAGR), profit factor, average trade, average risk-reward ratio (RR), and more. This aids optimization to meet specific goals and risk tolerance levels effectively.
-----
How does the strategy perform for both investors and traders?
The strategy has two main modes, tailored for different market participants: Traders and Investors.
Trading:
1. Trading (1x):
- Designed for traders looking to capitalize on bullish trending markets.
- Utilizes a percentage risk per trade to manage risk and optimize returns.
- Suitable for active trading with a focus on trend-following and risk management.
- (1x) This mode ensures no stacking of positions, allowing for only one running position or trade at a time.
◓: Mode | %: Risk percentage per trade
2. Trading (2x):
Similar to the 1x mode but allows for two pyramiding entries.
This approach enables traders to increase their position size as the trade moves in their favor, potentially enhancing profits during strong bullish trends.
◓: Mode | %: Risk percentage per trade
3. Investing:
- Geared towards investors who aim to capitalize on bullish trending markets without using leverage while mitigating the asset's maximum drawdown.
- Utilizes 100% of the equity to buy, hold, and manage the asset.
- Focuses on long-term growth and capital appreciation by fully investing in the asset during bullish conditions.
- ◓: Mode | %: Risk not applied (In investing mode, the strategy uses 100% of equity to buy the asset)
-----
What's the purpose of using moving averages in this strategy? What are the underlying calculations?
Using moving averages is a widely-used technique to trade with the trend.
The main purpose of using moving averages in this strategy is to filter out bearish price action and to only take trades when the price is trading ABOVE specified moving averages.
The script uses different types of moving averages with user-adjustable timeframes and periods/lengths, allowing traders to try out different variations to maximize strategy performance and minimize drawdowns.
By applying these calculations, the strategy effectively identifies bullish trends and avoids market conditions that are not conducive to profitable trades.
The MA filter allows traders to choose whether they want a specific moving average above or below another one as their entry condition.
This comparison filter can be turned on (>/<) or off.
For example, you can set the filter so that MA#1 > MA#2, meaning the first moving average must be above the second one before the script looks for entry conditions. This adds an extra layer of trend confirmation, ensuring that trades are only taken in more favorable market conditions.
MA #1: Fast MA | MA #2: Medium MA | MA #3: Slow MA
⍺: MA Period | Σ: MA Timeframe
-----
What entry modes are used in this strategy? What are the underlying calculations?
The strategy by default uses two different techniques for the entry criteria with user-adjustable left and right bars: Breakout and Fractal.
1. Breakout Entries :
- The strategy looks for pivot high points with a default period of 3.
- It stores the most recent high level in a variable.
- When the price crosses above this most recent level, the strategy checks if all conditions are met and the bar is closed before taking the buy entry.
◧: Pivot high left bars period | ◨: Pivot high right bars period
2. Fractal Entries :
- The strategy looks for pivot low points with a default period of 3.
- When a pivot low is detected, the strategy checks if all conditions are met and the bar is closed before taking the buy entry.
◧: Pivot low left bars period | ◨: Pivot low right bars period
By utilizing these entry modes, the strategy aims to capitalize on bullish price movements while ensuring that the necessary conditions are met to validate the entry points.
-----
What type of stop-loss identification method are used in this strategy? What are the underlying calculations?
Initial Stop-Loss:
1. ATR Based:
The Average True Range (ATR) is a method used in technical analysis to measure volatility. It is not used to indicate the direction of price but to measure volatility, especially volatility caused by price gaps or limit moves.
Calculation:
- To calculate the ATR, the True Range (TR) first needs to be identified. The TR takes into account the most current period high/low range as well as the previous period close.
The True Range is the largest of the following:
- Current Period High minus Current Period Low
- Absolute Value of Current Period High minus Previous Period Close
- Absolute Value of Current Period Low minus Previous Period Close
- The ATR is then calculated as the moving average of the TR over a specified period. (The default period is 14).
Example - ATR (14) * 1.5
⍺: ATR period | Σ: ATR Multiplier
2. ADR Based:
The Average Day Range (ADR) is an indicator that measures the volatility of an asset by showing the average movement of the price between the high and the low over the last several days.
Calculation:
- To calculate the ADR for a particular day:
- Calculate the average of the high prices over a specified number of days.
- Calculate the average of the low prices over the same number of days.
- Find the difference between these average values.
- The default period for calculating the ADR is 14 days. A shorter period may introduce more noise, while a longer period may be slower to react to new market movements.
Example - ADR (14) * 1.5
⍺: ADR period | Σ: ADR Multiplier
Application in Strategy:
- The strategy calculates the current bar's ADR/ATR with a user-defined period.
- It then multiplies the ADR/ATR by a user-defined multiplier to determine the initial stop-loss level.
By using these methods, the strategy dynamically adjusts the initial stop-loss based on market volatility, helping to protect against adverse price movements while allowing for enough room for trades to develop.
Trailing Stop-Loss:
One of the key elements of this strategy is its ability to detec buyside and sellside liquidity levels across multiple timeframes to trail the stop-loss once the trade is in running profits.
By utilizing this approach, the strategy allows enough room for price to run.
There are two built-in trailing stop-loss (SL) options you can choose from while in a trade:
1. External Trailing Stop-Loss:
- Uses sell-side liquidity to trail your stop-loss, allowing price to consolidate before continuation. This method is less aggressive and provides more room for price fluctuations.
Example - External - Wick below the trailing SL - 12H trailing timeframe
⍺: Exit type | Σ: Trailing stop-loss timeframe
2. Internal Trailing Stop-Loss:
- Uses the most recent swing low with a period of 2 to trail your stop-loss. This method is more aggressive compared to the external trailing stop-loss, as it tightens the stop-loss closer to the current price action.
Example - Internal - Close below the trailing SL - 6H trailing timeframe
⍺: Exit type | Σ: Trailing stop-loss timeframe
Each market behaves differently across various timeframes, and it is essential to test different parameters and optimizations to find out which trailing stop-loss method gives you the desired results and performance.
-----
What type of break-even and take profit identification methods are used in this strategy? What are the underlying calculations?
For Break-Even:
- You can choose to set a break-even level at which your initial stop-loss moves to the entry price as soon as it hits, and your trailing stop-loss gets activated (if enabled).
- You can select either a percentage (%) or risk-to-reward (RR) based break-even, allowing you to set your break-even level as a percentage amount above the entry price or based on RR.
For TP1 (Take Profit 1):
- You can choose to set a take profit level at which your position gets fully closed or 50% if the TP2 boolean is enabled.
- Similar to break-even, you can select either a percentage (%) or risk-to-reward (RR) based take profit level, allowing you to set your TP1 level as a percentage amount above the entry price or based on RR.
For TP2 (Take Profit 2):
- You can choose to set a take profit level at which your position gets fully closed.
- As with break-even and TP1, you can select either a percentage (%) or risk-to-reward (RR) based take profit level, allowing you to set your TP2 level as a percentage amount above the entry price or based on RR.
The underlying calculations involve determining the price levels at which these actions are triggered. For break-even, it moves the initial stop-loss to the entry price and activate the trailing stop-loss once the break-even level is reached.
For TP1 and TP2, it's specifying the price levels at which the position is partially or fully closed based on the chosen method (percentage or RR) above the entry price.
These calculations are crucial for managing risk and optimizing profitability in the strategy.
⍺: BE/TP type (%/RR) | Σ: how many RR/% above the current price
-----
What's the ADR filter? What does it do? What are the underlying calculations?
The Average Day Range (ADR) measures the volatility of an asset by showing the average movement of the price between the high and the low over the last several days.
The period of the ADR filter used in this strategy is tied to the same period you've used for your initial stop-loss.
Users can define the minimum ADR they want to be met before the script looks for entry conditions.
ADR Bias Filter:
- Compares the current bar ADR with the ADR (Defined by user):
- If the current ADR is higher, it indicates that volatility has increased compared to ADR (DbU).(⬆)
- If the current ADR is lower, it indicates that volatility has decreased compared to ADR (DbU).(⬇)
Calculations:
1. Calculate ADR:
- Average the high prices over the specified period.
- Average the low prices over the same period.
- Find the difference between these average values in %.
2. Current ADR vs. ADR (DbU):
- Calculate the ADR for the current bar.
- Calculate the ADR (DbU).
- Compare the two values to determine if volatility has increased or decreased.
By using the ADR filter, the strategy ensures that trades are only taken in favorable market conditions where volatility meets the user's defined threshold, thus optimizing entry conditions and potentially improving the overall performance of the strategy.
>: Minimum required ADR for entry | %: Current ADR comparison to ADR of 14 days ago.
-----
What's the probability filter? What are the underlying calculations?
The probability filter is designed to enhance trade entries by using buyside liquidity and probability analysis to filter out unfavorable conditions.
This filter helps in identifying optimal entry points where the likelihood of a profitable trade is higher.
Calculations:
1. Understanding Swing highs and Swing Lows
Swing High: A Swing High is formed when there is a high with 2 lower highs to the left and right.
Swing Low: A Swing Low is formed when there is a low with 2 higher lows to the left and right.
2. Understanding the purpose and the underlying calculations behind Buyside, Sellside and Equilibrium levels.
3. Understanding probability calculations
1. Upon the formation of a new range, the script waits for the price to reach and tap into equilibrium or the 50% level. Status: "⏸" - Inactive
2. Once equilibrium is tapped into, the equilibrium status becomes activated and it waits for either liquidity side to be hit. Status: "▶" - Active
3. If the buyside liquidity is hit, the script adds to the count of successful buyside liquidity occurrences. Similarly, if the sellside is tapped, it records successful sellside liquidity occurrences.
5. Finally, the number of successful occurrences for each side is divided by the overall count individually to calculate the range probabilities.
Note: The calculations are performed independently for each directional range. A range is considered bearish if the previous breakout was through a sellside liquidity. Conversely, a range is considered bullish if the most recent breakout was through a buyside liquidity.
Example - BSL > 50%
-----
What's the sentiment Filter? What are the underlying calculations?
Sentiment filter aims to calculate the percentage level of bullish or bearish fluctuations within equally divided price sections, in the latest price range.
Calculations:
This filter calculates the current sentiment by identifying the highest swing high and the lowest swing low, then evenly dividing the distance between them into percentage amounts. If the price is above the 50% mark, it indicates bullishness, whereas if it's below 50%, it suggests bearishness.
Sentiment Bias Identification:
Bullish Bias: The current price is trading above the 50% daily range.
Bearish Bias: The current price is trading below the 50% daily range.
Example - Sentiment Enabled | Bullish degree above 50% | Bullish sentimental bias
>: Minimum required sentiment for entry | %: Current sentimental degree in a (Bullish/Bearish) sentimental bias
-----
What's the range length Filter? What are the underlying calculations?
The range length filter identifies the price distance between buyside and sellside liquidity levels in percentage terms. When enabled, the script only looks for entries when the minimum range length is met. This helps ensure that trades are taken in markets with sufficient price movement.
Calculations:
Range Length (%) = ( ( Buyside Level − Sellside Level ) / Current Price ) ×100
Range Bias Identification:
Bullish Bias: The current range price has broken above the previous external swing high.
Bearish Bias: The current range price has broken below the previous external swing low.
Example - Range length filter is enabled | Range must be above 5% | Price must be in a bearish range
>: Minimum required range length for entry | %: Current range length percentage in a (Bullish/Bearish) range
-----
What's the day filter Filter, what does it do?
The day filter allows users to customize the session time and choose the specific days they want to include in the strategy session. This helps traders tailor their strategies to particular trading sessions or days of the week when they believe the market conditions are more favorable for their trading style.
Customize Session Time:
Users can define the start and end times for the trading session.
This allows the strategy to only consider trades within the specified time window, focusing on periods of higher market activity or preferred trading hours.
Select Days:
Users can select which days of the week to include in the strategy.
This feature is useful for excluding days with historically lower volatility or unfavorable trading conditions (e.g., Mondays or Fridays).
Benefits:
Focus on Optimal Trading Periods:
By customizing session times and days, traders can focus on periods when the market is more likely to present profitable opportunities.
Avoid Unfavorable Conditions:
Excluding specific days or times can help avoid trading during periods of low liquidity or high unpredictability, such as major news events or holidays.
Increased Flexibility: The filter provides increased flexibility, allowing traders to adapt the strategy to their specific needs and preferences.
Example - Day filter | Session Filter
θ: Session time | Exchange time-zone
-----
What tables are available in this script?
Table Type:
- Summary: Provides a general overview, displaying key performance parameters such as Net Profit, Profit Factor, Max Drawdown, Average Trade, Closed Trades, Compound Annual Growth Rate (CAGR), MAR and more.
CAGR: It calculates the 'Compound Annual Growth Rate' first and last taken trades on your chart. The CAGR is a notional, annualized growth rate that assumes all profits are reinvested. It only takes into account the prices of the two end points — not drawdowns, so it does not calculate risk. It can be used as a yardstick to compare the performance of two strategies. Since it annualizes values, it requires a minimum 4H timeframe to display the CAGR value. annualizing returns over smaller periods of times doesn't produce very meaningful figures.
MAR: Measure of return adjusted for risk: CAGR divided by Max Drawdown. Indicates how comfortable the system might be to trade. Higher than 0.5 is ideal, 1.0 and above is very good, and anything above 3.0 should be considered suspicious and you need to make sure the total number of trades are high enough by running a Deep Backtest in strategy tester. (available for TradingView Premium users.)
Avg Trade: The sum of money gained or lost by the average trade generated by a strategy. Calculated by dividing the Net Profit by the overall number of closed trades. An important value since it must be large enough to cover the commission and slippage costs of trading the strategy and still bring a profit.
MaxDD: Displays the largest drawdown of losses, i.e., the maximum possible loss that the strategy could have incurred among all of the trades it has made. This value is calculated separately for every bar that the strategy spends with an open position.
Profit Factor: The amount of money a trading strategy made for every unit of money it lost (in the selected currency). This value is calculated by dividing gross profits by gross losses.
Avg RR: This is calculated by dividing the average winning trade by the average losing trade. This field is not a very meaningful value by itself because it does not take into account the ratio of the number of winning vs losing trades, and strategies can have different approaches to profitability. A strategy may trade at every possibility in order to capture many small profits, yet have an average losing trade greater than the average winning trade. The higher this value is, the better, but it should be considered together with the percentage of winning trades and the net profit.
Winrate: The percentage of winning trades generated by a strategy. Calculated by dividing the number of winning trades by the total number of closed trades generated by a strategy. Percent profitable is not a very reliable measure by itself. A strategy could have many small winning trades, making the percent profitable high with a small average winning trade, or a few big winning trades accounting for a low percent profitable and a big average winning trade. Most trend-following successful strategies have a percent profitability of 15-40% but are profitable due to risk management control.
BE Trades: Number of break-even trades, excluding commission/slippage.
Losing Trades: The total number of losing trades generated by the strategy.
Winning Trades: The total number of winning trades generated by the strategy.
Total Trades: Total number of taken traders visible your charts.
Net Profit: The overall profit or loss (in the selected currency) achieved by the trading strategy in the test period. The value is the sum of all values from the Profit column (on the List of Trades tab), taking into account the sign.
- Monthly: Displays performance data on a month-by-month basis, allowing users to analyze performance trends over each month.
- Weekly: Displays performance data on a week-by-week basis, helping users to understand weekly performance variations.
- OFF: Hides the performance table.
Labels:
- OFF: Hides labels in the performance table.
- PnL: Shows the profit and loss of each trade individually, providing detailed insights into the performance of each trade.
- Range: Shows the range length and Average Day Range (ADR), offering additional context about market conditions during each trade.
Profit Color:
- Allows users to set the color for representing profit in the performance table, helping to quickly distinguish profitable periods.
Loss Color:
- Allows users to set the color for representing loss in the performance table, helping to quickly identify loss-making periods.
These customizable tables provide traders with flexible and detailed performance analysis, aiding in better strategy evaluation and optimization.
-----
User-input styles and customizations:
To facilitate studying historical data, all conditions and rules can be applied to your charts. By plotting background colors on your charts, you'll be able to identify what worked and what didn't in certain market conditions.
Please note that all background colors in the style are disabled by default to enhance visualization.
-----
How to Use This Algobuilder to Create a Profitable Edge and System:
Choose Your Strategy mode:
- Decide whether you are creating an investing strategy or a trading strategy.
Select a Market:
- Choose a one-sided market such as stocks, indices, or cryptocurrencies.
Historical Data:
- Ensure the historical data covers at least 10 years of price action for robust backtesting.
Timeframe Selection:
- Choose the timeframe you are comfortable trading with. It is strongly recommended to use a timeframe above 15 minutes to minimize the impact of commissions on your profits.
Set Commission and Slippage:
- Properly set the commission and slippage in the strategy properties according to your broker or prop firm specifications.
Parameter Optimization:
- Use trial and error to test different parameters until you find the performance results you are looking for in the summary table or, preferably, through deep backtesting using the strategy tester.
Trade Count:
- Ensure the number of trades is 100 or more; the higher, the better for statistical significance.
Positive Average Trade:
- Make sure the average trade value is above zero.
(An important value since it must be large enough to cover the commission and slippage costs of trading the strategy and still bring a profit.)
Performance Metrics:
- Look for a high profit factor, MAR (Mar Ratio), CAGR (Compound Annual Growth Rate), and net profit with minimum drawdown. Ideally, aim for a drawdown under 20-30%, depending on your risk tolerance.
Refinement and Optimization:
- Try out different markets and timeframes.
- Continue working on refining your edge using the available filters and components to further optimize your strategy.
Automation:
- Once you’re confident in your strategy, you can use the automation section to connect the algorithm to your broker or prop firm.
- Trade a fully automated and backtested trading strategy, allowing for hands-free execution and management.
-----
What makes this strategy original?
1. Incorporating direct integration of probabilities into the strategy.
2. Leveraging market sentiment to construct a profitable approach.
3. Utilizing built-in market structure-based trailing stop-loss mechanisms across various timeframes.
4. Offering both investing and trading strategies, facilitating optimization from different perspectives.
5. Automation for efficient execution.
6. Providing a summary table for instant access to key parameters of the strategy.
-----
How to use automation?
For Traders:
1. Ensure the strategy parameters are properly set based on your optimized parameters.
2. Enter your PineConnector License ID in the designated field.
3. Specify the desired risk level.
4. Provide the Metatrader symbol.
5. Check for chart updates to ensure the automation table appears on the top right corner, displaying your License ID, risk, and symbol.
6. Set up an alert with the strategy selected as Condition and the Message as {{strategy.order.alert_message}}.
7. Activate the Webhook URL in the Notifications section, setting it as the official PineConnector webhook address.
8. Double-check all settings on PineConnector to ensure the connection is successful.
9. Create the alert for entry/exit automation.
For Investors:
1. Ensure the strategy parameters are properly set based on your optimized parameters.
2. Choose "Investing" in the user-input settings.
3. Create an alert with a specified name.
4. Customize the notifications tab to receive alerts via email.
5. Buying/selling alerts will be triggered instantly upon entry or exit order execution.
----
Strategy Properties
This script backtest is done on 4H COINBASE:BTCUSD , using the following backtesting properties:
Balance: $5000
Order Size: 10% of the equity
Risk % per trade: 1%
Commission: 0.04% (Default commission percentage according to TradingView competitions rules)
Slippage: 75 ticks
Pyramiding: 2
-----
Terms and Conditions | Disclaimer
Our charting tools are provided for informational and educational purposes only and should not be construed as financial, investment, or trading advice. They are not intended to forecast market movements or offer specific recommendations. Users should understand that past performance does not guarantee future results and should not base financial decisions solely on historical data.
Built-in components, features, and functionalities of our charting tools are the intellectual property of @Fractalyst Unauthorized use, reproduction, or distribution of these proprietary elements is prohibited.
By continuing to use our charting tools, the user acknowledges and accepts the Terms and Conditions outlined in this legal disclaimer and agrees to respect our intellectual property rights and comply with all applicable laws and regulations.
Easy Strategy BuilderHello, I focused on making this indicator as user-friendly as possible while designing it. I avoided complex structures, and as a result, I believe I have created an indicator that everyone can easily use.
With the Strategy Builder indicator, you can automate the strategy you use and visualize signals on the chart. This allows you to scale your strategy and stay informed of new signals through alerts.
How it works?
Firstly, we need to determine the entry condition for the trade. For this, you have 15 different sources at your disposal.
1. Price
2. RSI
3. RSI MA
4. CCI
5. STOCH K
6. STOCH D
7. MA 1
8. MA 2
9. ATR
10. DMI+
11. DMI-
12. SUPERTREND
13. BB Lower
14. BB Middle
15. BB Upper
Using the relationship between these sources or with a key level, we can generate signals. There are 7 different conditions available to control this relationship.
1. > x is greater than y
2. > = x is greater than or equal to y
3. < x is less than y
4. ≤ x is less than or equal to y
5. = x is equal to y
6. Cross Up = x has crossed above y. One bar ago, x was less than y, now x is greater than y.
7. Cross Down = x has crossed below y. One bar ago, x was greater than y, now x is less than y.
Let’s make a few examples
1.
- Entry Condition: RSI crosses above RSI moving average.
- Exit Condition: RSI crosses below RSI moving average.
Let's use more than one condition together
2.
Entry Condition: rsi<30 ve rsi cross up rsi Ma
Exit Condition: Rsi>70 ve rsi cross down rsi Ma
Let's strengthen the signal by adding different indicators and price.
3.
Entry Condition: rsi<30 and price70 and price> bb middle and rsi cross down rsi ma
What if things go wrong? Let's add stop loss
4.
Entry Condition: rsi<30 and price70 and price> bb higher and rsi cross down rsi ma
Stoploss: %2
That's how simple it is to create a strategy. Need a more complex strategy? Feel free to contact me.
Important notes:
1. Avoid continuously triggered conditions.
Example:
Entry Condition: RSI > 0
2. Determine logical entry and exit conditions.
3. Avoid placing stop losses too close to entry points.
FreedX Backtest█ Our strategy template empowers TradingView users to effortlessly backtest any indicator, enhancing their trading strategy's effectiveness. In addition, users can create automated webhook alerts from the template. This document details our template's features and how to utilize them effectively.
█ TRADE DATE SETTINGS
The Trading Date Settings feature in our TradingView script allows you to refine their backtesting parameters by specifying trading dates and hours. This feature enhances the accuracy of the backtest by aligning it with specific time frames and days, ensuring that the strategy is tested under relevant market conditions.
Features:
⚙️ Enable Trading Between Specific Dates:
🎯 Purpose:
→ Allows you to limit the backtesting of their strategy to a specific date range.
💡 How to Use:
→ Input the Start Date and End Date for the backtest period.
→ The script will execute the strategy only within this specified date range.
⚙️ Enable Trading Between Specific Hours:
🎯 Purpose:
→ Allows you to limit the backtesting of their strategy to a specific hour range.
💡 How to Use:
→ Input the start and end hour for in Trading Session section.
→ The script will execute the strategy only within this specified hour range.
⚙️ Enable Trading on Specified Days of the Week:
🎯 Purpose:
→ Gives you the option to conduct backtesting on selected days of the week, tailoring the strategy to particular market behaviours that may occur on these days.
💡 How to Use:
→ Select the days of the week for the backtest.
→ The script will activate the trading strategy only on these chosen days.
█ BUY/SELL TRIGGER SETTINGS
The Buy/Sell Trigger Settings feature is designed to provide users with flexibility in defining the conditions for 'LONG' and 'SHORT' signals based on various indicator types. This customization is crucial for tailoring strategies to different trading styles and market conditions.
Features:
⚙️ Single-Line Plotted Indicators :
🎯 Purpose:
→ Enables you to select a single-line plotted indicator as a source for backtesting. You can define specific levels to trigger 'LONG' or 'SHORT' signals.
💡 How to Use:
→ Choose a Single-Line Plotted indicator as the source.
→ Set the top and bottom levels for the indicator.
→ The script triggers 'LONG' signals at the bottom level and 'SHORT' signals at the top level.
⚙️ Two-Line Plotted Indicators :
🎯 Purpose:
→ Allows backtesting with two-line cross plot sources. Signals are generated based on the crossover of these lines.
💡 How to Use:
→ Select two lines as 'Source 1' and 'Source 2' for the indicator.
→ The script triggers a 'LONG' signal when 'Source 1' crosses above 'Source 2'.
→ Conversely, a 'SHORT' signal is triggered when 'Source 2' crosses above 'Source 1'.
⚙️ Custom Signals :
🎯 Purpose:
→ This setting enables users to define their own criteria for LONG, SHORT, and CLOSE signals based on custom indicator outputs.
💡 How to Use:
→ Select the custom source for your signals.
→ Define the output values that correspond to each signal type (e.g., “1” for 'LONG', “-1” for SHORT, and “0” for CLOSE).
→ The script will trigger signals according to these custom-defined values.
█ TP/SL SETTINGS
The TP/SL (Take Profit/Stop Loss) Settings feature is designed to give users control over their profit securing and risk mitigation strategies. This feature allows for setting custom TP and SL levels, which can be critical in managing trades effectively.
Features:
Custom TP/SL Levels for Long/Short Signals:
🎯 Purpose:
→ Enables users to set specific percentage levels for Take Profit and Stop Loss on long and short signals.
💡 How to Use:
→ In the TP/SL Settings, input the desired percentage for Take Profit (TP) and Stop Loss (SL).
→ For example, to secure a profit at a 10% price increase on LONG signals, set the “Long TP Percentage” to “10”.
█ STRATEGY SETTINGS
Strategy Settings provide a range of options to customize the trading strategy. These settings include leverage, drawdown limits, position direction changes, and more, allowing users to tailor their strategy to their risk tolerance and market view.
Features:
⚙️ Enable Leverage :
🎯 Purpose:
→ Allows users to apply leverage to their trades.
☢️ Caution:
→ High leverage can significantly increase the risk of liquidation.
→ High leverage and a high stop-loss price may override your fixed stoploss percentage, adjusting the stop-loss to the liquidation price.
💡 How to Use:
→ Set the desired leverage ratio in the Strategy Settings.
⚙️ Enable Drawdown Limit:
🎯 Purpose:
→ Sets a maximum drawdown limit, automatically halting the strategy if this limit is reached, thereby controlling risk.
💡 How to Use:
→ Input the maximum drawdown limit (default: 100, min: 0, max: 100).
⚙️ Enable Reverse Position:
🎯 Purpose:
→ Automatically closes a current position and opens a new one in the opposite direction upon detecting a signal for a market trend change.
🎯 Example:
→ If a LONG signal is received while in a SHORT position, the script will close the SHORT position and open a LONG position.
💡 How to Use:
→ Activate this feature in the Strategy Settings.
⚙️ Enable Spot Mode:
🎯 Purpose:
→ Disables short orders, using short signals only for closing long positions.
💡 How to Use:
→ Select the 'Spot Mode' option in the Strategy Settings.
⚙️ Enable Invert Signals:
🎯 Purpose:
→ Inverts all indicator signals, changing LONG signals to SHORT and vice versa.
💡 How to Use:
→ Opt for the 'Invert Signals' feature in the Strategy Settings.
⚙️ Enable Trailing Stop:
🎯 Purpose:
→ Triggers a trailing stop order on the exchange instead of a standard stop market order.
☢️ Caution:
→ The backtesting of this feature on TradingView may not accurately reflect actual strategy performance due to discrepancies between TradingView and exchange mechanisms.
💡 How to Use:
→ Select 'Trailing Stop' in the Strategy Settings.
█ ADVANCED STRATEGY SETTINGS
Advanced Strategy Settings offer sophisticated methods for managing Stop Loss (SL) and Take Profit (TP) using the Average True Range (ATR). These settings are ideal for traders who want to incorporate volatility into their exit strategies.
Features:
⚙️ Enable ATR Stop Loss:
🎯 Purpose:
→ Automatically sets the Stop Loss price using the Average True Range at the time of entry.
💡 How to Use:
→ Activate 'ATR Stop Loss' to have the SL price calculated based on the current ATR.
⚙️ Enable ATR Take Profit:
🎯 Purpose:
→ Sets the Take Profit price based on the Average True Range at the time of entry.
💡 How to Use:
→ Choose 'ATR Take Profit' for TP price determination using ATR.
⚙️ Enable ATR Trailing Stop:
🎯 Purpose:
→ Dynamically updates the Stop Loss price with each new bar, according to the Average True Range.
💡 How to Use:
→ Activate 'ATR Trailing Stop'.
→ Set the ATR Period to define the number of bars for ATR calculation.
→ Adjust the ATR SL Multiplier to determine the stop loss distance.
→ Modify the ATR TP Multiplier for setting the take profit distance.
█ TREND FILTERING SETTINGS
Trend Filtering Settings are designed to align trading strategies with the prevailing market trend, enhancing the precision of trade entries and exits. These settings utilize moving averages for trend analysis and decision-making.
Features:
⚙️ Enable Trend Filtering:
🎯 Purpose:
→ Limits trades based on moving average trends, blocking short trades in an uptrend and vice versa.
💡 How to Use:
→ Enable 'Trend Filtering'.
→ Set Fast and Slow MA Lengths for trend analysis.
→ Select the Timeframe for moving averages.
→ Choose the Moving Average Type for trend filtering.
🎯 Note:
→ Be cautious with timeframe selections; lower timeframes than the base may cause inconsistencies.
⚙️ Enable Exit on Trend Reversal:
🎯 Purpose:
→ Automatically closes a position when a market trend reversal is detected.
💡 How to Use:
→ Turn on 'Exit on Trend Reversal' in the settings.
⚙️ Enable Trend Drawing On Chart:
🎯 Purpose:
→ Visually represents the trend filter directly on the chart for easy reference.
💡 How to Use:
→ Activate 'Trend Drawing On Chart' to see the trend filter overlaid on the trading chart.
█ AUTOMATED ALERT SETTINGS
Automated Alert Settings are designed to integrate your TradingView script with webhook alerts. These settings allow for enhanced strategy execution and management.
Features:
Enable Webhook Alerts:
🎯 Purpose:
→ Trigger BUY, SELL, CHANGE_DIRECTION or MOVE_STOP_LOSS .
💡 How to Use:
→ Enable 'Webhook Alerts' in the settings.
→ Enter your Strategy ID.
→ Optionally, activate 'Override Allocation Percentage' to bypass the preset allocation percentage.
☢️ Caution:
→ Overriding the allocation percentage may result in trade entry errors due to misalignment between entry cost and available balance.
█ DEBUGGING SETTINGS
Debugging Settings are crucial for users who want to analyze and optimize their strategies. These settings provide tools for visualizing alerts on charts and accessing detailed data outputs.
Features:
⚙️ Enable Alert Plotting:
🎯 Purpose:
→ Allows users to visualize trading alerts directly on the chart, aiding in strategy analysis and refinement.
💡 How to Use:
→ Activate 'Alert Plotting' to draw alerts on the chart.
☢️ Caution:
→ It is recommended to disable this feature when creating actual trading alerts, as it can cause latency in signal processing.
⚙️ Enable Debugger Mode:
🎯 Purpose:
→ Facilitates strategy debugging by providing detailed data output in the TradingView Data Window.
💡 How to Use:
→ Turn on 'Debugger Mode' to access real-time data and metrics relevant to your strategy.
█ ADDITIONAL SETTINGS
⚙️ Enable Bar Magnifier
⚙️ Enable Using standard OHLC
Trading Strategy - Follow The Plan"Trading Strategy - Follow The Plan" is a TradingView indicator specifically crafted for traders dedicated to adhering to a structured approach. It emphasizes the elimination of emotional decision-making by providing clear, actionable steps. This tool allows you to articulate and visually embed your trading strategy directly onto your charts, encompassing your entry plan, exit plan, and any additional notes crucial for maintaining focus and discipline. It's designed to aid in sustaining consistency in your trading executions, ensuring that you remain steadfastly aligned with your predetermined trading methodology.
Features
1. Entry Plan: Allows traders to outline specific criteria for market entry. This could include conditions like divergences on multiple timeframes, specific pattern recognitions, or other entry triggers. The flexibility of this section caters to various trading styles and strategies.
2. Exit Plan: Dedicated to defining exit strategies, this section can include details on profit targets, stop-loss levels, or conditions for position reversal. It serves as a constant reminder of exit strategies during active trades.
3. Notes: A customizable space for traders to jot down essential rules, observations, or reminders. This section is particularly useful for reinforcing risk management practices and maintaining focus on broader trading goals.
4. Visibility Controls: Each section of the trading plan (Entry Plan, Exit Plan, Notes) can be toggled on or off, allowing traders to manage on-screen information and reduce chart clutter.
5. Layout Customization: Users can choose the placement of the trading plan on their chart, with options including Top Right, Top Left, Bottom Right, and Bottom Left. This caters to individual preferences and screen setups.
6. Appearance Customization: The indicator allows for adjustments in text and background colors, and text sizes for titles and content, enhancing readability and personal preference alignment.
DIY Custom Strategy Builder [ZP] - v1DISCLAIMER:
This indicator as my first ever Tradingview indicator, has been developed for my personal trading analysis, consolidating various powerful indicators that I frequently use. A number of the embedded indicators within this tool are the creations of esteemed Pine Script developers from the TradingView community. In recognition of their contributions, the names of these developers will be prominently displayed alongside the respective indicator names. My selection of these indicators is rooted in my own experience and reflects those that have proven most effective for me. Please note that the past performance of any trading system or methodology is not necessarily indicative of future results. Always conduct your own research and due diligence before using any indicator or tool.
===========================================================================
Introducing the ultimate all-in-one DIY strategy builder indicator, With over 30+ famous indicators (some with custom configuration/settings) indicators included, you now have the power to mix and match to create your own custom strategy for shorter time or longer time frames depending on your trading style. Say goodbye to cluttered charts and manual/visual confirmation of multiple indicators and hello to endless possibilities with this indicator.
What it does
==================
This indicator basically help users to do 2 things:
1) Strategy Builder
With more than 30 indicators available, you can select any combination you prefer and the indicator will generate buy and sell signals accordingly. Alternative to the time-consuming process of manually confirming signals from multiple indicators! This indicator streamlines the process by automatically printing buy and sell signals based on your chosen combination of indicators. No more staring at the screen for hours on end, simply set up alerts and let the indicator do the work for you.
Available indicators that you can choose to build your strategy, are coded to seamlessly print the BUY and SELL signal upon confirmation of all selected indicators:
EMA Filter
2 EMA Cross
3 EMA Cross
Range Filter (Guikroth)
SuperTrend
Ichimoku Cloud
SuperIchi (LuxAlgo)
B-Xtrender (QuantTherapy)
Bull Bear Power Trend (Dreadblitz)
VWAP
BB Oscillator (Veryfid)
Trend Meter (Lij_MC)
Chandelier Exit (Everget)
CCI
Awesome Oscillator
DMI ( Adx )
Parabolic SAR
Waddah Attar Explosion (Shayankm)
Volatility Oscillator (Veryfid)
Damiani Volatility ( DV ) (RichardoSantos)
Stochastic
RSI
MACD
SSL Channel (ErwinBeckers)
Schaff Trend Cycle ( STC ) (LazyBear)
Chaikin Money Flow
Volume
Wolfpack Id (Darrellfischer1)
QQE Mod (Mihkhel00)
Hull Suite (Insilico)
Vortex Indicator
2) Overlay Indicators
Access the full potential of this indicator using the SWITCH BOARD section! Here, you have the ability to turn on and plot up to 14 of the included indicators on your chart. Simply select from the following options:
EMA
Support/Resistance (HeWhoMustNotBeNamed)
Supply/ Demand Zone ( SMC ) (Pmgjiv)
Parabolic SAR
Ichimoku Cloud
Superichi (LuxAlgo)
SuperTrend
Range Filter (Guikroth)
Average True Range (ATR)
VWAP
Schaff Trend Cycle ( STC ) (LazyBear)
PVSRA (TradersReality)
Liquidity Zone/Vector Candle Zone (TradersReality)
Market Sessions (Aurocks_AIF)
How it does it
==================
To explain how this indictor generate signal or does what it does, its best to put in points.
I have coded the strategy for each of the indicator, for some of the indicator you will see the option to choose strategy variation, these variants are either famous among the traders or its the ones I found more accurate based on my usage. By coding the strategy I will have the BUY and SELL signal generated by each indicator in the backend.
Next, the indicator will identify your selected LEADING INDICATOR and the CONFIRMATION INDICATOR(s).
On each candle close, the indicator will check if the selected LEADING INDICATOR generates signal (long or short).
Once the leading indicator generates the signal, then the indicator will scan each of the selected CONFIRMATION INDICATORS on candle close to check if any of the CONFIRMATION INDICATOR generated signal (long or short).
Until this point, all the process is happening in the backend, the indicator will print LONG or SHORT signal on the chart ONLY if LEADING INDICATOR and all the selected CONFIRMATION INDICATORS generates signal on candle close. example for long signal, the LEADING INDICATOR and all selected CONFIRMATION INDICATORS must print long signal.
The dashboard table will show your selected LEADING and CONFIRMATION INDICATORS and if LEADING or the CONFIRMATION INDICATORS have generated signal. Signal generated by LEADING and CONFIRMATION indicator whether long or short, is indicated by tick icon ✔. and if any of the selected CONFIRMATION or LEADING indicator does not generate signal on candle close, it will be indicated with cross symbol ✖.
how to use this indicator
==============================
Using the indicator is pretty simple, but it depends on your goal, whether you want to use it for overlaying the available indicators or using it to build your strategy or for both.
To use for Building your strategy: Select your LEADING INDICATOR, and then select your CONFIRMATION INDICATOR(s). if on candle close all the indicators generate signal, then this indicator will print SHORT or LONG signal on the chart for your entry. There are plenty of indicators you can use to build your strategy, some indicators are best for longer time frame setups while others are responsive indicators that are best for short time frame.
To use for overlaying the indicators: Open the setting of this indicator and scroll to the SWITCHBOARD section, from there you can select which indicator you want to plot on the chart.
For each of the listed indicators, you have the flexibility to customize the settings and configurations to suit your preferences. simply open indicator setting and scroll down, you will find configuration for each of the indicators used.
I will also release the Strategy Backtester for this indicator soon.
BE - Strategy Builder ToolkitIndicator vs Toolkit:
This is definitely not an indicator, hence this doesn't do any kind of analysis nor provide meaningful outputs where you can take trading decisions out of it.
This is a Strategy Builder Toolkit which works like any other broker/3P applications, which helps traders to build their own custom/ predefined strategies, save / deploy them at their wish.
Idea Behind Developing this Toolkit: I am sure many of traders have overcome scenarios where, on break of x level he wants to initiate straddle else he wants to initiate Iron Condor. Some of them wants to deploy custom strategies only at certain time or at certian price levels.
It becomes pretty difficult to track markets when you are away from desk and if you dont adjust the strategy legs, you are incurring big drawdowns. There are many if's and buts to deploy strategies.
To overcome such challenges, i have built this toolkit.
Note: As this is just a toolkit, you should conduct your analysis to gauge the market direction outside the perview of this. Once you know the view / direction of the script. you can use this toolkit in action to
1. Deploy Strategy at (Desired levels| Desired time|Confired Levels|Confirmed Volumes)
2. Strategy can be Prebuilt / Custom Built
3.1 Set SL, Target for Directional view (Trail SL aswell)
3.2 Set Upside or Downside Target for Non Directional view (Trail SL aswell)
3.3 let the strategy play with out SL|Targets for consolidation view.
4. Adjust Legs by closing existing position and opening fresh position or place fresh adjustments
5. Book partial Profits with in the zone.
How the Toolkit is buit: Script uses text related functions to understand the custom input given in the indicator and coverts into a strategy and deployes them as a algo trading (Next Level Bot) with the additional parameter set for SL|Target|Entry levels.
Understanding the settings:
1. Strike Difference: is basically a value between each strike. eg: Banknifty : 100, Nifty & Finnifty: 50
2. 1 Lot Qty: Qty per Lot accepted by exchange|Broker. eg: BNF: 15, Nifty: 50, Finnifty: 40
3. Lot Multiplier: If you build strategy with 1 lot and if you set the Lot multiplier as 2 then strategy gets deployed with 2 lots. for eg. If i have saved strategy to buy BNF 1 ITM with 1Lot and have set lot multipier to 3 then at the time of deploying the trade it pushes as 3 lots (3 * 15Qty per lot = 45Qty) of 1 ITM strike.
4. Symbol Name: Select the Symbol Name here.
5. Current & Next Week Expiry Date: Specify the expiry Dates in the format as supported by your broker.
6. Broker Name, Exchange & Product Type: hope it is self explanatory.
IMPORTANT settings to understand:
7. Triggere Entry Post (optional): You have to specify when you want to deploy the strategy. For instance, if i want to deploy my strategy at 30 min after market open which is 9:45 am, then i have specify as 0945. Another instance where i want to close my strategy at 3 PM then you have to specify as 1500. Uncheck this option if you are not worried about the time of entry.
My personal Used Case: On the Expiry -1 Day at 0916 (9:16AM) i will buy 6 lots of 8OTM PE & CE and Sell 2 lots 7OTM, 2 lots of 6OTM and 2 lots of 5OTM and close the trade by 1100 (11AM).
8. Price Levels (Confirmed vs UnConfirmed) (Optional): Confirmed is basically price is sustained at|around the specified price level, where in UnConfirmed is basically the touch of the specified level.
for instance if i want to deploy straddle only if price is sustained at 100. then, i would specify GE with 100 in price input settings, and check thee Confirmed price box. Assuming if LTP is running at 98 and with the above settings it will only deploy the trade upon price is sustained at 100 level for 3 to 5 candles not at the touch of 100.
Uncheck this option if you are not worried about the Entry Price.
9. Confirmed Volume (Optional) (Long or Short): Basis your view|direction of the strategy. you can get additional confirmation. At the time of entry you want volume to be present towards the direction of the strategy. Uncheck this option if you are not worried about the volume or Volume doesn't exist for the chart loaded.
10. Alert Types: It consists of 3 Long & 3 Short directional (prebuilt) strategy along with Close Strategy, Close Specified Symbols Only & Design Custom Strategy Option.
10.1 : Slow Upmove - If you are having bullish view and predict that prices shall go slow and steady. This strategy can be deployed where you get the benifit of time decay as well while the delta play in favor of you. (viseversa for Slow DownMove)
10.2 : Fast Upmove - If you are having bullish view and predict that prices shall go fast. This strategy can be deployed where you get the smaller benifit of time decay as well while the delta play in favor of you. (viseversa for Fast DownMove)
10.3 : Vol Upmove (Volatality)- If you are having bullish view and predict market is tend to be volatile. This strategy can be deployed where you get the benifit of volatility as well while the delta play in favor of you. (viseversa for VolDownMove)
10.4 : Close Trade - You can use this option close the deployed strategy completely.
10.5 : Close Symbols - You can use this option close few of the symbols for the strategy deployed.
10.6 : Custom: Use this option to design you own custom strayegy with the syntax below:
Sample 1:
N|B|C2|3
N refers to Nextweek Expiry (if C is used then Current week expiry)
B refers to Buy (if S is used then Sell)
C refers to Call | CE (if P is used then PE or Put)
2 refers to 2OTM (for CE any Postitive number refers to as OTM and for PE it will be treated as ITM strikes & 0 refers to as ATM - viseversa for Negative Numbers)
3 refers to as 3 Lot
With the syntax of N|B|C2|3 - strategy will be deployed as "Buy 3 lots of 2 OTM Call of Next expiry"
Sample 2:
C|S|P-3|3|10|30
Above syntax means: SELL Current Expiry 3 Lots of 3 OTM Put Strike with 10 SL and 30 TGT
Sample 3:
C|S|C10|3|Default
Above syntax means: SELL Current Expiry 3 Lots of 10 OTM CALL Strike with 50% SL and 95% TGT
Sample 4:
C|B|C-2|3|40%|50%
Above syntax means: BUY Current Expiry 3 Lots of 2 ITM CALL Strike with 40% SL and 50% TGT
Sample 5: Long Straddle
C|B|C0|3
C|B|P0|3
Above syntax means: BUY Current Expiry 3 Lots of ATM CALL & PUT Strike
Sample 6: Iron Butterfly
C|B|C1|1
C|S|C0|1
C|S|P0|1
C|B|P-1|1
Above syntax means: Sell Current Expiry 1 Lots of ATM CALL & PUT Strike and BUY 1OTM Call & Put Strike
Sample 7: Diagonal Spread
C|S|C2|1
C|S|P-2|1
N|B|C3|1
N|B|P-3|1
Above syntax means: Sell Current Expiry 1 Lots of 2OTM CALL & PUT Strike and BUY 3OTM Call & Put Strike of Next Expiry.
To Understand how to deploy Strategy with defined Adjustments. For instance i want to deploy Iron Condor with Adjustments for BNF when the price is currently running at 45000.
C|B-|C3|1
C|S*|C2|1
C|B--|P-3|1
C|S**|P-2|1
At:2|C|S|C2|1
At:2|C|B|C3|1
At:-2|C|S|P-2|1
At:-2|C|B|P-3|1
On:2|*
On:-2|**
On:2|-
On:-2|--
With the above syntax: Intial trades are placed with
BUY BANKNIFTY45300CALL(Current Expiry) 1 Lot
BUY BANKNIFTY44700PUT(Current Expiry) 1 Lot
SELL BANKNIFTY45200CALL(Current Expiry) 1 Lot
SELL BANKNIFTY44800PUT(Current Expiry) 1 Lot
Toolkit tracks the price and holds the adjustments.
We may start to bleed on the sold leg (45200CALL) once the price crosses 45200. Hence if the price crosses 2 strike upside as specified with syntax " On:2|* " where * is a character tagged to Sold Call Leg. it closes the 45200 Call.
Similarly, " On:2|- " where - is character tagged to Brought Call Leg. it closes the 45300 Call, as soon as prices reaches 2 strike upside.
At:2|C|S|C2|1
At:2|C|B|C3|1
With the At Statements you can place the fresh adjustments legs. Above syntax refers to Once the price reaches 45200 it places below adjustment legs.
BUY BANKNIFTY45500CALL(Current Expiry) 1 Lot
SELL BANKNIFTY45400CALL(Current Expiry) 1 Lot
Note: Similarly If prices reaches downside with the On and At Sytax it places the necessary adjustment legs accordingly.
11. SL & TGT - You can specify SL, TGT or Upside & Dowside TGT during the entry conditions and Stratey shall be closed upon hitting either the SL or TGT accordingly.
12. On % Tgt & Lock % SL: This option is used for Prebuilt strategy where you can lock the Profit | Set Revised SL upon hitting specified TGT percentage.
13. Close Symbols: This option is used if you select Alert type as Close Symbols (Ref - 10.5 : Close Symbols) for specified list of symbols Alert shall be pushed to close the open positions of those symbols.
DISCLAIMER: No sharing, copying, reselling, modifying, or any other forms of use are authorized for our documents, script / strategy, and the information published with them. This informational planning script / strategy is strictly for individual use and educational purposes only. This is not financial or investment advice. Investments are always made at your own risk and are based on your personal judgement. I am not responsible for any losses you may incur. Please invest wisely.
Happy to receive suggestions and feedback in order to improve the performance of the indicator better.
EMA Cross (data chaining template)Hello Traders! This is the source code for a simple EMA Cross indicator that can be chained to other indicators or another instance of itself as a filter.
The code is fully commented to guide you in building your own chain of indicators based on your ideas and trading plans.
All the best,
Val - Protervus Trading