Trailing SL Alerts [QuantNomad]It's alerts version of my Trailing SL strategy:
Use "Once Per Bar" param when creating alerts.
Trailingstop
WMA + MACD strategy with trailing stopHi!
That's my first strategy. I already learn pine, so i will work on it more. Now i search how to make trailing stop working.
"WMA + MACD strategy with traiing stop" is very simple strategy which is designated for stocks market. It is created only to take long positions.
Buy signal is when WMA(120) is below price and macd(10,20,10) histogram is higher than 0.
Position should be automaticly closed when price hits stoploss level.
One transaction should be max 20% of our capital and stoploss is set 3% lower than last closing price.
Trailing SL Strategy [QuantNomad]I'm a big fan of simple strategies.
This one is a very simple one. So it consists only from one Trailing SL. When SL is hit, the position is reversed and SL is tracked for a new position.
You can choose one of 3 types of SL:
% of your price
ATR - it is calculated as current ATR * multiplier
Absolute
As you can see even this simple strategy can show pretty good results.
London Breakout with MDX Trailing StopThis indicator aims to aid in using the regular London Breakout strategy, as well as improve on it by adding a trailing stop based on the Mean Deviation Index.
The London Breakout strategy (according to my personal understanding) basically sees the morning before London open as the accumulation or distribution range for large buyers or sellers, and assumes the market will break either above that mornings high or below that mornings low when they start to move price. It is mostly used to trade stock indices and forex.
This indicator plots the morning high and low for each day. The green line is the morning high, and the red line is the morning low. If price moves above the green line (the morning high) it fills that area with a green color. If price moves below the green line (the morning low) it fills that area with a red color. This makes the breakouts easy to spot.
The background color of the chart turns green when the MDX is above 0 (price is more than X times ATR above the mean) and a breakout above the morning high has occurred, and stays green until the opposite happens.
The background color of the chart turns red when the MDX is below 0 (price is more than X times ATR below the mean) and a breakout above the morning high has occurred, and stays green until the opposite happens.
The default for X above is 1.0, but this can be changed in the settings by changing "ATR Multiplier".
The background is always neutral during the morning session since the morning high and morning low are not established yet.
A trailing stop is shown when price is more than X times away from the mean and a breakout has occured. The distance is set using the MDX. The trailing stop uses a separate ATR multiplier though, to make the signal and trailing stop MDX values different, if one likes. The default ATR multiplier for the trailing stop is 1.25, but this can be changed is the settings by changing "ATR multiplier for trailing stop".
When the high or low of a candle breaks the trailing stop, it is moved further away, indicating you have been stopped out, but gives opportunity to use it if you enter again (so it doesn't just disappear).
As an added bonus, take profit levels have been added based on the mornnig range. The take profit distance is set by multiplying the range with a factor. The levels are then plotted that distance from the morning high and morning low.
MDX:
Grover Llorens Activator Strategy AnalysisThe Grover Llorens Activator is a trailing stop indicator deeply inspired by the parabolic SAR indicator, and aim to provide early exit points and reversal detection. The indicator was posted not so long ago, you can find it here :
Today a strategy using the indicator is proposed, and its profitability is analyzed on 3 different markets with the main time frame being 1 hour, remember that lower time frames involve lower absolute price changes, therefore we are way more affected by the spread, and we can require a larger position sizing depending on our investment target, trading higher time-frames is always a good practice and this is why 1 hour is selected. Based on the result we might make various conclusions regarding the indicator accuracy and might have ideas on future improvements of the indicator.
I'am not great when it comes to strategy design, i still hope to share correct and useful information in this post, let me know your thoughts on the post format and if i should make more of these.
Setup And Rules
The analysis is solely based on the indicator signals, money management isn't taken into account, this allow us to have an idea on the indicator robustness and resilience, particularly on extremely volatile markets and ones exhibiting a chaotic structure, altho it is normally good practice to close any position before a market closure in order to avoid any potential major gaps.
The settings used are 480 for length and 14 for mult, this create relatively mid term signals that are suited for a trend indicator such as the Grover Llorens Activator, unfortunately we can't infer the indicator optimal settings, thats how it is with any technical indicator anyway.
Here are the rules of our strategy :
long : closing price cross over the indicator
short : closing price cross under the indicator
We use constant position sizing, once a signal is triggered all the previous positions are closed.
Description Of The Statistics Used
Various statistics are presented in this post, here is a brief description of the main ones :
Percent Profitability (higher = better): Percentage of winning trades, that is : winning trades/total number of trades × 100
Maximum Drawdown (lower = better) : The highest difference between a peak and a valley in the balance, that is : peak - valley , in percentage : (peak - valley)/peak × 100
Profit Factor (higher = better) : Gross profit divided by gross loss, values under 1 represent gross losses superior to the gross profits
Remember that more volatility = more risk, since higher absolute price changes can logically cause larger losses.
EURUSD
The first market analyzed is the Forex market with the EURUSD major pair with a position sizing of 1000 units (1 micro lot). Since October EURUSD is not showing any particular strong trend but posses a discrete rising motion, fortunately cycles can be observed.
The equity was rising until two trades appeared causing a decline in the equity. Before October a bearish market could be observed.
We can see that the equity is rising, the trend still posses various retracements that affect our indicator, however we can see that the indicator totally nail the end of the trend, thats the power of converging toward the price.
In short :
$ 86.63 net profit
340 closed trades
37.65 % profitable (thats a lot of loosing trades)
1.19 profit factor
$ 76.67 max drawdown
Applying a spread would create negative results (in general the average spread is used), not a great start...
BTCUSD
The cryptocurrency market is relatively more volatile than others, which also mean potentially higher returns, we test the indicator using certainly the most traded cryptocurrency, BTCUSD. We will use a position sizing of 1 unit.
In the case of BTCUSD the strategy balance is relatively stationary around the initial capital, with of course high dispersion.
from september to december the market is bearish with various ranging periods, no apparent cycles can be observed, except maybe in the ranging period of october, this ranging period is followed by a non linear trend (relatively parabolic) that the indicator failed to capture in its integrity (this is a recurrent problem and it is starting to piss me off xD).
In short :
$ 2010.64 net profit (aka how i bet the crypto market)
395 closed trades
38.23 % profitable
1.036 profit factor
$ 5738.01 max drawdown (aka how i lost to the crypto market)
AMD
AMD stand for Advanced Micro Devices and is a company focused on the development of computer technology, i love the microprocessor market and i really like AMD who start this year in a pretty great way with a net bullish trend.
The performance of the indicator on AMD is decent (at last !) with the equity producing many new higher highs. The indicator performance still drop in the middle end of 2019 with a large equity drawdown of 17$ caused by the gap of august 8. Unfortunately AMD, like lot of well behaving stocks can only tells us that the indicator has good performances on heavily trending markets with no excess of noise or chaotic structures.
In short :
$ 17.86 net profit (Enough for a consistent lunch)
295 closed trades
36.27 % profitable
1.414 profit factor
$ 10.37 max drawdown.
Conclusion
A strategy using the recently proposed Grover Llorens activator has been presented. We can easily conclude that the indicator can't possibly generate long term returns under chaotic and volatile markets, and could even produce unnecessary trades in trending markets without much parasitic fluctuations such as noise and retracements (think about a simple linear trend) since the indicator converge toward the price and would therefore automatically cross over/under the trend, thus guaranteeing a false signal.
However we have seen its ability to provide accurate early reversal detection shine from time to time, thus over performing lagging indicators in this aspect, however the duration of price fluctuations isn't fixed at a certain period, the rate of convergence should be way faster during volatile fluctuations, of moderate speed during more cyclic fluctuations, and really slow with apparent long term trends, this could be achieved by making the indicator adaptive, but it won't really make it necessarily perform better.
That said i still believe that converging trend indicators are really interesting and aim to capture the non lasting behavior of price fluctuations, they shouldn't receive so much hate (think about the poor p-sar).
Thanks for reading !
Simple Moving Average - ATR Trailing StopThe old adage goes "Cut losers fast and let the winners run"
With this in mind, this will plot a dynamic trailing stop by subtracting any multiplier of the Average True Range (ATR) from the SMA of your choice.
Grover Llorens Activator [alexgrover & Lucía Llorens] Trailing stops play a key role in technical analysis and are extremely popular trend following indicators. Their main strength lie in their ability to minimize whipsaws while conserving a decent reactivity, the most popular ones include the Supertrend, Parabolic SAR and Gann Hilo activator. However, and like many indicators, most trailing stops assume an infinitely long trend, which penalize their ability to provide early exit points, this isn't the case of the parabolic SAR who take this into account and thus converge toward the price at an increasing speed the longer a trend last.
Today a similar indicator is proposed. From an original idea of alexgrover & Lucía Llorens who wanted to revisit the classic parabolic SAR indicator, the Llorens activator aim to converge toward the price the longer a trend persist, thus allowing for potential early and accurate exit points. The code make use of the idea behind the price curve channel that you can find here :
I tried to make the code as concise as possible.
The Indicator
The indicator posses 2 user settings, length and mult , length control the rate of convergence of the indicator, with higher values of length making the indicator output converge more slowly toward the price. Mult is also related with the rate of convergence, basically once the price cross the trailing stop its value will become equal to the previous trailing stop value plus/minus mult*atr depending on the previous trailing stop value, therefore higher values of mult will require more time for the trailing stop to reach the closing price, use higher values of mult if you want to avoid potential whipsaws.
Above the indicator with slow convergence time (high length) and low mult.
Points with early exit points are highlighted.
Usage For Oscillators
The difference between the closing price and an overlay indicator can provide an oscillator with characteristics depending on the indicators used for differencing, Lucía Llorens stated that we should find indicators for differencing that highlight the cycles in the price, in other terms : Price - Signal , where we want to find Signal such that we maximize the visibility of the cycles, it can be demonstrated that in the case where the closing price is an additive model : Trend + Cycles + Noise , the zero lag estimation of the Trend component can allow for the conservation of the cycle and noise component, that is : Price - Estimate(Trend) , for example the difference between the price and moving average isn't optimal because of the moving average lag, instead the use of zero lag moving averages is more suitable, however the proposed indicator allow for a surprisingly good representation of the cycles when using differencing.
The normalization of this oscillator (via the RSI) allow to make the peak amplitude of the cycles more constant. Note however that such method can return an output with a sign inverse to the one of the original cycle component.
Conclusion
We proposed an indicator which share the logic of the SAR indicator, that is using convergence toward the price in order to provide early exit points detection. We have seen that this indicator can be used to highlight cycles when used for differencing and i don't exclude publishing more indicators based on this method.
Lucía Llorens has been a great person to work with, and provided enormous feedback and support while i was coding the indicator, this is why i include her in the indicator name as well as copyright notice. I hope we can make more indicators togethers in the future.
(altho i was against using buy/sells labels xD !)
Thanks for reading !
Trailing Stop Loss ATR + AlertI share this TSL indicator with alert (I use it only for Stocks), the configuration is very simple, you must select if it is a Short or Long operation, time at which the operation was opened,% of the daily ATR for TSL. It also contains:
- Alert
- Panel Info
Trend Follower - Light Mode | jhFollow up script for my Trend Follower script.
I'm used to dark mode, so I coded a few key plots in white, so those are changed into black on the script.
Notably:
- > 1 ATR in black dots along the baseline
- Current and previous ATR text labels to the right of the price
- A text label spacing input that allows you to adjust the spacing for text label from price.
This is a trend following system that combines 3 indicators which provide different functionalities, also a concept conceived by VP's No Nonsense FX / NNFX method.
1. Baseline
The main baseline filter is an indicator called Modular Filter created by Alex Grover
- www.tradingview.com
- Alex Grover - Modular Filter
-------
That's the moving average like baseline following price, filtering long and short trends and providing entry signals when the price crosses the baseline.
Entry signal indicated with arrows.
2. Volume/Volatility, I will called it Trend Strength
The next indicator is commonly known as ASH, Absolute Strength Histogram.
This indicator was shared by VP as a two line cross trend confirmation indicator, however I discovered an interesting property when I modified the calculation of the histogram.
- Alex Grover Absolute Strength
-------
My modification and other info here
- Absolute Strength Histogram v2
-------
I simplified the display of the trend strength by plotting squares at the bottom of the chart.
- Lighted Squares shows strength
- Dimmed Squares shows weakness
3. Second Confirmation / Exits / Trailing Stop
Finally the last indicator is my usage of QQE (Qualitative Quantitative Estimation), demonstrated in my QQE Trailing Line Indicator
- QQE Trailing Line for Trailing Stop
-------
Three usages of this amazing indicator, serving as :
- Second trend confirmation
- Exit signal when price crosses the trailing line
- Trailing stop when you scaled out the second trade
This indicator is plotted with crosses.
Additional plots and information
Bar Color
- Green for longs, Red for shorts, White when the baseline direction conflicts with the QQE trailing line direction
- When it's white, it's usually ranging and not trending, ASH will also keep you off ranging periods.
-------
ATR Filter
- White circles along the baseline, they will show up if the price has moved more than one ATR from the baseline
- The default allowance is 1 ATR.
-------
The previous and current ATR value
- Label on the right side of the chart showing the previous and current value of ATR
Trend Follower | jhThis is a trend following system that combines 3 indicators which provide different functionalities, also a concept conceived by VP's No Nonsense FX / NNFX method.
1. Baseline
The main baseline filter is an indicator called Modular Filter created by Alex Grover
- www.tradingview.com
- Alex Grover - Modular Filter
-------
That's the moving average like baseline following price, filtering long and short trends and providing entry signals when the price crosses the baseline.
Entry signal indicated with arrows.
2. Volume/Volatility, I will called it Trend Strength
The next indicator is commonly known as ASH, Absolute Strength Histogram.
This indicator was shared by VP as a two line cross trend confirmation indicator, however I discovered an interesting property when I modified the calculation of the histogram.
- Alex Grover Absolute Strength
-------
My modification and other info here
- Absolute Strength Histogram v2
-------
I simplified the display of the trend strength by plotting squares at the bottom of the chart.
- Lighted Squares shows strength
- Dimmed Squares shows weakness
3. Second Confirmation / Exits / Trailing Stop
Finally the last indicator is my usage of QQE (Qualitative Quantitative Estimation), demonstrated in my QQE Trailing Line Indicator
- QQE Trailing Line for Trailing Stop
-------
Three usages of this amazing indicator, serving as :
- Second trend confirmation
- Exit signal when price crosses the trailing line
- Trailing stop when you scaled out the second trade
This indicator is plotted with crosses.
Additional plots and information
Bar Color
- Green for longs, Red for shorts, White when the baseline direction conflicts with the QQE trailing line direction
- When it's white, it's usually ranging and not trending, ASH will also keep you off ranging periods.
-------
ATR Filter
- White circles along the baseline, they will show up if the price has moved more than one ATR from the baseline
- The default allowance is 1 ATR.
-------
The previous and current ATR value
- Label on the right side of the chart showing the previous and current value of ATR
Adding my Didi and ASH indicators up on this screenshot
Didi Index Improved with QQE
BEST Multicolor Supertrend InfoPanelHello traders
Today is a Pinescript hack to display multiple colors in one label.
I used that panel to show the Supertrend Long Term values (weekly, monthly, quarterly, yearly)
What is a Supertrend?
Definition : SuperTrend is an indicator that works on all timeframes and all instruments (stocks, futures, forex, ...). It is a great tool to follow market trends and optimizes your profits.
SuperTrend evolves below or above the prices depending on the trend. You can use it as an exit position indicator when its direction changes. You can also use it to place your stops.
So.... the hack is?
The hack is about creating a new label for each line - versus creating just one label containing the whole text
Best regards,
Dave
BEST Trailing Stop StrategyHello traders
Here we go again.... with the second strategy snippet.
Reminder: the first snipper was a Trailing Profit strategy script
What's on the menu?
A trailing stop is designed to protect gains by enabling a trade to remain open and continue to profit as long as the price is moving in the investor's favor.
The order closes the trade if the price changes direction by a specified percentage or dollar amount.
Trigger me I'm famous
I developed many trading strategies in my career and often I've been asked to trigger a trailing-stop once a certain % move has been made.
On the screenshot below, the SL trigger is plotted in maroon.
Once the price goes past that level for the first time, I'll start trailing the trailing stop level.
In other words, when we see a price makes an interesting move in percentage value - we decide to trail the stop for at least not losing any more
All the BEST
Dave
BEST Trailing Take Profit StrategyHello traders
Hope you enjoyed your weekend on my behalf. Was staying home working ... ^^
This is my first strategy educational post I'm doing ever
While I'm generally against posting strategies because it's very easy to fake performance numbers... I cannot prevent myself from sharing a few cool strategy snippets anyway.
So from now on, I'll be sharing a few strategies also - generally not to showcase performance but only to show what pinescript can do.
As once again strategy performance can be faked is so many ways... :)
What's on the menu?
We all know what a trailing-stop is. right? right? Ok... sharing the definition here :)
A trailing stop is designed to protect gains by enabling a trade to remain open and continue to profit as long as the price is moving in the investor's favor. The order closes the trade if the price changes direction by a specified percentage or dollar amount.
But...do you know what a trailing profit is?
Short definition : Well the same but with your profit limit order.
Long definition : A trailing profit is designed to increase your gains by enabling a trade to remain open and continue to profit as long as the price is moving in the investor's favor. The order closes the trade if the price hits the trailing profit level specified percentage or dollar amount.
Some trading strategies used both a trailing stop AND trailing profit. Not making any recommendation here - only sharing what's possible in the realm of trading and pinescripting
Trigger me I'm famous
I developed many trading strategies in my career and often I've been asked to trigger a trailing-stop or trailing-profit once a certain % move has been made.
I integrated here a Take Profit trigger - once hit, it will activate the trailing profit
On the screenshot below, the TP trigger is plotted in orange. Once the price goes past that level for the first time, I'll start trailing the profit level.
In other words, when we see a price makes an interesting move in percentage value - we decide to offset the profit as we concluded that once it reached such distance - then it leads often to more profit
Of course, using only a trailing profit without stop/trailing-stop/invalidation isn't smart and the surest way to kiss goodbye a trading capital and trading and your good mood
See you tomorrow for another strategy snippet
All the BEST
Dave
Trailing ATR StopsThis script plots a trailing stop of the ATR multiplied by a user-defined number. Since it is meant to be used as a trailing stop, the value doesn't fluctuate with the price as a normal ATR indicator does, but stays fixed unless price moves away from it. In that case it follows the price. If price crosses the stop level, it resets itself based on current price and starts trailing all over again.
User Settings:
Support - Use for a trailing stop while long
Resistance - Use for a trailing stop while short
Both - Acts like a channel and can spot periods of lower volatility
Market Adaptive Stop-LossI realized that the zone changes in the stoploss remained slow, so I couldn't make enough use of the characteristics of technical indicators when opening positions.
This pushed me to keep stop-loss under the influence of a dependent variable.
This script helped me a lot (everget) :
I've redesigned the stop-loss to be affected by intersections.
Therefore, this script is also suitable for adaptive moving averages, fractional periods.
Script features:
1.You can select calculation methods created by using various technical analysis methods from the scripts' settings:
-Moving Average Convergence Divergence ( Macd )
-Stochastic Oscillator ( Stoch )
-Stochastic Relative Strength Index (StochRSI)
-Stochastic Money Flow Index (StochMFI ) (More info : )
-Know Sure Thing ( KST )
-OBV ( On Balance Volume )
-SMA ( Simple Moving Average )
-EMA ( Exponential Moving Average )
-FISHERTRANSFORM ( Fisher Transform )
-AWESOMEOSCILLATOR( Awesome Oscillator )
-PSAR ( Parabolic Stop and Reverse - Parabolic SAR )
-HULLMA( Hull Moving Average )
-VWMA ( Volume Weighted Moving Average )
-RMA (Moving Average using in Relative Strength Index calculations.)
-COG (Center of Gravity )
-ACC-DIST ( Accumulation / Distribution Index )
2 - The region is determined according to the above calculation methods and if it is larger or smaller than the previous stop loss level.
And if the price in the negative zone is lower than the stoploss, it is the exact signal and is shown with more highlighted colors.
And, in the positive zone, where the price is greater than the stoploss, the trade zones are certain.
Shown with more highlighted colors.
If the zones are correct but stop-loss is not suitable for opening positions:
In other words, if the stop-loss is above/under the highest-lowest levels in the positive zone or if the stop loss is located in the lower zone in the negative zone, these zones are shown to be darker and dimmed so that they do not cause false movements.
*** SUMMARY : As a result, you can use this script with support and resistances,and trend lines to get good results.
I hope it helps in your analyzes. Best regards.
QQE Trailing Line for Trailing Stop | jhUsing parts of QQE (Qualitative Quantitative Estimation) again, this time I'm applying the trailing line of QQE on price directly.
Outcome, it's behaving like a baseline filter and it can be use as an exit or a trailing stop indicator.
As comparing to Kijun-sen line in yellow, the QQE trailing line follows the price closer, therefore exiting you sooner when the trend direction changes.
There's 2 QQE option, they behave differently during the trend change.
Credits to Glaz and Shizaru for their QQE code.
Bands-Trailing Stop UtilityIntroduction
Bands and trailing stops are important indicators in technical analysis, while we could think that both are different they can be in fact closely related, at least in the way they are made. Bands and trailing stops can be made from a simple central tendency estimator, like a moving average, and from a volatility estimator like standard deviation, atr...etc.
This is why i propose this utility that allow you to make bands and trailing stops from any indicator in the price chart.
How To Use
All you have to do is select the indicator you want to make bands from in the settings, so just open the Bands-Trailing Stop Utility indicator settings and select your indicator in "Source". Make sure your source indicator is not in "hide" mode.
For example here i'am using a moving average as source for the indicator. Mult control how spread the bands are from each others, by default mult = 1, if we use mult = 2 we get :
Mult can be non-integer as well as lower than 1 (when lower than 1 the bands would be closer to each others)
Error/Volatility Estimators
You can choose from a wide variety of volatility estimators, select the estimator from the "Method" scrolling parameter in settings, by default the indicator will use the running mean absolute error (MAE) which don't use length. Other estimators use length, making length = to the period of the source indicator can help get better results.
The root moving averaged squared error (RMASE) is just the square root of the simple moving average of the squared difference between the closing price and the source indicator. length control the period of the moving average of RMASE.
You can also use the average true range with period length. It might work better with low lagging moving averages.
The range is simply the difference between the highest and lowest over length periods of the source indicator.
Stdev is simply the price running standard deviation.
Trailing Stop
When the trailing stop mode is checked the bands will be replaced by a trailing stop, the trailing stop will still depend on every settings of the indicator like mult/volatility estimator...etc.
Conclusion
You might find an use to this tool if you want to make bands/trailing stops from pretty much everything. The indicator used as source for the examples is a smooth exponential averager that i could share if i see interest from peoples.
Thanks for reading !
ATR + Trailing StopsSimple visualisation of Average True Range in Pinescript V4.
The script has two modes: Running and Trailing.
In Running mode, it continuously displays the ATR above and below the price. Specifically, it displays the High and Low price plus and minus the ATR times a user-supplied multiplier. This can be helpful for visualising volatility.
In Trailing mode, it displays the same ATR line, except the line trails until price crosses it. When price crosses it, it flips from long to short or vice-versa.
You could use trailing ATR as a stop loss. Adjust the multiplier and lookback period for your asset and preference.
ATR ChannelsATR Channels help you to identify where to place your stop-loss or trailing stop-loss based on price volatility, according to the Average True Range (ATR).
Adaptive Trailing StopIntroduction
The ability to adapt to possible markets states is important in technical analysis, this is why making adaptive indicator might help get better results. I propose a trailing stop indicator using recursion that can adapt to the efficiency ratio. I have added alerts since it's a often requested feature.
The Indicator
Its quite classical, bands are firstly made then a trailing stop is built around them. The bands are recursive, this allow for faster calculations in general but it also allow for a faster adaptivity. An higher length or factor will make the indicator detect longer term trends, factor determine the raising power of the efficiency ratio.
When smooth is checked the trailing stop will appear smoother.
When adaptive is unchecked the indicator will still act as a trailing stop but might be more affected to ranging markets.
Set a static/trailing stop loss :
You can set your stop loss based on the indicator, a static stop loss can be set at the value of the trailing stop when you enter the market. You can also set it as trailing stop, the indicator will follow the trend thus allowing for potential profits to grow's.
Determine The Trend Direction :
You can generate buy sell signals based on the indicator position relative to the price, when the indicator is lower than the price this indicate a up trending market, when the indicator is higher than the price this indicate a down trending market. If the trailing stop move this indicate a strong current trend.
False signals with trailing stops can happen, the price might go toward the trailing stop making it generate another signal, when market is ranging and exhibiting cyclical behaviour this can affect the indicator and the user might get stuck in a series of false signals, higher length/factor values can fix that at the cost of less early signals.
Identification Of Support And Resistance
Bands during low volatility/ranging markets can return potential reversal points when crossing with the price. The indicator can also do it, even if high/low crosses are better suited to determine support and resistance levels when using a trailing stop. You can use support/resistance identification in conjonction of the current trend detected by the indicator.
Conclusion
The indicator is fully operational in fixed mode while having potential down points in adaptive mode. As you can see the code that return the bands is fully recursive and might provide a great way to create adaptive bands in the future.
I have been asked to give more detail about the indicator uses rather than the construction, i hope the showcased uses are convenient.
Note that the showcased uses can be applied to any trailing stop.
Thanks for reading.
RePaNoCHa V4 [Backtest]This is the Backtest version of the previous one.
It's important to correctly set the "TICKS / PIPS CORRECTION" parameter in each different chart.
Enjoy!
SUPERTREND ATR WITH TRAILING STOP LOSS## THIS SCRIPT IS ON GITHUB
## MORE BACKTEST
SuperTrend is a moving stop and reversal line based on the volatility (ATR).
The strategy will ride up your stop loss when price moviment 1%.
The strategy will close your operation when the market price crossed the stop loss.
The strategy will close operation when the line based on the volatility will crossed
The strategy has the following parameters:
+ **ATR PERIOD** - To select number of bars back to execute calculation
+ **ATR MULTPLIER** - To add a multplier factor on volatility
+ **INITIAL STOP LOSS** - Where can isert the value to first stop.
+ **POSITION TYPE** - Where can to select trade position.
+ **BACKTEST PERIOD** - To select range.
## DISCLAIMER
1. I am not licensed financial advisors or broker dealers. I do not tell you when or what to buy or sell. I developed this software which enables you execute manual or automated trades multiple trades using TradingView. The software allows you to set the criteria you want for entering and exiting trades.
2. Do not trade with money you cannot afford to lose.
3. I do not guarantee consistent profits or that anyone can make money with no effort. And I am not selling the holy grail.
4. Every system can have winning and losing streaks.
5. Money management plays a large role in the results of your trading. For example: lot size, account size, broker leverage, and broker margin call rules all have an effect on results. Also, your Take Profit and Stop Loss settings for individual pair trades and for overall account equity have a major impact on results. If you are new to trading and do not understand these items, then I recommend you seek education materials to further your knowledge.
**YOU NEED TO FIND AND USE THE TRADING SYSTEM THAT WORKS BEST FOR YOU AND YOUR TRADING TOLERANCE.**
**I HAVE PROVIDED NOTHING MORE THAN A TOOL WITH OPTIONS FOR YOU TO TRADE WITH THIS PROGRAM ON TRADINGVIEW.**
## NOTE
I accept suggestions to improve the script.
If you encounter any problems i will be happy to share with me.
+ Authors: @exit490
+ Revision: v1.0.0
+ Date: 5-Aug-2019
+ Pinescript version: 4
## LICENSE
Copyright 2019 Mauricio Pimenta / exit490
SuperTrend with Trailing Stop Loss script may be freely distributed under the (../LICENSE).
TRAILING STOP LOSS TO LONG AND SHORT##THIS SCRIPT IS ON GITHUB
This TradingView strategy it is designed to integrate with other strategies with indicators.
It performs a trailing stop loss from entry and exit conditions.
In this strategy you can add conditions for long and short positions.
The strategy will ride up your stop loss when price moviment 1%.
The strategy will close your operation when the market price crossed the stop loss.
Also is possible to select the period that strategy will execute the backtest.
The strategy has the following parameters:
+ **INITIAL STOP LOSS** - Where can isert the value to first stop.
+ **POSITION TYPE** - Where can to select trade position.
+ **BACKTEST PERIOD** - To select range.
## DISCLAIMER
1. I am not licensed financial advisors or broker dealers. I do not tell you when or what to buy or sell. I developed this software which enables you execute manual or automated trades multiple trades using TradingView. The software allows you to set the criteria you want for entering and exiting trades.
2. Do not trade with money you cannot afford to lose.
3. I do not guarantee consistent profits or that anyone can make money with no effort. And I am not selling the holy grail.
4. Every system can have winning and losing streaks.
5. Money management plays a large role in the results of your trading. For example: lot size, account size, broker leverage, and broker margin call rules all have an effect on results. Also, your Take Profit and Stop Loss settings for individual pair trades and for overall account equity have a major impact on results. If you are new to trading and do not understand these items, then I recommend you seek education materials to further your knowledge.
**YOU NEED TO FIND AND USE THE TRADING SYSTEM THAT WORKS BEST FOR YOU AND YOUR TRADING TOLERANCE.**
**I HAVE PROVIDED NOTHING MORE THAN A TOOL WITH OPTIONS FOR YOU TO TRADE WITH THIS PROGRAM ON TRADINGVIEW.**
## NOTE
I accept suggestions to improve the script.
If you encounter any problems I will be happy to share with me.
+ Authors: @exit490
+ Revision: v1.0.0
+ Date: 03-Aug-2019
+ Pinescript version: 4
## LICENSE
Copyright 2019 Mauricio Pimenta / exit490
Trailing Stop Loss script may be freely distributed under the MIT license .