Bjorgum Double Tap█ OVERVIEW
Double Tap is a pattern recognition script aimed at detecting Double Tops and Double Bottoms. Double Tap can be applied to the broker emulator to observe historical results, run as a trading bot for live trade alerts in real time with entry signals, take profit, and stop orders, or to simply detect patterns.
█ CONCEPTS
How Is A Pattern Defined?
Doubles are technical formations that are both reversal patterns and breakout patterns. These formations typically have a distinctive “M” or a “W” shape with price action breaking beyond the neckline formed by the center of the pattern. They can be recognized when a pivot fails to break when tested for a second time and the retracement that follows breaks beyond the key level opposite. This can trap entrants that were playing in the direction of the prior trend. Entries are made on the breakout with a target projected beyond the neckline equal to the height of the pattern.
Pattern Recognition
Patterns are recognized through the use of zig-zag; a method of filtering price action by connecting swing highs and lows in an alternating fashion to establish trend, support and resistance, or derive shapes from price action. The script looks for the highest or lowest point in a given number of bars and updates a list with the values as they form. If the levels are exceeded, the values are updated. If the direction changes and a new significant point is made, a new point is added to the list and the process starts again. Meanwhile, we scan the list of values looking for the distinctive shape to form as previously described.
█ STRATEGY RESULTS
Back Testing
Historical back testing is the most common method to test a strategy due in part to the general ease of gathering quick results. The underlying theory is that any strategy that worked well in the past is likely to work well in the future, and conversely, any strategy that performed poorly in the past is likely to perform poorly in the future. It is easy to poke holes in this theory, however, as for one to accept it as gospel, one would have to assume that future results will match what has come to pass. The randomness of markets may see to it otherwise, so it is important to scrutinize results. Some commonly used methods are to compare to other markets or benchmarks, perform statistical analysis on the results over many iterations and on differing datasets, walk-forward testing, out-of-sample analysis, or a variety of other techniques. There are many ways to interpret the results, so it is important to do research and gain knowledge in the field prior to taking meaningful conclusions from them.
👉 In short, it would be naive to place trust in one good backtest and expect positive results to continue. For this reason, results have been omitted from this publication.
Repainting
Repainting is simply the difference in behaviour of a strategy in real time vs the results calculated on the historical dataset. The strategy, by default, will wait for confirmed signals and is thus designed to not repaint. Waiting for bar close for entires aligns results in the real time data feed to those calculated on historical bars, which contain far less data. By doing this we align the behaviour of the strategy on the 2 data types, which brings significance to the calculated results. To override this behaviour and introduce repainting one can select "Recalculate on every tick" from the properties tab. It is important to note that by doing this alerts may not align with results seen in the strategy tester when the chart is reloaded, and thus to do so is to forgo backtesting and restricts a strategy to forward testing only.
👉 It is possible to use this script as an indicator as opposed to a full strategy by disabling "Use Strategy" in the "Inputs" tab. Basic alerts for detection will be sent when patterns are detected as opposed to complex order syntax. For alerts mid-bar enable "Recalculate on every tick" , and for confirmed signals ensure it is disabled.
█ EXIT ORDERS
Limit and Stop Orders
By default, the strategy will place a stop loss at the invalidation point of the pattern. This point is beyond the pattern high in the case of Double Tops, or beneath the pattern low in the case of Double Bottoms. The target or take profit point is an equal-legs measurement, or 100% of the pattern height in the direction of the pattern bias. Both the stop and the limit level can be adjusted from the user menu as a percentage of the pattern height.
Trailing Stops
Optional from the menu is the implementation of an ATR based trailing stop. The trailing stop is designed to begin when the target projection is reached. From there, the script looks back a user-defined number of bars for the highest or lowest point +/- the ATR value. For tighter stops the user can look back a lesser number of bars, or decrease the ATR multiple. When using either Alertatron or Trading Connector, each change in the trail value will trigger an alert to update the stop order on the exchange to reflect the new trail price. This reduces latency and slippage that can occur when relying on alerts only as real exchange orders fill faster and remain in place in the event of a disruption in communication between your strategy and the exchange, which ensures a higher level of safety.
👉 It is important to note that in the case the trailing stop is enabled, limit orders are excluded from the exit criteria. Rather, the point in time that the limit value is exceeded is the point that the trail begins. As such, this method will exit by stop loss only.
█ ALERTS
Five Built-in 3rd Party Destinations
The following are five options for delivering alerts from Double Tap to live trade execution via third party API solutions or chat bots to share your trades on social media. These destinations can be selected from the input menu and alert syntax will automatically configure in alerts appropriately to manage trades.
Custom JSON
JSON, or JavaScript Object Notation, is a readable format for structuring data. It is used primarily to transmit data between a server and a web application. In regards to this script, this may be a custom intermediary web application designed to catch alerts and interface with an exchange API. The JSON message is a trade map for an application to read equipped with where its been, where its going, targets, stops, quantity; a full diagnostic of the current state and its previous state. A web application could be configured to follow the messages sent in this format and conduct trades in sync with alerts running on the TV server.
Below is an example of a rendered JSON alert:
{
"passphrase": "1234",
"time": "2022-05-01T17:50:05Z",
"ticker": "ETHUSDTPERP",
"plot": {
"stop_price": 2600.15,
"limit_price": 3100.45
},
"strategy": {
"position_size": 0.1,
"order_action": "buy",
"market_position": "long",
"market_position_size": 0,
"prev_market_position": "flat",
"prev_market_position_size": 0
}
}
Trading Connector
Trading Connector is a third party fully autonomous Chrome extension designed to catch alert webhooks from TradingView and interface with MT4/MT5 to execute live trades from your machine. Alerts to Trading Connector are simple; just select the destination from the input drop down menu, set your ticker in the "TC Ticker" box in the "Alert Strings" section and enter your URL in the alert window when configuring your alert.
Alertatron
Alertatron is an automated algo platform for cryptocurrency trading that is designed to automate your trading strategies. Although the platform is currently restricted to crypto, it offers a versatile interface with high flexibility syntax for complex market orders and conditions. To direct alerts to Alertatron, select the platform from the 3rd party drop down, configure your API key in the ”Alertatron Key” box and add your URL in the alert message box when making alerts.
3 Commas
3 Commas is an easy and quick to use click-and-go third party crypto API solution. Alerts are simple without overly complex syntax. Messages are simply pasted into alerts and executed as alerts are triggered. There are 4 boxes at the bottom of the "Inputs" tab where the appropriate messages to be placed. These messages can be copied from 3 Commas after the bots are set up and pasted directly into the settings menu. Remember to select 3 Commas as a destination from the third party drop down and place the appropriate URL in the alert message window.
Discord
Some may wish to share their trades with their friends in a Discord chat via webhook chat bot. Messages are configured to notify of the pattern type with targets and stop values. A bot can be configured through the integration menu in a Discord chat to which you have appropriate access. Select Discord from the 3rd party drop down menu and place your chat bot URL in the alert message window when configuring alerts.
👉 For further information regarding alert setup, refer to the platform specific instructions given by the chosen third party provider.
█ IMPORTANT NOTES
Setting Alerts
For alert messages to be properly delivered on order fills it is necessary to place the following placeholder in the alert message box when creating an alert.
{{strategy.order.alert_message}}
This placeholder will auto-populate the alert message with the appropriate syntax that is designated for the 3rd party selected in the user menu.
Order Sizing and Commissions
The values that are sent in alert messages are populated from live metrics calculated by the strategy. This means that the actual values in the "Properties" tab are used and must be set by the user. The initial capital, order size, commission, etc. are all used in the calculations, so it is important to set these prior to executing live trades. Be sure to set the commission to the values used by the exchange as well.
👉 It is important to understand that the calculations on the account size take place from the beginning of the price history of the strategy. This means that if historical results have inflated or depleted the account size from the beginning of trade history until now, the values sent in alerts will reflect the calculated size based on the inputs in the "Properties" tab. To start fresh, the user must set the date in the "Inputs" tab to the current date as to remove trades from the trade history. Failure to follow this instruction can result in an unexpected order size being sent in the alert.
█ FOR PINECODERS
• With the recent introduction of matrices in Pine, the script utilizes a matrix to track pivot points with the bars they occurred on, while tracking if that pivot has been traded against to prevent duplicate detections after a trade is exited.
• Alert messages are populated with placeholders ; capability that previously was only possible in alertcondition() , but has recently been extended to `strategy.*()` functions for use in the `alert_message` argument. This allows delivery of live trade values to populate in strategy alert messages.
• New arguments have been added to strategy.exit() , which allow differentiated messages to be sent based on whether the exit occurred at the stop or the limit. The new arguments used in this script are `alert_profit` and `alert_loss` to send messages to Discord
Algo
New York Happy HourNew York Happy Hour
Script inspired by Stacey Burke’s 'Trading New York Open 1 Hour a Day'. You know where to search. The algos run on New York time. You’ll be looking to trade from 9.30 AM NY EST using a full day of trading data behind you.
Instruments:
- Gold, major currency pairs, indexes, metals and crypto
Timing: 15 Min
Best Trade Setups:
- 3 Levels (HOD/LOD)
- Trend Trades
- Reversal Trades
- Trading Range
- Or what you see best fit
Script Breakdown:
Sessions:
Asia: 8-11 PM
London: 2-5 AM
New York: 8-11 AM
Other lines:
New York Midnight Open
New York Open
London and NY vertical lines
Previous daily and weekly high and low
ProWaves - [Soldi]ProWaves
Introducing the latest and greatest tool in the DynaPro Trading Tools! ProWaves is a multi timeframe precision trend tool to help traders identify the waves of the market and trade the convergence, exhaustion points, continuation points of multiple timeframes.
By default you will have a 15m, 1h and 2h Wave on your indicator - this is completely customizable by the user! You can choose up to 3 higher timeframes to display the underlaying wave trend.
How Do I Enter Trades?
To bring ProWaves into a full trading system someone could easily use we have to make a trade trigger system for potential entries - an original and unique Trend Bar system to easily signal a trader that there is an entry present. These trend bars use 2 sensitive weighted moving averages based off the HL2 of the candle, we offset them to create a ribbon like effect to help eliminate any false signals
Include this in your own trading strategy or compile it with DynaPro's other institutional caliber tools!
To use ProWaves effectively you will want to understand wave theory first
This indicator is based off the idea of Elliot wave and fractal cycles of the market, to really understand what this indicator is reading you will need to understand what Elliot Wave is along with fractal cycles in the markets.
What Are The Waves Based On
The waves are primarily a Correlation function to make an oscillated value of "trend", by doing so and measuring this across multiple timeframes we are able to gain a sense of clarity on the tops and bottoms of the markets as well as the trends that take place in between!
NOTE
When the Waves are above/below - 0.5/-0.5 then the wave is in an area of significance for either a reversal or to influence a trend - couple this with the precision of the Trend Bars system then you have a great trading system!
Wizard AlgoWizard Algo:
==============================
Features of the indicator:
- BULL/BEAR Signals
- TP (Take-Profit) and Exit System
- Possible Reversal Signals
- Reversal Scalper
- Reversal Bands
- Trend Bar Colors
- Auto Support/Resistance Levels
- Auto Trend-Lines
================================
Description:
1. Signals: The signals consists of 2 different approaches and the users can choose which signal type they want to use. The indicator gives bull/bear signals based on certain condition, such as trend and momentum. The "TP" signals stands for "Take Profit." These signals help users to decide when to take profits or liquidate all position. The Indicator includes an exit system that can used as another means of closing a position. The exit system uses a 1.5x risk to reward ratio to determine where to keep the take profit and stop loss target.
2.Reversal Scalper: Reversal scalpers are the tiny up(aqua) and down(fuchsia) triangles on the chart. These signals a possible reversal in the price and they can be used to enter a scalping trade. The signals uses mainly momentum and candle price action to determine when there could be a possible reversal in price.
3. Reversal Bands: The reversal band is the green/red cloud like indicator. This can help determine when a price is oversold and therefore, it could reverse. Same goes for the short side, if price is in the overbought territory, then it could reverse to the downside. The reversal bands uses mainly volatility. This is not the same thing as Bollinger bands.
4. Bar Colors: The candle bar colors helps to determine the current trend. The colors are given based on the current trend. The colors lime/red shows strong trend, and orange/cyan/blue shows weak trend.
5. Auto S/R and Auto trendlines: These indicators can be used for determining price actions. Both of these work in similar manner. They mainly look at the previous pivots and draws a line connecting the pivots. S/R are the horizontal lines and the trendline have angles to them.
SIVE 1.0 [Soldi]SIVE 1.0
What is SIVE?
SIVE stands for Systematic Institutional Volatility Expansion, SIVE uses a variety of different statistical indicators to gauge volatility along with trend correlation and other measures to filter and define a price move. This system was originally set out to redefine what a 'Trend Following System' could be; we achieved more than just that. We had created what is considered to be one of the first retail quantitative trading system, that incorporates trend following mechanics as well as trend reversal techniques. All while being aligned/correlated to trend and volatility . Something truly powerful to put into the hands of the every day trader, demystifying what quant trading can be while easily presenting it in a way where even your mom could learn how to use the system without being overwhelmed.
What makes this different from any other trading system?
SIVE raises the bar on what traditional indicators and trading systems can do, traditionally you have lagging indicators that only tell you what happened in the past with no correlation to the market or what can happen in the future. Really providing little to no statistical value, yet completely idolized by the retail world. Where SIVE exceeds these systems is all in the math and the application of those formulas to the time/price, finding the synchronicities to exploit for profits as well as exploiting the high probabilities of non-random events. How we do it? well that's in the secret crabby patty formula.
Where we are now, and where we plan to go
SIVE as it stands right now is the very first iteration of the retail quantitative trading system, it is performing exceptionally well but we aren't take that as our standard as we want to always raise the bar. as it stands, we are already working on the updates to come that will dwarf anything we've done in the past.
Our goal with SIVE is to be able to provide an easy to learn and easy to profit trading system that will provide the retail public with a trust worthy system to use. In the future our updates will carry heavier weight on key aspects like Risk to Reward, Win rates and capturing those big parabolic movements that everyone dreams of. Far fetched? for the traditional indicator junkies, but for a Quant it is just a matter of time.
What does it perform best on?
Simply put, yes... We set out to create this to be used for any trading instrument and any timeframe. Intraday timeframes have been shown to give more trades and typically higher reward trades as your able to execute with a high degree of accuracy 1:2 is very modest and can easily be achieved but we have also seen so so many trades run higher than 1:10 and even 1:20!! but as you already may know the market doesn't always give those favorable conditions to trade that high of a Risk to Reward all the time.
Stocks, Crypto, Forex, Metals, Energies, Indices, etc. are all tradeable with SIVE
mrDAlgo PremiumBUY / LONG when the Trend Catcher Trend Line cuts upwards and the candle will be green, and the cut candle is above the blue clouds.
SELL / SHORT when the Trend Catcher Trend Line crosses downwards and then the candle cluster will be red, and the prices are below the red clouds.
Moving averages help assess the main trend:
- The price is completely below the moving averages, showing that the downtrend is happening.
- The price is completely above the moving averages indicating an ongoing uptrend.
- The price completely crosses the moving averages showing a sideways trend.
Setting:
A sensitivity setting is recommended for trend confirmation signals.
Show/hide trend catcher
Show/Hide Moving Averages
Alerts: Warn when the signals confirm the trend.
Candle color mode:
Green candle: Strong buy.
Red candle: Strong selling is active.
Purple Candle: Normal buy or sell signal is active.
EQ Cloud: When enabled, a simple "cloud"-like indicator will be displayed on your chart.
The EQ Cloud has a similar effect to the Ichimoku Cloud and can identify the current trend and act as to subsequent support and resistance.
This toolkit is made up of different tools all in one indicator to create your own unique trading strategies.
General disclaimer:
Trading stocks, futures, forex, options, ETFs, cryptocurrency, or any other financial instrument has huge potential rewards but also huge risks.
You must be aware of the risks and willing to accept them to invest in stocks, futures, forex, options, ETFs, or cryptocurrencies.
Don't trade with money you can't afford to lose.
This is not an offer or an offer to Buy/Sell stocks, futures, Forex, options, ETFs, cryptocurrencies, or any other financial instrument.
Do not represent that any account will or is likely to achieve profit or loss of any kind.
Past performance of any trading system or method is not necessarily indicative of future results.
Unicorn Quant Strategy [Astride Unicorn]Deeply customizable trading algorithm with instant back-testing. Its position management and trading signals engines emulate every step of the trading process and display all the actions on the chart. For example, the algorithm shows when to enter or partially close a position, move stop-loss to breakeven, etc. The trader can use these signals in their decision-making and replicate these actions in their trading terminal. The script can also send real-time alerts to the user’s Email.
The trading signals feature calculates entry signals for momentum and trend trading. The calculation is based on trend filtering using our custom filter based on rolling historical volatility. The historical volatility is used to distinguish the market regime and determine the current trend direction. In its calculations, the algorithm uses linear regressions instead of averaging. As our practice shows, it helps to reduce signal lag while keeping the number of false signals low.
HOW TO USE
Set stop-loss and up to three take-profit levels, choose rules for moving the stop-loss level, adjust sensitivity of the entry signals and see the back-test result immediately. If the performance of the strategy satisfies you, proceed with the forward-testing or live-trading.
When using this script, please, keep in mind that past results do not necessarily reflect future results and that many factors influence trading results.
SETTINGS
Use Starting Date - when the flag is turned off, the algorithm uses all available pricing data to calculate back-tests; when turned on, back-tests start from a starting date the user can select in the setting below.
Starting Date - sets a starting date for back-testing.
Trading Signals
Trade Length - defines the length of the trades the algorithm tries to calculate entry signals for. Recommended values are from 1.0 to 6.0.
Sensitivity - controls the sensitivity of the trading signals algorithm. The sensitivity determines the density of trading signals and how close the trailing-stop levels follow the price. The higher the value of this parameter is, the less sensitive the algorithm is. High values of the Sensitivity parameters (100-500) can help to withstand large price swings to stay in longer price moves. Lower values (10-100) work well for short- and medium-term trades.
Signals Type - In the Signals Type dropdown list, there are two options: Market Timing and Market Bias. Market timing is a type of trading signaling when the algorithm tries to find a perfect moment to enter and exit a trade. Market Bias is the type of trading signaling when the algorithm tries to be in a position all the time. When a trade is closed, the algorithm determines a direction to which the market is currently “biased” and immediately opens a trade in this direction.
Position Management
SL - sets stop-loss level measured as a percentage of the trade entry price
TP1, TP2, TP3 - sets take-profit levels measured as a percentage of the trade entry price
Close % at TP1, Close % at TP2, Close % at TP3 - Sets portions of the open position(as a percentage of the initial order size) to close at each of the TP levels
At TP1 move SL to, At TP2 move SL to - Sets the rules for moving stop-loss level in an open trade to protect the floating profit
Dashboards
Active Position Information - turns on/off a dashboard that shows the current SL and TP levels for the active position.
Recommended SL,TP Settings - turns on/off a dashboard that shows recommended settings for the SL and TP levels.
Unreal Algo [UPRIGHT] (cc)Hello Traders,
It's finally that time, I'm releasing my baby out into the world.
Unreal Algo is the answer to the question you didn't know you were asking.
It's for beginners and advanced traders alike. I've made the settings very customizable, but also easy to just jump right in.
How it works:
It uses tons of calculations, confirmations, and filters to bring you the most accurate predictive algorithm possible. The algo will automatically adjust to different volatility in the market to still provide accurate signals and confirmation. It will automatically show support and resistance in real-time. A Moving Average cloud with speeds varying from extra fast to slow; they will help traders confirm whether they should stay in the trade. Also, I added 2 stoplosses, because the importance of risk management should always be emphasized even with strong accuracy.
Features:
---The Most Accurate Signals on the planet.
--------Buy/Sell, Up/Down direction change, and Red/Green arrows.
--- MA cloud with beautiful color blend that can act as a confirmation of direction.
-------- 17 different types/versions of moving Averages to choose from.
--------Easy line transparency and toggle adjustments.
--------Easy cloud transparency adjustments.
--- Support and Resistance .
--- Advanced PSAR that will show red when bearish while in a bullish trend, and visa-versa.
---Potential Orderblocks that can be extended to show a grid (adding additional support/resistance information).
--- Fibonacci Lines.
--- Pivot bar that changes colors based on pivot direction.
---Resistance Breakout and Support Breakdown Signals .
--- Relative volume & momentum bar coloring.
---Two Separate Stoplosses .
--------Circles change color and flip to top and red for Short, bottom and green for long.
--------Horizontal stoploss that tracks the price and flags to take profit. White for Long and Yellow for short.
---As always... Fully customizable .
Different customization options:
Without stoplosses and Support/Resistance.
Without Support/Resistance, arrows and psar removed.
Added back Support/Resistance, lightened MA cloud
Fully loaded (minus trailing stoploss)
[UPRIGHT] Awesome DMI+Hello Traders,
Today I'm releasing a spin on an 'oldie but goodie'; the Directional Movement Index (DMI).
DMI is a combination of 3 different indicators developed by the famous J. Welles Wilder. DMI has 3 different plots: the ADX, +DI, and -DI. The first is the ADX (Average Directional Index), which Wilder created in 1978 to show the strength of a trend by comparing the current price with the previous price range. The other two are the +DI (positive directional indicator) and the -DI show up as two separate lines, +DI is the difference between the highest price of the current day and the highest price of the day before, and -DI does the same calculation with the current and previous day's lows.
How does it work?
When the ADX line is above 25 (as a general rule, some traders use a different threshold, +/- 5), the trend is strong. When the +DI line is above the -DI line, the asset (stock) is moving in an uptrend, and the opposite means the asset is in a downtrend.
How is this different?
Uses multiple calculations to produce signals for an indicator than normally doesn't have any.
Multiple ADX's, +DI's, and -DI's for better accuracy and clearer direction changes.
Ability to use 2 different background highlight signals and several buy/sell signals.
Fully customizable (as always), ability to turn on or off any signals, change any of the colors to suit your needs.
Added pre-filled Alerts.
The ribbons created by the fill make it easier to see the change in direction of each plot.
The chart should look like:
Cheers,
Mike
(UPRIGHT TRADING)
[UPRIGHT Trading] MoneyFlowTrend Oscillator(cc) PremiumHey Traders,
Tonight I'm updating my beloved original MoneyFlowTrend Oscillator with a Premium version.
A little background:
This is an indicator that I've been working to bring to life for years; learning pinescript code has allowed me to do just that.
Built on the idea of Supply & Demand Zones, this utilizes money flow and numerous calculations to create a picture of what is happening underneath the surface of the price action.
Richard Wykoff was one of the first market analysts to explain how the economic cycle can be applied to explain market price action; thus, technical analysis . He described two zones among the total of 4 phases; the two zones are Distribution and Accumulation zones, also known as Supply & Demand zones.
______________________________
Since most of you already know the economic cycle, I will try to be concise.
The basic ideas:
When supply > demand, the price goes up down.
When demand > supply, price goes up.
When demand = supply, the price stays about the same (going sideways).
Price action has --Uptrends, downtrends, and price ranges (consolidation).
Wykoff's 4 phases to explain this price action :
1) Accumulation (Demand zone)
2) Markup (Uptrend)
3) Distribution (Supply zone)
4) Markdown (Downtrend)
______________________________
With all that said, usually you will either see a sharp jump from a supply or demand zone or it will consolidate within it. Until a new one is formed on the chart.
This indicator attempts to put all of that into a lower indicator. I tried to separate the retailers and the banks and then put them back together to get a full picture.
Premium:
-Even MORE (quality & quantity) Accurate signals.
-Reversal Signal added (Circle- shown on chart)
-Cleaner Scaling and Organization.
The chart shown above should look like this:
Good luck traders.
Cheers,
Mike
(UPRIGHT Trading)
Crypto Jimboo's Algo V3Hey Everyone!
This is the third published version of my algo, Crypto Jimboo's Algo! I am an amateur coder and developer learning each day. This is my attempt at utilizing price action, some market data, and moving averages to make more successful trades. So far, it has proved to be pretty useful. If you are a beginner trader and you are looking for some help on learning how to read charts and understand price action - try this out. I will continue to try to add to it and make it better with time. I have seen success on the 5m, 15m, 1hr, 2hr, 4hr, and daily timeframes to this point. I have left the option of including or not including candlestick indicators/patterns in the settings options of the Algo (it will automatically add the candlestick patterns to the chart until you go into the settings of the indicator and check whatever ones you do not want off). Additionally, I left it so that the colors on the algo can be modified to the user's liking. You can also use the alert dialogue box to set alerts to your computer, email, and phone!
Best of luck and let me know how it works, please!
I have placed my strategy and a snapshot of how my chart looks below.
5m, 15m, 1hr, 2hr, 4hr, and Daily Timeframe Strategy
• For Buy – Ensure the price action is not at the top of the Bollinger Bands (purple lines in the snapshot), the price action is trading above all EMA lines (many blue lines), and check for a green trend catcher (the centerline that turns green and red as the price fluctuates). If the above is true, open a long position.
• For Sell – Ensure the price action is not at the bottom of the Bollinger Bands, the price action is trading below all EMA lines, and check for a red trend catcher. If the above is true, open a short position.
[Fedra Algotrading Strategy Trailing Stop]Algotrading strategy optimized for cryptocurrencies. Originally conceived to trade automatically through bots (that's how I use it), it also works to get signals and trade manually in any exchange.
It works in spot.
Buy the dip:
Attempts to buy on the dip, finding entries when the price makes abrupt dips that break deviation of the linear regression of the last periods.
Trend Detection:
Determines whether the market is in an uptrend or downtrend by crossing 2 SMAs + super trend in different temporalities. This affects the performance of the strategy. It works as a filter to avoid making entries in a downtrend. It also includes other advanced filters to find the best selling price on losses.
Break Even:
If the market enters a downtrend with an open trade, the Break Even sell is triggered, (configurable, default 1.5%). The intention is to close the trade as soon as possible, but without losses. The value of 1.5% is intended to cover commission costs and a possible spread.
Conditional SL Level: Determines a tolerance level in %, from which it is allowed to sell at a loss, while the price is above this level, the scrip will only sell at a profit.
% Trailing Stop Loss. The Stop Loss is placed a % below the price and accompanies it in the rises to make the most of an uptrend.
It allows you to easily configure the backtest period to optimize the parameters for consistent results.
The strategy calculates by default a commission of 0.1% on each trade to make the backtest more "pessimistic".
Includes advanced features for compatibility with different bots platforms in the market.
Risk management by % of equity or by maximum series of losses.
////////////////SPANISH///////////////////
Estrategia de Algotrading optimizada para criptomonedas. Originalmente concebida para operar de manera automática mediante bots (así la utilizo yo), funciona también para obtener señales y operar manualmente en cualquier exchange.
Funciona en spot.
Buy the dip:
Intenta comprar en el dip, encontrando entradas cuando el precio hace bajadas abruptas que rompen la desviación de la regresión lineal de los últimos periodos
Detección de Trend:
Determina si el mercado tiene una tendencia alcista o bajista mediante el cruce de 2 SMAs + super trend en distintas temporalidades. Esto afecta el funcionamiento de la estrategia. Funciona como filtro para evitar realizar entradas en una tendencia bajista. Incluye también otros filtros avanzados para encontrar el mejor precio de venta en pérdidas.
Break Even:
Si el mercado entra en tendencia bajista con una operación abierta, se activa la venta en Break Even, (configurable, por defecto 1.5%). La intención es cerrar la operación lo antes posible, pero sin pérdidas. El valor de 1.5% está pensado para cubrir los costos de comisiones y un posible spread.
Nivel de SL Condicional: Determina un nivel de tolerancia en %, a partir del cual se permite la venta en pérdidas, mientras el precio esté sobre este nivel, el scripto sólo venderá en ganancias
% Trailing Stop Loss. El Stop Loss se ubica un % debajo del precio y lo acompaña en las subidas para aprovechar al máximo un uptrend.
Permite configurar de manera muy fácil el periodo de backtest para optimizar los parámetros para resultados consistentes.
La estrategia calcula por defecto una comisión de 0.1% en cada operación para que el backtest sea más "pesimista".
Incluye funciones avanzadas para compatibilidad con diferentes plataforma de bots del mercado.
Administración de risego por % del capital o por máxima serie de pérdidas
BTI ALGO GLOBALHello traders
I. 💎 SCRIPTS ACCESS AND TRIALS 💎
1. Every trial request access has to be done through my website.
2. My website URL is in this script signature at the very bottom (you'll have to scroll down a bit and go past the long description) and in my profile status available here: Daveatt
3. Many video tutorials explaining clearly how all our indicators work are available on your website > guides section and on our Discord forum.
4. You can also contact me directly for more information regarding the trading method included in the indicator or how to access it
II. Forewords
Algorithm trading has THE ambitious goal to reduce the number of decisions we have to make when trading.
It's so much easier to get a signal whenever all indicators are converging rather than monitoring each one individually.
Even better when that convergence has been found by experienced quant traders - so that our subscribers only worry about managing their trades according to our trading method.
💎 We don't only provide scripts.
💎 The entries and exits are based on our trading method we've built over years across many asset classes (including cryptocurrencies)
Feel free to check us out for more information (links in my profile or signature below)
This indicator is for the Scalpers/Intraday/Swing traders looking for fixed entries based on a trading method designed by 2 experienced traders.
Plus, we iterated during 3 years with our 2K+ traders' community to bring this indicator to life.
We designed this framework for :
- CRYPTO: CRYPTO/USD and CRYPTO/CRYPTO pairing (ex: LTC/ BTC, XRP/ETH, ...).
We're compatible with all crypto brokers (Binance, Coinbase, Kraken, ...) and Decentralized exchanges (Uniswap, Pancakeswap, Anyswap, ...)
If it can be charted on TradingView, we support it.
- International Stocks (US, FR, JP, CA, IN, ...)
- Stocks and Crypto Indices (DOW JONES, DAX, DEFIPERP, SHITPERP, NIKKEI, NFT indices)
- FOREX: All FOREX pairs
- ALL Commodities
It includes :
- our proprietary method with fixed entries
- a hard exit system (built-in stop-loss)
- 🔔 Compatible with dynamic alerts for TradingConnector, Profitview, Autoview, 3commas 🔔
Dynamic alerts are bringing automated trading to a whole new level. The third-party solutions capturing TradingView alerts are able to use them.
- (optional) we let the users decide to use or not our built-in Trade Manager.
Regardless of the Trade Manager is used or not, one must mandatory exit, once a vertical hard exit bar appears.
- the Algorithmic Supports and Resistances used as safeguards and take profit zones.
Final words
We made it as simple as we could (to be honest it's a very simple system for the end-user) - even with several hundreds of calculations in the indicator.
Please hit me up for any questions/feedback/comments
Become the BEST trader that you deserve to be
Dave
Bot go_up DD_long/shortHello!
This strategy is based on the double bottom pattern - for entering a long position / double top-short
A double bottom pattern is formed when two price bottoms are relatively at the same level and the top acts as resistance. This pattern appears at the end of a downtrend and signals a reversal.
A double top is a bearish reversal pattern that signals the end of an uptrend. It is formed by two price highs forming at the same level and a notch line that acts as local support.
As history and practice show, the double bottom pattern works better. Moreover, in a bull market.
You can include only long or only short. BUT while there is a long, a short position will not be opened, in fact, with a long as well.
You can use reverse trade, one coin at a time.
DESCRIPTION:
// LOGIC ENTRY:
Period for short and long positions-to search for double bottom as well as double top. the more, the less false.
Change liong and short-channel width for pattern search separately for long and short.
General shift-the overall width of the channel, which changes equally at once for long and short
By default, quiet settings for tf 5 minutes are applied!
You can choose the settings you like.
// AMOUNT(USDT) FIRST ORDER AND > % NEXT
In the first column, indicate the amount, in the second, how many percent the next order will be more than the previous one.
// EXIT SETTINGS
Closing a trade by RSI when it reaches the level specified in the settings (but in the negative, the trade will never be closed, even if the condition is triggered)
Using a percentage to exit a trade + stop loss. (Put a stop order 1000+ on the market can be anything, especially if you use spot trading)
PS: in order to use the RSI output at a certain level, put a checkmark on the desired one, and also check the percentage box and indicate a take on the percentage 10-20 +)
// MARTINGALE GRID
If there is a check mark, then the grid is used.
Use all signals?
If yes, then there will be no limit on inputs from logic
If the checkbox is not checked, then you can limit the entries from the strategy logic by the specified percentage.
Grid, the next order, when decreasing by a certain percentage, an order when decreasing by the percentage that will be specified (after entering from the logic, when the next signal appears, the grid will be counted from the beginning)
PS: orders are not automatically placed, if the conditions are triggered, then the entry is only at the next bar (within the TV, it is not possible to add orders immediately, but most often, in case of straits, for the better)
// FILTER SETTINGS
The filter consists of a series of popular, averaged oscillators
//DATA RANGE
You can see the results for the selected period
//
CALCULATION OF ORDERS AND MARGIN (FOR INFO ONLY)
The number of orders is the number of entries (you must always have the same number of orders in the arguments and in the properties !!)
- in the aruments for understanding, in the properties - it does not matter how much it will cost there, so many inputs will be!)
-leverage is created to calculate the margin
When you change these parameters, you will understand how much money is required in general and what maximum drawdown can be allowed
Green line-take, lower-stop-order.
To use algo trading, in fact, you need to use a script, in the service through which you will transmit a signal through webhooks, you need to select the amount.
{{strategy.order.contracts}}
ОПИСАНИЕ НА РУССКОМ
//ЛОГИКА ВХОДА:
Период для шорт и лонг позиций, сдвиг для шорта лонга, также общий
По умолчанию применены спокойные настройки для тф. 5 минут.
Вы можете самостоятельно подбирать настройки, основываясь на прошлые результаты
//СУММА ВХОДА В ЮЗДТ +МАРТИНГЕЙЛ:
В первой графе указываете сумму , во второй -на сколько процентов следующий ордер будет больше предыдущего.
//НАСТРОЙКИ ВЫХОДА ИЗ СДЕЛКИ
Закрытие сделки по RSI, когда достигнет уровня, указанного в настройках ( но в минус сделка не будет закрыта никогда, даже если условие сработало)
Использование процента для выхода из сделки+ стоп приказ.( Ставьте стоп-приказ 1000+ на рынке может быть всякое, тем более, если используете спотовую торговлю)
ПС: для того, чтобы использовать выход по RSI по определенному уровню, поставьте галочку на нужный , а также поставьте галочку по проценту и укажите тейк по проценту 10-20+)
//НАСТРОЙКИ СЕТКИ
Если стоит галочка-то сетка используется.
Использовать все сигналы?
Если да, то лимита по входам от логики не будет
Если не стоит галочка, то можно ограничить входы от логики стратегии, на указанный процент.
Сетка, следующий ордер, при снижении на определенный процент-след ордер при снижении на тот процент, который будет указан ( после входа от логики , при появлении следующего сигнала сетка будет считаться с начала)
ПС: ордера автоматически не ставятся, если сработали условия, то вход, только на следующем баре ( в рамках ТВ, нет возможности добавить сразу ордера, но чаще всего, при проливах-к лучшему)
//НАСТРОЙКИ ФИЛЬТРА
Фильтр состоит из серии популярных, усредненных осцилляторов.
//
БЭКТЕСТИНГ
Можете посмотреть результаты за выбранный промежуток
//
ПИРАМИДИНГ (исключительно для расчета)
Количество ордеров-это количество входов ( у вас всегда должно быть одинаковое количество ордеров в агрументах и в свойствах!!)
-в аргументах для понимания, в свойствах -важно, сколько там будет стоить-столько входов и будет!)
-плечо создано для расчета маржи
При изменение данных параметров Вы будете понимать сколько потребуется средств в общем и какую максимальную просадку можно допустить
Зеленая линия-тейк, нижняя-стоп-приказ.
Для использования алго-трейдинга, собственно так и нужно использовать скрипт, в сервисе, через который Вы будете передавать сигнал через веб-хуки , Вам нужно выбрать количество.
{{strategy.order.contracts}}
Удачных трейдов, друзья!
BollingerBands Strat + pending order alerts via TradingConnectorSoftware part of algotrading is simpler than you think. TradingView is a great place to do this actually. To present it, I'm publishing each of the default strategies you can find in Pinescript editor's "built-in" list with slight modification - I'm only adding 2 lines of code, which will trigger alerts, ready to be forwarded to your broker via TradingConnector and instantly executed there. Alerts added in this script: 14, 17, 20 and 23.
SCRIPT INCLUDES PENDING ORDERS AND ALERTS! Alert will be sent to MetaTrader when order is triggered, but not yet filled. That means if market conditions change and order does not get filled, it needs to be cancelled as well, and there are alerts for that in the script as well.
How it works:
1. TradingView alert fires.
2. TradingConnector catches it and forwards to MetaTrader4/5 you got from your broker.
3. Trade gets executed inside MetaTrader within 1 second of fired alert.
When configuring alert, make sure to select "alert() function calls only" in CreateAlert popup. One alert per ticker is required.
Adding stop-loss, take-profit, trailing-stop, break-even or executing pending orders is also possible. These topics have been covered in other example posts.
This routing works for Forex, indices, stocks, crypto - anything your broker offers via their MetaTrader4 or 5.
Disclaimer: This concept is presented for educational purposes only. Profitable results of trading this strategy are not guaranteed even if the backtest suggests so. By no means this post can be considered a trading advice. You trade at your own risk.
If you are thinking to execute this particular strategy, make sure to find the instrument, settings and timeframe which you like most. You can do this by your own research only.
RSI Algo (Pinescript v5 + Alerts)Found this the other day and thought it might be useful to have an updated version with alerts:
Credit to the original author.
Fx Crusher Scalping Indicator V1█ OVERVIEW
Scalping Indicator with Buy and Sell Signals for the 15 min and 5 min Chart. Works on all assets (Crypto, Forex, Stocks, Indices, Commodities and Metals)
Only use in trending markets. Signals in a ranging market are useless.
This Scalping Indicator is different from others because most of the Buy/ Sell signals actually make sense. No counter trend trading and most signals can be very profitable when used right.The single most important goal was to have an indicator that shows signals with a big possible risk reward ratio. Most false signals are filtered out. The Fx Crusher Scalping Indicator is not perfect but it is amazing. You can customize the indicator to get the highest signal quality.
█ HOW DOES IT WORK?
The indicator determines the trend direction by using 3 different smoothed moving averages. A green background shows an uptrend and a red background shows a downtrend.
The strength of the trend is determined by the slope of the individual SMMAs. You can set the slope of every single SMMA for buys and sells individually.
The indicator only shows signals when there is a clear trend on the current timeframe.
Entry signals are generated by a combination of Williams fractals, SMMA crossover, trend angle and RSI condition.
█ HOW TO USE?
Draw Support & Resistance lines on the 4H Chart
Determine the overall trend on the 1H Timeframe
Go to the 15 min or 5 min Time Frame and have a look at the signals
Adjust the slope of every single SMMA in 0.01 steps until the signals look good
Adjust the RSI settings for overbought and oversold condition if necessary
Only enter a trade after the candle that prints a signal is closed.
Only take buy positions when all SMMAs are going up and don’t touch each other
Only take sell positions when all SMMAs are going down and don’t touch each other
Only use this Scalping Indicator with proper Risk management and a risk reward ratio of around 1:2.
Trail your stop to get the most pips out of the signals. Very often the indicator shows signals right before major moves.
█ ADDITIONAL INFO
Be careful with buy signals when the market on the higher timeframe (4H and 1H) is in a downtrend and vice versa.
You can make the most profit out of this Indicator when you enter with 2 positions. A quick scalp and a runner. Because there's a lot of signals with huge risk reward ratios but also some unprofitable signals . Therefore make sure you make the best out of the good signals and apply proper risk management to limit losses with bad signals. Stop loss placement according to market structure.
Multiple Signals in a row can show a high probability of a very strong upcoming move. Monitor your trades and secure partials to make the best out of it.
You can select how many signals it is going to show once trend conditions are met. Please be aware that the longer a trend goes, the higher is the probability of a reversal. Therefore the first few signals after all conditions are met are most likely the most profitable.
By setting the slope of the slow SMMA correctly you can filter out most signals in a ranging market.
█ DISCLAIMER
This is not financial advice. I do everything I can to provide the most accurate buy and sell signals for scalping but past results are no guarantee for future performance.
Pivot Reversal Strategy + alerts via TradingConnector to indicesSoftware part of algotrading is simpler than you think. TradingView is a great place to do this actually. To present it, I'm publishing each of the default strategies you can find in Pinescript editor's "built-in" list with slight modification - I'm only adding 2 lines of code, which will trigger alerts, ready to be forwarded to your broker via TradingConnector and instantly executed there. Alerts added in this script: 14 and 22.
How it works:
1. TradingView alert fires.
2. TradingConnector catches it and forwards to MetaTrader4/5 you got from your broker.
3. Trade gets executed inside MetaTrader within 1 second of fired alert.
When configuring alert, make sure to select "alert() function calls only" in CreateAlert popup. One alert per ticker is required.
Adding stop-loss, take-profit, trailing-stop, break-even or executing pending orders is also possible. These topics have been covered in other example posts.
This routing works for Forex, indices, stocks, crypto - anything your broker offers via their MetaTrader4 or 5.
Disclaimer: This concept is presented for educational purposes only. Profitable results of trading this strategy are not guaranteed even if the backtest suggests so. By no means this post can be considered a trading advice. You trade at your own risk.
If you are thinking to execute this particular strategy, make sure to find the instrument, settings and timeframe which you like most. You can do this by your own research only.
Consecutive Up/Down Strat + alerts via TradingConnector to ForexSoftware part of algotrading is simpler than you think. TradingView is a great place to do this actually. To present it, I'm publishing each of the default strategies you can find in Pinescript editor's "built-in" list with slight modification - I'm only adding 2 lines of code, which will trigger alerts, ready to be forwarded to your broker via TradingConnector and instantly executed there. Alerts added in this script: 12 and 15.
How it works:
1. TradingView alert fires.
2. TradingConnector catches it and forwards to MetaTrader4/5 you got from your broker.
3. Trade gets executed inside MetaTrader within 1 second of fired alert.
When configuring alert, make sure to select "alert() function calls only" in CreateAlert popup. One alert per ticker is required.
Adding stop-loss, take-profit, trailing-stop, break-even or executing pending orders is also possible. These topics have been covered in other example posts.
This routing works for Forex, indices, stocks, crypto - anything your broker offers via their MetaTrader4 or 5.
Disclaimer: This concept is presented for educational purposes only. Profitable results of trading this strategy are not guaranteed even if the backtest suggests so. By no means this post can be considered a trading advice. You trade at your own risk.
If you are thinking to execute this particular strategy, make sure to find the instrument, settings and timeframe which you like most. You can do this by your own research only.
RSI Strategy with alerts via TradingConnector to ForexSoftware part of algotrading is simpler than you think. TradingView is a great place to do this actually. To present it, I'm publishing each of the default strategies you can find in Pinescript editor's "built-in" list with slight modification - I'm only adding 2 lines of code, which will trigger alerts, ready to be forwarded to your broker via TradingConnector and instantly executed there. Alerts added in this script: 12 and 17.
How it works:
1. TradingView alert fires.
2. TradingConnector catches it and forwards to MetaTrader4/5 you got from your broker.
3. Trade gets executed inside MetaTrader within 1 second of fired alert.
When configuring alert, make sure to select "alert() function calls only" in CreateAlert popup. One alert per ticker is required.
Adding stop-loss, take-profit, trailing-stop, break-even or executing pending orders is also possible. These topics have been covered in other example posts.
This routing works for Forex, indices, stocks, crypto - anything your broker offers via their MetaTrader4 or 5.
Disclaimer: This concept is presented for educational purposes only. Profitable results of trading this strategy are not guaranteed even if the backtest suggests so. By no means this post can be considered a trading advice. You trade at your own risk.
If you are thinking to execute this particular strategy, make sure to find the instrument, settings and timeframe which you like most. You can do this by your own research only.
Smart Oscillator PremiumThe Smart Oscillator Premium indicator is a clever oscillator that helps you estimate the direction of trends. It is adaptive to a variety of markets and timeframes and provides rich and colorful visuals using a vibrant color scheme. Aiming to keep things simple, the oscillator only needs one parameter, the length of your base moving average, which defaults to 32.
Overview
As seen in the image above we provide key metrics to assist in choosing smart entry and exit points.
Key Features:
Get a better idea of the trend direction.
Spot divergences in price movements from your chosen moving average.
Using our Smart Candle technology better estimate tops and bottoms.
Using our Whale Sonar technology spot opportunities to enter and exit.
Smart Bollinger Bands using custom Fibonacci levels.
While we believe our default theme is attractive, we expose all style settings to the user to meet their preferences.
Alerts for divergences, with more coming soon.
Road Map:
While we believe this indicator should currently be used in a discretionary manner, we are currently working towards providing you with automated entry/exit signals. We also believe user feedback is a big part of the development process. You can leave us any suggestions or features you may want implemented via our Discord server.
Disclaimer:
By using this script you acknowledge past performance is not necessarily indicative of future results and there are many more factors that go into being a profitable trader.
Access:
See the authors instructions below to get access to our Premium Indicator suite.
DMI + HMA - No Risk ManagementDMI (Directional Movement Index) and HMA (Hull Moving Average)
The DMI and HMA make a great combination, The DMI will gauge the market direction, while the HMA will add confirmation to the trend strength.
What is the DMI?
The DMI is an indicator that was developed by J. Welles Wilder in 1978. The Indicator was designed to identify in which direction the price is moving. This is done by comparing previous highs and lows and drawing 2 lines.
1. A Positive movement line
2. A Negative movement line
A third line can be added, which would be known as the ADX line or Average Directional Index. This can also be used to gauge the strength in which direction the market is moving.
When the Positive movement line (DI+) is above the Negative movement line (DI-) there is more upward pressure. Ofcourse visa versa, when the DI- is above the DI+ that would indicate more downwards pressure.
Want to know more about HMA? Check out one of our other published scripts
What is this strategy doing?
We are first waiting for the DMI to cross in our favoured direction, after that, we wait for the HMA to signal the entry. Without both conditions being true, no trade will be made.
Long Entries
1. DI+ crosses above DI-
2. HMA line 1 is above HMA line 2
Short Entries
1. DI- Crosses above DI+
2. HMA line 1 is below HMA lilne 2
Its as simple as that.
Conclusion
While this strategy does have its downsides, that can be reduced by adding some risk manegment into the script. In general the trade profitability is above average, And the max drawdown is at a minimum.
The settings have been optimised to suite BTCUSDT PERP markets. Though with small adjustments it can be used on many assets!
3Commas BotBjorgum 3Commas Bot
A strategy in a box to get you started today
With 3rd party API providers growing in popularity, many are turning to automating their strategies on their favorite assets. With so many options and layers of customization possible, TradingView offers a place no better for young or even experienced coders to build a platform from to meet these needs. 3Commas has offered easy access with straight forward TradingView compatibility. Before long many have their brokers hooked up and are ready to send their alerts (or perhaps they have been trying with mixed success for some time now) only they realize there might just be a little bit more to building a strategy that they are comfortable letting out of their sight to trade their money while they eat, sleep, etc. Many may have ideas for entry criteria they are excited to try, but further questions arise... "What about risk mitigation?" "How can I set stop or limit orders?" "Is there not some basic shell of a strategy that has laid some of this out for me to get me going?"
Well now there is just that. This strategy is meant for those that have begun to delve into the world of algorithmic trading providing a template that offers risk defined positions complete with stops, limit orders, and even trailing stops should one so choose to employ any of these criteria. It provides a framework that is easily manipulated (with some basic working knowledge of pine coding) to encompass ones own ideas and entry criteria, while also providing an already functioning strategy.
The default settings have a basic 1:1 risk to reward ratio, which sets a limit and a stop equal distance from the entry. The entry is a simple MA cross (up for long, down for short). There a variety of MA's to choose from and the user can define the lengths of the averages. The ratio can be adjusted from the menu along with a volatility based adder (ATR) that helps to distance a stop from support or resistance. These values are calculated off the swing low/high of the user defined lookback period. Risk is calculated from position entry to stop, and projected upwards to the limit as a function of the desired risk to reward ratio. Of note: the default settings include 0.05% commissions. Competitive commissions of the leading cryptocurrency exchanges are .1% round trip (one buy and one sell) for market orders. There is also some slippage to allow time for alerts to be sent and orders to fill giving the back test results a more accurate representation of real time conditions. Its recommended to research the going rates for your exchange and set them to default for the strategy you use or build.
To get started a user would:
1) Make a copy of the code and paste in their bot keys in the area provided under the "3Comma Keys" section
- eg. Long bot "start deal" copied from 3commas in to define "Long" etc. (code is commented)
2) Place alert on desired asset with desired settings ensuring to select "Order fills and alert() function calls"
3) Paste webhook into the webhook box and select webhook URL alerts (3rd party provided webhook)
3) Delete contents of alert message box and replace with {{strategy.order.alert_message}} and nothing else
- the codes will be sent to the webhook appropriately as the strategy enters and exits positions. Only 1 alert is needed
settings used for the display image:
1hr chart on BTCUSD
-ATR stop
-Risk adjustment 1.2
-ATR multiplier 1.3
-RnR 0.6
-MAs HEMA/SMA
-MA Length 50/100
-Order size percent of equity
-Trail trigger 60% of target
Experiment with your own settings on your crypto of choice or implement your own code!
Implementing your trailing stop (optional)
Among the options for possible settings is a trailing stop. This stop will ratchet higher once triggered as a function of the Average True Range (ATR). There is a variable level to choose where the user would like to begin trailing the stop during the trade. The level can be assigned with a decimal between 0 and 1 (eg. 0.5 = 50% of the distance between entry and the target which must be exceeded before the trail triggers to begin). This can allow for some dips to occur during the trade possibly keeping you in the trade for longer, while potentially reducing risk of drawdown over time. The default for this setting is 0 meaning unless adjusted, the trail will trigger on entry if the trailing stop exit method is selected. An example can be seen below:
Again, optional as well is the choice to implement a limit order. If one were to select a trailing stop they could choose not to set a limit, which could allow a trail to run further until hit. Drawdowns of this strategy would be foregoing locking gains at highs on target on other trades. This is a trade-off the user can decide on and test. An example of this working in favor can be observed below:
Conclusion
Although a simple strategy is implemented here, the benefits of this script allow a user a starting platform to build their strategies from with built in risk mitigation. This allows the user to sidestep some of the potential difficulties' that can arise while learning Pine and taking on the endeavor of automating their trading strategies. It is meant as an aid, a structure, and an educational piece that can be seen as a "pick-up-and-go" strategy with easy 3Commas compatibility. Additionally, this can help users become more comfortable with strategy alert messages and sending strings in the form of alerts from Pine. As well, FAQs are often littered with questions regarding "strategy.exit" calls, how to implement stops. how to properly set a trailing stop based on ATR, and more. The time this can save an individual to get started is likely of the best "take-aways" here.
Happy trading