Linear Trailing StopBased on my latest script "Linear Channels"
This is a trailing stop version of the linear channels. Thanks to capissimo for helping me fix several issues with the linear extrapolation part.
In order to know how the indicator work i recommend reading the post on the Linear Channels indicator here
Hope you like it and feel free to leave your suggestions :)
Trailingstop
RePaNoCHa V4 [Alerts]Script for automatic trading with Alerts.
LG --> Long (green: not confirmed) (lime: confirmed)
ST --> Short (maroon: not confirmed) (red: confirmed)
TS --> Trailing Stop
xL --> Close Long Position
xS --> Close Short Position
SL --> Stop Loss
The trailing stop closes the trade if the price changes direction by a specified percentage or offset. There is no ideal distance because markets and price are always changing and we know that is impossible to exit on the top or bottom. This script interpolate the trailing Stop Offset with profit, higher profit --> higher Trailing Stop Offset. Despite this, it's difficult to catch the price but not impossible. It has a TS delay too. It take a snapshot every X seconds, if the TS is activated the alert is triggered, otherwise the price keeps fluctuating until a new snapshot.
It can be easily converted to Backtest. Just delete "//" on the corresponding part.
Default settings for XBT:USD at 1H.
Trade Manager (Open Source Version)Hello my young padawans looking for the FORCE to get richer on your next trade
I got pinged at least three times today asking where the hell is the indicator of the day. You asked, I delivered :)
Here's your free open-source Trade Manager Version. My associates might kill me for sharing that one... anyway this is a real GIFT.
I won't share such quality indicators too often for FREE so hope you'll appreciate its value. It can really help with your day to day trading (on top of making your charts looking more awesome)
This is an even better version compared to my previous Trade Manager Trade-Manager . It's basically a standalone version, meaning you'll have to update with 2 lines your own indicator and follow my educational post from yesterday (pasted it below also) to learn how to do it
Please read this educational post I published for you before proceeding further : How-to-connect-your-indicator-with-the-Trade-Manager
From here you normally connected the data source of your own indicator to the Trade Manager. If not, here's a reminder of the article mentionned above
Step 1 - Update your indicator
For the screenshot you see above, I used this indicator : Two-MM-Cross-MACD/ . "But sir are you really advertising your other indicators here ??" ... hmmm.... YES but I gave them for free so ... stop complaining my friend :)
Somewhere in the code you'll have a LONG and a SHORT condition. If not, please go back to study trading for noobs (I'm kidding !!!)
So it should look to something similar
nUP = ma_crossover and macd_crossover
nDN = ma_crossunder and macd_crossunder
What you will need to add at the very end of your script is a Signal plot that will be captured by the Trade Manager. This will give us :
// Signal plot to be used as external
// if crossover, sends 1, otherwise sends -1
Signal = (nUP) ? 1 : (nDN) ? -1 : na
plot(Signal, title="Signal")
The Trade Manager engines expects to receive 1 for a bullishg signal and -1 for bearish .
Step 2 - Add the Trade Manager to your chart and select the right Data Source
I feel the questions coming so I prefer to anticipate :) When you add the Trade Manager to your chart, nothing will be displayed. THIS IS NORMAL because you'll have to select the Data Source to be "Signal"
Remember our Signal variable from the Two MM Cross from before, now we'll capture it and.....drumb rolll...... that's from that moment that your life became even more AWESOME
The Engine will capture the last signal from the MM cross or any indicator actually and will update the Stop Loss, Take Profit levels based on the parameters you set on the Trade Manager
It should work with any indicator as long as you're providing a plot Signal with values 1 and -1 . In any case, you can change the Trade Manager you'll find a better logic for your trading
Now let's cover the different parameters of the tool
It should be straightforward but better to explain everything here
+Label lines : if unchecked, no SL/TPs/... will be displayed
+Show Stop Loss Signal : Will display the stop loss label. You have the choice between three options :
By default, the Stop Loss is set to NONE. You'll have to select a different option to enable the Stop Loss for real
++Percentage : Will set the SL at a percent distance from the price
++Fixed : SL fixed at a static price
++Trailing % : Trailing stop loss based on percentage level
The following is a KEY feature and I got asked for it many times those past two days. I got annoyed of getting the same request so I just did it
++Trailing TP: Will move the Stop Loss if the take profit levels are hit
Example: if TP1 is hit, SL will be moved to breakeven. If TP2 is hit, SL will be moved from TP1 to TP2
+Take Profit 1,2,3 : Visually define the three Take Profit levels. Those are percentage levels .
Meaning if you set TP1 = 2, it will set the TP1 level 2% away from the entry signal
Please note that once a Take profit level is reached, it will magically disappear. This is to be expected
I'll share in the future a way more complete version with invalidation, stop loss/take profits based on indicator, take profit based on supports/resistances, ...
I believe is such a great tool because can be connected to any indicator. I confess that I tried it only with a few... if you find any that's not working with the Trade manager, please let me know and I'll have a look
PS
I want to give a HUUUUUUUGE shoutout to the PineCoders community who helped me finishing it
Wishing you all the best and a pleasant experience with my work
David
IFTS+TS Strategy OverlayInverse Fisher transform on stochastic with Hull MA and Donchian Channels with oversell/overbuy levels and dynamic trailing stop
Options:
Fixed trailing stop
Dynamic, based on ATR trailing stop
Re-enter after trailing stop
Includes Hull MA
Hull MA filtration for re-entering after trailing stop
Donchian channels, with overbuy/oversell levels
No repaints
Adaptive Autonomous Recursive Trailing StopIntroduction
Trailing stop are important indicators in technical analysis, today i propose a new trailing stop A2RTS based on my last published indicator A2RMA (1), this last indicator directly used an error measurement thus providing a way to create enveloppes, which provide a direct way to create trailing stops based on highest/lowest rules.
The Indicator
If you need a more detailed explanation of this indicator i encourage you to check the A2RMA indicator post i made, parameters does not differ from the supertrend, thus having a length parameter and a factor parameter who is here described as gamma , gamma control how far away are the bands from each others thus spotting longer terms trends when gamma is higher.
On BTCUSD
Something worth mentioning is that the indicator sometimes behave like my MTA trailing stop indicator (2) who is closer to the price when a trend persist thus providing early exit points, however A2RTS behave a bit better.
Price can sometimes break the trailing stop, this can be interpreted as a support/resistance or just as an exit point, the support resistance methodology on trailing stop is not the most recommended.
Sometimes it is recommended to have an higher length rather than an high gamma like in this case for INTEL CORP, below gamma = 3 and length = 20
The microprocessor market like to use higher length's instead of higher gamma's , A2RMA is a non-linear filter, this would explain such behaviour.
Conclusion
Trailing stops might not suffer as much from whipsaw trades than MA crossovers but they still remain inefficient when market is not trending, results of the proposed indicator on major forex pairs are more than disappointing, but i hope this will serve as basis for other trailing stops that might act a little bit better. I conclude this post by thanking everyone who support my work and i encourage you to modify this indicator and share it with the community.
Thanks for reading !
Cited Articles
Supertrend collectorHello traders
This is an example of how you can add multiple indicators into a unique one
In this instance, I added two supertrend multitimeframes and draw them on a different timeframe chart
Enjoy
David
IFT Stochastic + Trailing StopInverse fisher transform on stochastic strategy with trailing stop. Good work on flats with mid-wave length
Modular Filter - Spot Trends And Smooth PriceIntroduction
This indicator can have a wide variety of usages, and since it is based on exponential averaging then the whole indicator can be made adaptive, thus ending up with a really promising tool. This indicator who can both smooth price and act as a trailing stop depending on user preferences, i tried to make it as reactive, stable and efficient as possible in order to both smooth and spot trends, lets view it more in depth.
The Indicator
line 8 and 9 create two bands, one upper and one lower, then based on certain conditions the indicator will only return a certain band or an average of both with different weights, this weight is controlled by the beta parameter, values of 1 will return a simple filter while values of 0 will return a classical trailing stop.
beta = 0
The indicator can use output values as input, thus using smoother values as input, in order to do so just check "Feedback", this help the overall output to be smoother as well as giving more long terms signals
The amount of feedback is controlled by the feedback weighting parameter, lower values will weight more the output values thus creating smoother results.
Feedback weighting of 0.2
Using beta = 0 thus having the indicator act as a trailing stop while having the feedback option activated return more long terms signals. Notes that the colors are based on the initial conditions of the indicator.
Conclusion
You can replace length and change alpha for any smoothing variable such as the efficiency ratio or anything with scale (1,0), same goes for beta and the feedback weighting parameter, this is why the indicator is "Modular" in addition of providing different usages. This indicator can look like cluster filters (smooth price monarch, forexguru) , filters with the ability to follow the price quite fine while being stables. I really hope you find an use to it.
Thanks for reading !
Bollinger Band stops - JDI didn't find a BB stops indicator on TV, so I wrote one myself.
You can select various ma types as a base anchor for the calculations.
This indicator can have various use cases similar to Supertrend or Parabolic SAR: as a trend indicator, as a training stop loss,...
JD.
Combo Strategy 123 Reversal & Average True Range Trailing Stops This is combo strategies for get
a cumulative signal. Result signal will return 1 if two strategies
is long, -1 if all strategies is short and 0 if signals of strategies is not equal.
First strategy
This System was created from the Book "How I Tripled My Money In The
Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
The strategy buys at market, if close price is higher than the previous close
during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
The strategy sells at market, if close price is lower than the previous close price
during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
Secon strategy
Average True Range Trailing Stops Strategy, by Sylvain Vervoort
The related article is copyrighted material from Stocks & Commodities Jun 2009
WARNING:
- For purpose educate only
- This script to change bars colors.
Modified Gann HiLo ActivatorIntroduction
The gann hilo activator is a trend indicator developed by Robert Krausz published into W. D. Gann Treasure Discovered: Simple Trading Plans for Stocks & Commodities . This indicator crate a trailing stop aiming to show the direction of the trend.
This indicator is fairly easy to compute and dont require lot of skills to understand. First we calculate the simple moving average of both price high and price low, when the close price is higher than the moving average of the price high the indicator return the moving average of the price low, else the indicator return the moving average of the price high if the close price is lower than the moving average of the price low.
My indicator add a different calculation method in order to avoid whipsaw trades as well as adding significance to the moving average length. A Median method has been added to provide more robustness.
The Indicator
The indicator is a simple trailing stop aiming to show the direction of the trend. The indicator use a different source instead of the price high/low for its calculation. The first method is the "SMA" method which like the classic hilo indicator use a simple moving average for the calculation of the indicator.
Sma Method with length = 25
The "Median" use a moving median instead of a simple moving average, this provide more robustness.
Median Method with length = 25
The shape is less curved and the indicator can sometimes avoid whipsaw with high's length periods.
Mult Parameter
The mult parameter is a parameter set to be lower or equal to 1 and greater or equal to 0. High values allow the indicator to be far from the price thus avoiding whipsaw trades, lower ones lower the distance from the price. A mult parameter of 0.1 approximate the original hilo indicator.
In blue the indicator with mult = 0.1 and in radical red the original hilo activator.
Conclusion
The modifications allow more control over the indicator as well as adding more robustness while the original one is destined to fail when market price is more complex.
Thanks for reading :)
For any questions/suggestions feel free to pm me
Flagging BandsIntroduction
A pun between the word flag and the adjective flagging (less dynamic) , this indicator have two bands who react faster when in contact to the price. Imagine you are under sheets, if you abruptly rise, the sheets will instantaneously go up, then if you abruptly get down, the sheets will fall slowly until being in contact with a surface, this is because of a type of friction called drag or air resistance , this force is described in fluid dynamics and i inspired myself from that for the creation of the indicator.
The indicator
The indicator is made of two bands, one upper band and one lower band, then a weighted average of each bands, this average is weighted depending on which band the price is closer. The length control the period of the indicator, in general higher lengths will create wider bands, you must consider that this parameter behave differently than other ones and may create slower results in comparison with other bands indicators while having the same length period.
The indicator can use a simple breakout methodology (see trailing stop part) but can sometime provide support and resistance points, in fact i believe that when the average variability/volatility of band A is higher than the average variability/volatility of band B and that the price cross band B then price will reverse its direction, this claim is not justified, research is needed.
Trailing Stop Mod
It is possible to make the indicator act as a trailing stop, in order to do so just tick the trailing stop mod box.
The average/bands will automatically disappear being replaced by the trailing stop.
Conclusion
I was just playing around when making the skeleton of the indicator, i hope the code is easy to understand, if you need some kind of explanation just pm me, i'm always open to help people/receive suggestions.
Best Regards
Move Up StopsThis script creates a stop loss level and then moves it up in 5% increments as prices increase.
Basically, it checks to see if the lowest low of the last 7 days is above a certain level. If yes, it sets the stop at that level. It then checks for the next highest level and keeps going until the price is not above a level. Those variables are then set to the level below them.
Trailing stops are notorious for skewing backtest results. This script avoids that problem. Also, some exchanges do not offer trailing stops, so this script gives you a signal to let you know its time to manually move your stops up.
I will be using this for swing trades involving both crypto and stocks.
Parabolic SARThis is a redesign of the built-in Parabolic SAR indicator. I added a proper input system, an option to highlight initial points for both lines and an option to choose points width. So, customize it as you want.
Parabolic SAR was originally developed by J. Welles Wilder and described in his book "New Concepts in Technical Trading Systems" (1978). It is a trend-following indicator that can be used as a trailing stop loss.
To know which settings for PSAR are the most profitable on your instrument and timeframe you can use this tool
Profitable Parabolic SAR
MTA-Traling StopIntroduction
Based on my previous indicator , this indicator plot a trailing stop using classic conditions.
Using The Indicator
Like any trailing stop when price is higher than the trailing stop this imply a buy signals, when price is lower than the trailing stop this imply a sell signal. It is possible to use decimals instead of integers for length as shown here :
length = 14.7
The indicator tend to react faster to price movements when a trend has been really long, this methodology is similar to the one used by the parabolic sar.
Downsides
Lack of robustness with the length parameter, the behaviour of the trailing stop can be hard to predict. There is a real need for control.
Conclusion
The indicator can be adaptive, even if it already is in a certain way, by changing the alpha variable at the start considering that 0 < alpha < 1. Its not recommended to use it right now except for testing/coding purpose.
It is clear that i'm not enthusiast when it come to this script, there is a real lack of accuracy, i still hope it can be of use.
Chandelier ExitThis is a redesign of the Chandelier Exit indicator. It removes stupid transitions between Chandelier Exit' states and highlights initial points for both lines.
This indicator was originally developed by Charles Le Beau and popularized by Dr. Alexander Elder in his book "Come Into My Trading Room: A Complete Guide to Trading" (2002).
In short, this is a trailing stop-loss based on the Average True Range (ATR).
SuperTrendThis is a redesign of the SuperTrend indicator. It removes stupid transitions between SuperTrend states and highlights initial points for both lines.
SuperTrend is a moving stop and reversal line based on the volatility (ATR).
Trailing Stop Loss MTFMultiple Time Frame Version of Trailing Stop Loss Indicator
TRAILING STOP LOSS INDICATOR is a helpful tool for traders to help one of the greatest problems that they face: where to sell?
by using trailing stop loss you can easily decide and see possible downward movements and understand if you are in a safe zone.
Using Trailing Stop Loss is just simple:
Go short/ Sell when price crosses down the indicator,
Stay on long position if prices are above the indicator.
The indicator is calculated from previous Lows and doesn't the value won't change until prices makes higher lows.
TURKISH EXPLANATION:
İz Süren Stop Loss İndikatörü
Adım 1- bu günün düşük fiyatından geriye doğru, daha düşük fiyatlı bir günle karşılaşıncaya kadar yatay bir çizgi çizin
bu sizin birinci countback’ iniz olacak.
Adım 2- bu yeni düşük günün düşük fiyatından geriye doğru tekrar bir başka düşük güne gelene kadar yatay bir çizgi
çekin. Bu sizin ikinci countback’ iniz olacak.
Adım 3- bu ikinci düşük günün düşüğünden ileri bu günkü tarihe kadar yatay bir çizgi çekin bu sizin talimat
verdiğinizde stop-loss noktanız oluyor.
Kural 1- asla aşağıya doğru stop koymayın. Eğer yeni stop-loss noktanız öncekinden daha düşükse onu atıyorsunuz.
Bu kural asla bozulmamalı.
Kural 2- countback çizginiz üzerindeki aynı düşük fiyata denk gelen günleri yok sayın. İkinci contback çizginizi çekmek
için ilkinden daha düşük bir nokta bulmalısınız. Eğer aynı düşük fiyata sahip bir çubuğa denk gelirseniz daha düşüğünü
buluncaya kadar devam edin. Gerçekten hepsi bu kadar. Bu kuralları uygulayarak stop-loss noktamızı her yeni günün
datası eklendikçe uzatabiliriz.
drive.google.com
SuperTrend ATR + RSI with signalThis is an updated version of Crée par J.Dow's very interesting indicator- myself and Squiggles added the alert function in there. The original description and explanation can be seen here.
Some settings work better than others on different timeframes- have a play around, I'd be interested in seeing what optimum settings you might be able to find.
ATR Trailing Stop Bands Strategy [R] Originally based on a script by HPotter for an ATR Trailing Stop, which itself was based on an article by Sylvain Vervoort, but I adapted it to add Bands, to add extra optional Wick Protection, and have now made it a Strategy. It's not great for entries/exits, but as a Trailing Stop that can let winners ride, it's great.