Ori Double-Sided Trailing Stoploss SystemGenerally trailing stoplosses are one sided. Trailing uptrend or downtrend. Also there are continuous trailing indicators that uses same settings for both uptrend and downtrend. It is good for improving the original approach to complete the system but not enough. Seperating values for uptrend and downtrend opening much more possibilities. It is better for sticking to trend and also better for showing your bias towards one side with different stoplevels. There are different options to build the system. You can calculate the stoploss from a moving average. Aka reference ma. Also calculating stoploss method can differ. You can use percentage, atr, standart deviation and ori. Ori is calculating highest and lowest level in a period and dividing it to the period. Others are classic. There is options for their settings. Also there is gap between uptrend stoploss and downtrend stoploss at switch areas, there is an option to decrease this gap in settings. Also you can use reference ma for switching between trends but it is also being used in calculating stoploss level so you may want a different switch mechanism. Aka seperate signal line. Other options are for visual settings such as candle colors. There is an indicator that i wrote "Ori Double-Sided MOST". That one is using reference ma also for signal line. There is no gap reducing and using percentage for calculating. It is easier to use but with less option. You can also improve that indicator in this indicator with more indicators.
Trailingstop
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
Trailing % StopTrailing % Stop is a simple Stop Loss indicator which users have to define a % percent rate to trail the price like MOVING STOP LOSS "MOST" Indicator.
The main difference is MOST refers to exponential moving averages although Trail % Stop refers to source price.
Default price of source is CLOSE price which can be optimized by the user.
"What is a Trailing Stop-Loss?
A trailing stop-loss order is a special type of trade order where the stop-loss price is not set at a single, absolute dollar amount, but instead is set at a certain percentage or a certain dollar amount below the market price. A trailing stop-loss is sometime referred to simply as a trailing stop.
How a Trailing Stop-Loss Works
When the price goes up, it drags the trailing stop-loss along with it, but when the price stops going up, the stop-loss price remains at the level it was dragged to.
A trailing stop-loss is a way to automatically protect yourself from an investment's downside while locking in the upside.
For example, you buy Company XYZ for $10. You decide that you don't want to lose more than 5% on your investment, but you want to be able to take advantage of any price increases. You also don't want to have to constantly monitor your trades to lock in gains.
You set a trailing stop on XYZ that orders your broker to automatically sell if the price dips more than 5% below the market price.
The benefits of the trailing stop are two-fold. First, if the stock moves against you, the trailing stop will trigger when XYZ hits $9.50, protecting you from futher downside.
But if the stock goes up to $20, the trigger price for the trailing stop comes up along with it. At a price of $20, the trailing stop will only trigger a sale if the stock drops below $19. This helps you lock in most of the gains from the stock's rally.
In the example, you could also decide you don't want to lose more than $2 on your $10 investment. If the stock goes up to $20, the trailing stop-loss would drag along behind the price and only trigger a sale if the stock falls to $18.
Why a Trailing Stop-Loss Matters
A trailing stop-loss can be good for investors who may not have enough discipline to lock-in gains or cut losses. It removes some of the emotion from the trading process and offers some capital protection automatically.
There are some drawbacks to consider. First, you need to consider your trailing stop percentage or amount very carefully. If you're investing in a particularly volatile stock, you could find the stop level triggered fairly frequently."
Long Short signals and alarms are also included.
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.
Cyatophilum Ultimate Trading Bot [ALERTSETUP]Private Indicator.
This is an indicator for trading low timeframes . It is generic and configurable meaning you can use it not only on crypto, but also forex, CFD, stocks etc.
HOW IT WORKS
The user chooses between three powerful base strategies: Bollinger Bands + Stoch RSI, RSI Divergences or the SARMA Strategy .
He can also trade support and resistance breakouts , with or without the base strategy.
Use the Alert Setup version to trigger entry and exit alerts .
You can choose between a set of trend lines that will filter trades that are against the main trend in order to increase profitability.
The integrated Trailing Stop Loss will trigger an alert to exit the trade.
You can use the Trailing Take Profit with a configurable % deviation. It will also trigger an exit alert.
SAMPLE USE CASES
XBTUSD 5m BitMEX
XBTUSD 15m BitMEX
ETHUSD 5m BitMEX
ETHUSD 15m BitMEX
USD/WTI 1m IDC (Us Dollar/ WTI Crude OIL)
Backtest below for BITMEX:LTCZ19 in 15m timeframe.
Note: This is the Alert version. You can find the backtest version in my profile.
To get access to the indicator, use the link below, thanks for reading!
Cyatophilum Ultimate Trading Bot [BACKTEST]Private Indicator.
This is an indicator for trading low timeframes . It is generic and configurable meaning you can use it not only on crypto, but also forex, CFD, stocks etc.
HOW IT WORKS
The user chooses between three powerful base strategies: Bollinger Bands + Stoch RSI, RSI Divergences or the SARMA Strategy .
He can also trade support and resistance breakouts , with or without the base strategy.
Use the Alert Setup version to trigger entry and exit alerts .
You can choose between a set of trend lines that will filter trades that are against the main trend in order to increase profitability.
The integrated Trailing Stop Loss will trigger an alert to exit the trade.
You can use the Trailing Take Profit with a configurable % deviation. It will also trigger an exit alert.
SAMPLE USE CASES
XBTUSD 5m BitMEX
XBTUSD 15m BitMEX
ETHUSD 5m BitMEX
ETHUSD 15m BitMEX
USD/WTI 1m IDC (Us Dollar/ WTI Crude OIL)
Backtest below for BITMEX:LTCZ19 in 15m timeframe.
To get access to the indicator, use the link below, thanks for reading!
Ori Double-sided MOST MTFInspired by Anıl ÖZEKŞİ's Moving Stop Loss. This script using similar double sided trailing stoploss logic but i think MOST is not a truly double-sided since you can only select one value for percentage and it uses this value for calculating both sides. In this Double-sided MOST you can set each percentage seperately for uptrends and downtrends.
Toggle for Multi Time Frame
Hide/Show EMA
Toggle for candle colors
Toggle for filling between lines
Toggle for source
Can be applied to other indicators
[STRATEGY] SuperTrendA private strategy from the Profitable SuperTrend preview for backtesting purposes.
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.
Trailing Sl Both Side How To Work? (long Side Stoploss)
This Indicator Calculate Every New Candle Open Price
For Example, Candle Open Price 50 And You Set 1 Point Stoploss Then Your Stoploss Automatically Add
49 Then Next Candle Open Price 52 Your Stoploss Automatically Trail 51 Then Next Candle Price 51.5 But
Your Stoploss 51 Fix Because Price Down But Stop Loss Not Down Without Trigger
Alerts Condition
Long Side Stoploss
1 Click Alerts and By Default Select Symbol
2 Crossing
3 Select indicator
4 select first plot
Short Side Stoploss
1 Click Alerts and By Default Select Symbol
2 Crossing
3 Select indicator
4 select second plot
Trailing SL or TP with Alerts (MV)Hey
Trailing SL or TP with Alerts (MV)
if you want trailing Stoploss Alerts
Alert condition
select by default Symbol
Less Than
Select Trailing SL or TP with Alerts (MV)
Second Plot
if you want trailing Takeprofit Alerts
Alert condition
Select by default Symbol
Greater Than
Select Trailing SL or TP with Alerts (MV)
First plot
FOREX INDIE 15 MIN ONLY WHERE EVER THE GREEN DOT IS THATS THE DIRECTION YOU CAN GO. IF YOU USE THE SL (RED DOT) YOU CAN BUT I PERSONALLY USE MY OWN STOP LOSS.
IF YOUR INTRESTED IN THE INDIE AND HAVING ACCESS PLEASE EMAIL ME.
mickyle2@gmail.com
ATR Trailing Stop Indicator [Chart]I rely on this script for both my live trading and my backtesting process. I couldn’t live without it. It’s extremely simple – all it does is calculate your trailing stop price.
How It Works
The first number in blue is the current ATR (pips). The second number in green is your trailing stop loss price for Long trades, and the third number in red is your trailing stop loss price for Short trades.
For short trades, the stop loss price is calculated by adding the current ATR value to the highest-high of the given lookback period.
For long trades, the stop loss price is calculated by subtracting the current ATR value from the lowest-low of the given lookback period.
Settings
ATR Length:
ATR period (how many candles to include in the calculation).
Use Structure?
If set to true, the script will use swing lows and highs in its calculation. If set to false, the script will ignore swing lows and highs and give you the distance of the ATR from the current candle close instead.
How Far To Look Back For High/Lows:
Candle lookback period for swing high/lows.
ATR X ?:
This controls your ATR multiplier. For example, if you want to use a 2x ATR stop, set this to 2.
Tool Companion:
Here is the tool companion script for this indicator:
Source Code:
Go to zenandtheartoftrading.com for the source code – it’s free!
ATR Trailing Stop Loss IndicatorI rely on this script for both my live trading and my backtesting process. I couldn’t live without it. It’s extremely simple – all it does is calculate your trailing stop price.
How It Works
The first number in blue is the current ATR (pips). The second number in green is your trailing stop loss price for Long trades, and the third number in red is your trailing stop loss price for Short trades.
For short trades, the stop loss price is calculated by adding the current ATR value to the highest-high of the given lookback period.
For long trades, the stop loss price is calculated by subtracting the current ATR value from the lowest-low of the given lookback period.
Settings
ATR Length:
ATR period (how many candles to include in the calculation).
Use Structure?
If set to true, the script will use swing lows and highs in its calculation. If set to false, the script will ignore swing lows and highs and give you the distance of the ATR from the current candle close instead.
How Far To Look Back For High/Lows:
Candle lookback period for swing high/lows.
ATR X ?:
This controls your ATR multiplier. For example, if you want to use a 2x ATR stop, set this to 2.
Chart Companion:
Here is the chart companion script for this indicator:
Source Code:
Go to zenandtheartoftrading.com for the source code – it’s free!
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).