FRAMA - Supertrend strategyFRAMA Strategy
I found this strategy on internet, in a well-known forex forum.
I have translated the two indicators mentioned in that strategy (originally in mq4) in pine script.
Thanks to Fractured and Shizaru for the FRAMA snippets, to mejialucas for Supertrend snippet, to JayRogers for trade management snippet and to Trost for backtesting snippet.
I also added some code to have FRAME with a deiiferent timeframe
Indicators set-up:
FRAMA period 24 (it was originally 25 but it's better to use an even number)
FRAMA timefarme lower then chart timeframe (e.g. daily chart and weekly FRAMA)
Supertrend indicator as it is.
Of course, it is better to adapt above setting to traded instrument.
Long/Buy rules:
1 - Enter at crossover between FRAMA and its signal
2 - Option to filter entries based on supertrend signal
3 - Exit when Supertrend change direction;
4 - Exit long when short signal occurs;
Short/Sell rules:
1 - Enter at crossunder between FRAMA and its signal
2 - Option to filter entries based on supertrend signal
3 - Exit when Supertrend change direction;
4 - Exit short when long signal occurs;
VERY IMPORTANT NOTE: this is a trend following strategy, so the target is to stay in the trade as much as possible (drawdown my be high). If your trading style is more focused on scalping and/or pullbaks, this strategy is not for you.
Credits to who developed this startegy (google it).
Thanks to all pinescripters mentined in the code for their snippets.
I have also a study with alerts.
Please use comment section for any feedback or contact me if you need support.
Supertrend
Supertrend MTF Heikin AshiThis is non-repaiting Supertrend Multi Time Frame script, uses Heikin Ashi Candles as source on normal chart
There is an option for Higher Time Frame. if you choose "Auto" then Higher Time Frame calculation is made by the script. If you choose "User Defined" option and then you can select Time Frame.
You better use this script with other indicators such as RSI, Momentum etc.
Enjoy!
SupertrendAn implementation of the supertrend indicator as it'll be implemented in build-in pine function
Supertrend calculates two values:
-supertrend
-direction
using the direction resistance and support are plotted.
Best Supertrend CCI StrategyHello traders
Someone requested the strategy version of the Supertrend CCI indicator
It's a Supertrend not based on candle close but based on a CCI ( Commodity Channel Index )
How does it work?
Bull event: CCI crossing over the 0 line
Bear event: CCI crossing below the 0 line
When the event is triggered, the script will plot the Supertrend as follow
UP Trend = High + ATR * Factor
DOWN Trend = Low - ATR * Factor
This is an alternative of the classical Supertrend based on candle close being above/beyond the previous Supertrend level.
Hope you'll enjoy it and it will improve your trading making you a better trader
Dave
[LunaOwl] 超級趨勢2 (SuperTrend2)It is very similar to the previous version. I changed the function from study to a strategy, and added the Average true range to RMA again.
I don't know the academic suitability, but using this strategy to trade the Altcoins market may have a good effect.
refer to Binance for 0.1% of fees, starting from Q4 2017.
跟以前的版本變化不大,我將腳本函數從"study"更改為"strategy",然後將平均真實範圍再次用遞迴平均線均化數值。
不知道學術上的適不適合這麼做...但是,直到目前交易小幣現貨市場,效果還算不錯,用用看。
交易手續費參考幣安小幣,0.1%,從2017年第四季開始測。
Updated:
--1. use RMA to reduce ATR noise.
--2. for the highly volatile Altcions market, strategy should focus on reducing noise.
--3. the Street commonly used alpha filtering for Random Walk.
--4. compared to other MAs, the performance is not outstanding, but the advantage is stability.
--5. I choose the 4H time frame to test the Altcoins (ex: ETH).
稍做更新:
--1.平均真實區間利用了遞迴均線減少雜訊
--2.針對高波動率的小幣市場,中期順勢策略應該以減少雜訊為重點
--3.研究國外交易策略後,它們常用平滑因子過濾隨機走勢
--4.績效上和其它平均法比較並沒有突出,但優點是參數變動穩定性
--5.我選擇四小時線回測小幣市場,並且選擇經歷過牛熊市的以太坊
The purpose of publishing Chinese Scripts is to make Pine close to more Chinese user.
發布中文腳本的目的,是希望可以讓 Pine 親近更多中文圈的使用者。
Variable Cloud - evoA Super Trend based on the high and low of a Moving Average, to get an easy view what the current trend is and where to buy and sell.
TIPS
- The 'Closing Source' option is the candle value that triggers the clouds. 'High/Low System' means that a downtrend is over when the candle LOW closes greater than the downtrend (dark cloud), an uptrend is over when the candle HIGH closes less than the uptrend (light cloud). The other options speak for themselves.
- Ideally place your stop loss outside the cloud, as you want to stay in the trend until it breaks to the opposite direction (but that's up to you of course).
- Reversal trades are low probability, you can see them as reversals or ranging before the market continues, I like to lower my risk on those set ups till it breaks the dominant trend.
Here are the scripts I used:
Everget's SuperTrend
LazyBear's VMA
Thanks LazyBear and Everget, I learn a lot from your scripts :)
Variable SuperTrend - evoPlayed around with Lazy Bear's VMA and Gunazzi's SuperTrend Cloud .
It plots an uptrend if the low of a candle gets above the recent downtrend and plots a downtrend if the high of a candle gets below the recent uptrend, you have to wait for the candle to close to confirm the actual trend change.
I use it to give me a direction for longs or shorts, not as a stop/reverse indicator.
Thanks Lazy Bear and Gunazzi :)
BEST Supertrend MAHello traders,
That one is an experiment
I was curious to see what a supertrend based on moving average cross could give
How does it work?
Bull event: fast moving average crossing over the slow moving average
Bear event: fast moving average crossing under the slow moving average
When the event is triggered, the script will plot the Supertrend as follow
UP Trend = ohlc4+ ATR * Factor
DOWN Trend = ohlc4- ATR * Factor
Interesting to see the results given by ohlc4 vs hl2 and hl3
Documentation: www.tradingview.com
This is an alternative of the classical Supertrend based on candle close being above/beyond the previous Supertrend level.
Hope you'll enjoy it and it will improve your trading making you a better trader
Dave
BEST Supertrend CCIHello traders
Today I present you a Supertrend not based on candle close but based on a CCI (Commodity Channel Index)
How does it work?
Bull event: CCI crossing over the 0 line
Bear event: CCI crossing below the 0 line
When the event is triggered, the script will plot the Supertrend as follow
UP Trend = High + ATR * Factor
DOWN Trend = Low - ATR * Factor
This is an alternative of the classical Supertrend based on candle close being above/beyond the previous Supertrend level.
Hope you'll enjoy it and it will improve your trading making you a better trader
Dave
BEST Supertrend StrategyHello traders
Sharing a sample Supertrend strategy to illustrate how to calculate a convergence and using it in a strategy
I based the setup as follow:
- Entries on Supertrend MTF breakout + moving average cross. Entering whenever there is a convergence
- exit whenever a Simple Moving Averages cross in the opposite direction happen
- possibility to filter only Longs/Shorts or both
All the best
Dave
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
Trend-Following Combo-SuperTrend, EMA, Aroon, DMI, Laguerre RSIThis is a trend-following indicator which condenses two SuperTrend indicators -- one based on analysis over a shorter period of time (1.5, 7), and one based on analysis over a longer period of time (1.65, 100) -- into a single indicator which appears on your chart only when both the shorter- and longer-term analysis indicates a "SuperTrend" in the same direction.
Additionally, potential trade entry indicators are displayed in the form of up and down arrows when (by default) three of the following five indicators suggest that the market is trending in the same direction as both the shorter- and longer-term SuperTrend indicators:
EMA Crossover (8, 15)
Aroon Indicator (8)
Aroon Oscillator (8)
Directional Movement Index (DI +/-) (8)
Laguerre RSI (13)
You may update the parameters of any of the indicators to match your own preferences.
Additionally, you may also adjust the "Threshold" of indicators that must be in agreement with the SuperTrend to show a potential trade entry arrow. Bear in mind that if you set the Indicator Threshold too low, you will see more frequent trade entry arrows, many of which will not be profitable if taken. Similarly, set this value too high, and you will see fewer trade entry arrows that may not appear until after most of the "juice" in the trend has evaporated. Ideal values for the threshold seem to be between 2-4, depending on the symbol you are trading.
The following image shows all of the indicators referenced above on a 5-minute chart of the SPY during a single trading day:
And, here is the same period of time showing only the Trend-Following Combo indicator with default settings:
This indicator would not have been possible save for work contributed by the following:
SuperTrend by Rajandran R
Aroon w/ crossovers highlighted by seiglerj
Aroon Oscillator by jcrewolinsky
Directional Movement Index by TradingView
Laguerre RSI (Self Adjusting Alpha with Fractals Energy) by everget
Super Trend Daily 2.0 Alerts BFThis is an alerts script for my Super Trend 2.0 indicator . It is intended as a companion script so you can backtest using the Strategy script and generate alerts using this Study script.
This Study script has the same default settings as the Strategy script and its only purpose is to provide alerts for the long and short signals the Strategy generates. Obviously, if you want to generate alerts based on a Strategy backtest, please ensure the settings are the same in the Study as in the Strategy.
For illustration, I have plotted arrows on the chart for long and short signals, and also colored the background to show when the rate of change function determines a choppy/sideways market.
ALERTS
There are 2 alerts set up:
Long Entry
Short Entry
ILLUSTRATION
Green arrow = Long Entry
Red arrow = Short Entry
White background = No short trades
Aqua background = No long trades
EXAMPLE USE CASE
1. Open a Bitcoin/USD chart on 1D timeframe.
2. Open this script and the Super Trend 2.0 indicator script.
3. Backtest with the Strategy Backtester and change the settings if you like until you get a desirable outcome for your own purposes.
4. Once you are happy with the backtest, change the settings in the Alerts script (this one) so they match the Strategy settings.
5. Set up the alerts according to your preferences.
Centerline SupertrendA centerline/non-chart indicator version of Everget's Supertrend script for use in NNFX-style indicator setups, with the emphasis on this indicator NOT adding visual clutter to the main charting area with a baseline indicator already present.
This is literally the EXACT same script as Everget's Supertrend, but not drawn on the chart and with the fill/stop and fill/state level removed.
Adjust to your timeframe/asset and backtest/forward-test accordingly.
Source script by Everget (Supertrend):
SuperTrend Strategy This is almost the same strategy that Alex Orekhov (everget) sells to unnoticed newbies... The only thing he added was a tool that analyses the better performance of the indicator, that is the difference from his script, and i dont have it here, what i have is what is freely distributed in many communities... But as i follow him for more than 1 year i saw that theese configs. In more than 95% of the time range betweern 7.2-6.8 with the most common settings the 7-7
So i made a description of each part of the code that i WRITED and is free and i am just using the configs that are public in Alex Orekhov (everget) profile. If it is public the configs he use in his charts and he is not the owner of the code right? Also the code is very easy to find in google in the MQL5 community or in a lot of videos in youtube.
He charges $10 for a 4 day trial (LOL) and $100 for this shit.
Here is a strategy that has a correlation with 95% of the time of the Profitable Strategy that he sells.
SuperTrend BacktesterThis is a backtesting script for the famous Super Trend.
Features
- Custom Date Range
- Custom Targets and Risks
Requested by Dlatrella
Super Trend Daily 2.0 BFThis is my Super Trend Daily strategy but with one important difference. You can now adjust settings for long or short signals individually and separately. For example, the condition for a long signal may require a different parameter setting than the condition for a short signal. Each parameter in the signal generation can be tuned. You can also decide what kind of stop loss you want for each side - you could have a fixed stop loss for longs and an ATR derived stop loss for shorts, or whatever.
We also have the option to choose if we want longs, shorts or both.
INISTRUCTIONS
Look at the background colors:
Green line = long signal
Red line = short signal
Aqua = No long trades
White = No short trades
Yellow dotted line = stop loss for long
Orange dotted line = stop loss for short
The aqua and white backgrounds mean the conditions are choppy/sideways according to our settings we applied to the rate of change function for a long/short signal respectively. It is possible to get a long signal in a white background, but not a short signal. Similarly, it is possible to get a short signal in an aqua background, but not a long signal.
This is a work in progress so any suggestions for improvements are welcome.
Super Trend Daily BF 🚀Super Trend is based on volatility and attempts to show the overall greater trend of a market. Thanks to everget for the idea of improving the Super Trend code. Thanks to kiasaki for ROC code.
The idea here is to enter a trade upon trend reversal (unless we have a white background - this indicates choppy/sideways market).
INSTRUCTIONS
Follow the background color for signals of a trend reversal.
Bright green = long
Bright red = short
White = no trade
We use a fixed stop loss here of 6% but I have included the option to apply an ATR based stop loss in Settings. No take profit. No re-entering until we get an opposing signal.
I use a Rate of Change function to detect when we should stay out due to choppy sideways price action.
This strategy was optimised for XBT/USD on Bitmex 1 day chart, ideal settings for other pairs will differ.
SuperC BF 🚀Based on some code from noro and kiasaki - thank you.
A Super Trend is a trend over a long period of time. There are lots of existing scripts that generate signals based on the overall direction of an instrument. What if we combined this idea with a measure of Money Flow and added a filter to try to avoid choppy sideways action?
I started with a super trend foundation and added an MFI calculation to account for volume flowing into and out of the asset. Then added a Rate of Change function to stay out of trades when there is not much up/down movement.
INSTRUCTIONS
Bright green background = go long
Bright red background = go short
COLOR OVERVIEW
A white background means we don't trade
A green background means we have a long condition
A red background means we have a short condition
The cloud is green when we have a long condition, red when we have a short condition.
The cloud is yellow if we should be in a long already but the current candle is not satisfying all long conditions.
The cloud is orange if we should be in a short already but the current candle is not satisfying all short conditions.
The line at the bottom is MFI - this is green when the current candle is greater than the last, red when it is less than the last.
SIGNAL GENERATION
A long condition is when MFI > MFI AND we are not in a choppy market AND when price is above the super trend.
A short condition is when MFI < MFI AND we are not in a choppy market AND when price is below the super trend.
We use a fixed Stop Loss of 2% here on the daily timeframe for XBT/USD.
If we get stopped out from a long and we still have the conditions for a long, we re-enter. Same for short.
SuperTrend Cloud StrategyExperimental strategy to improve accuracy of SuperTrend Cloud. I am attempting to use STD deviation to manipulate the multiplier of the SuperTrend cloud. Greater STD Deviation = Oscillation in price action which can be applied to multiplier of SuperTrend to filter out bad trades and improve accuracy.
Williams Vix Fix paired with Supertrend HeatmapThis script shows my mod of the powerful Williams' Vix Fix indicator paired with a modified Supertrend Heatmap, originally created by Daveatt.
Supertrend MTF Heatmap V2Hello traders and aspiring Pinescripters
You might remember this script Supertrend-Heatmap-Multi-timeframes/ ?
A follower, asked me in a comment to do a version where YOU guys can select the timeframes
Well... what follower asks, follower (sometimes) gets. I'm not Santa Claus but this is Christmas with a few months in advance (#oh #oh #oh)