3RSI 3CCI BB 5orders DCA strategy+This strategy is just an attempt to find the indicator values for the trading bot service that I use (link in profile). Due to the use of the “request.security” function in the code, the indicators can be redrawn, but this is not important in history. The strategy used only 5 orders for the "DCA" - bot, located at the same distance in the price overlap range. I only use this strategy when trading in pairs against bitcoin.
Эта стратегия – просто попытка подобрать значения индикаторов для сервиса торговых ботов, который я использую (ссылка в профиле). Из-за использования в коде функции «request.security» возможна перерисовка индикаторов, но на истории это не важно. В стратегии использовано всего 5 ордеров для «DCA» - бота, находящихся на одинаковом расстоянии в диапазоне перекрытия цены. Я использую данную стратегию только при торговле в парах к биткоину.
Oscillators
Zendog V3 backtest DCA bot 3commasMAJOR UPDATE:
- Update to Pinescript v5
- MAJOR refactor for the logic of how orders are placed. BO order is placed when the condition is first encountered and we are not in a deal.
The extra SO orders (if based on price movement) are all placed on the next candle after BO order, instead of each being placed one after another.
Take profit (if percentage) and Stop loss are placed on the first candle after BO order because if BO and TP are on the same candle TV does not execute properly.
These changes should improve strategy accuracy when multiple prices are hit by the same candle.
- NEW FEATURE: Support to Stop deal using an external indicator (i.e. stop long deal when RSI > 80)
- NEW FEATURE: Support to trigger Safety orders using an external indicator (i.e. trigger each additional SO when RSI < 10, regardless of price movement)
The price movement logic may be implemented in the indicator that plots start / end signals. The SO size is calculated using the configuration of steps.
- NEW FEATURE: Safety order command for 3commas bot. This is implemented using Add funds in the quote currency (for pair BTCUSDT the quote currency is USDT)
The SO size is calculated using the configuration of steps, for exact order size (and price) use the built-in Steps table.
- NEW FEATURE: Addition of extra columns to the steps table: Required price for TP, Required % change for TP, Required % change for BEP (Breakeven point)
- Update to steps table to remove prices when Safety orders are not based on % price change
- The code is opensource. I will not be able to sustain merges for the script, but feel free to use and develop your own version and ping me on discord to review them
and maybe include in the original script
Contrarian Scalping Counter Trend Bb Envelope Adx and StochasticContrarian Scalping is an trading strategy designed to take advanted of a counter-trend.
The advantage of these strrategies types is that they have a good profitability but with do not great gain (in relation at the time frame).
Indicators used:
Bollinger
Envelope
ADX
Stochastic
Rules for entry
For short: close of the price is above upper band from bb and envelope, adx is below 30 and stochastic is above 50
For long: close of the price is below lower band from bb and envelope, adx is below 30 and stochastic is below 50
Rules for exit
For short: either close of the candle is below lower band of bb or enveloper or stochastic is below 50
For long: either close o the candle is above upper band of bb or envelope or stochastic is above 50
If there are any questions let me know !
RSI Average Swing BotThis is a modified RSI version using as a source a big length(50 candles) and an average of all types of sources for candle calculations such as ohlc4, close, high, open, hlc3 and hl2.
In this case we are going to use a 0-1 scale for an easier calculation, where 0.5 is going to be our middle point.
Above 0.5 we consider a bullish possibility.
Below 0.5 we consider a bearish possibility.
I made a small example bot using that initial logic, together with 2 exit points for long or short positions.
If there are any questions, let me know !
RSI %b Signal [H1 Backtesting]-----------------------------------------------------------------
This simple strategy base on RSI, EMA, Bollinger Bands to get Buy and Sell Signal with detail as below:
-----------------------------------------------------------------
1.Define Oscillator Line
+ Oscillator Line is smoothed by ema(28) of RSI(14) on H1 Timeframe
2.Define Overbought and Oversold
+ Apply Bollinger Bands BB(80,3) on Oscillator Line and calculate %b
+ Overbought Zone marked above level 0.8
+ Oversold Zone marked below level 0.2
3.Buy Signal
+ Entry Long Position when %b crossover Point of Entry Long
+ Deafault Point of Entry Long is 0.2
+ Buy signal marked by Green dot
4.Sell Signal
+ Entry Short Position when %b crossunder Point of Entry Short
+ Deafault Point of Entry Short is 0.8
+ Sell signal marked by Red dot
5.Exit Signal
+ Exit Position (both Long and Short) when %b go into Overbought Zone or Oversold Zone
+ Exit signal marked by Yellow dot
-----------------------------------------------------------------
Joint Conditions Strategy Suite + TradingConnector alerts bot"Please give us combined alerts with the possibility of having several conditions in place to trigger the alert." - was the top voted request from users under one of the recent blogposts by TradingView.
Ask and you shall receive ;)
TradingView is a great platform, with unmatched set of functionalities, yet this particular combo of features indeed seems not to be in place. Fortunately, TradingView is also very open platform, thanks to PineScript coding language, which enables developing combos like the requried one and plenty of other magic.
I have already published numerous "educational" scripts, showing how to code indicators and alerts with PineScript, but... this is not one of them. This one is for real. READY FOR USE on real markets, also by the non-coding traders. Just take my script, set parameters with dropdowns, backtest the strategy, fire the alerts and execute them.
HOW TO USE IT
In "Settings" popup I tried to mimic the CreateAlert popup dropdowns for selecting logic. Let's say you want to enter Long position at Stochastic KxD crossover. In first line of Long Entry conditions set "StochK" + "Crossing Up" + "StochD". Last field doesn't matter because in 3rd dropdown something else than "value" was selected. In second line you could set "maB" + "Greater Than" + "maC" to filter out those entries which are in direction of the uptrend. And yeah, add ADX>25 to make sure the market is actually moving: "ADX" + "Greater Than" + "value" + "25". All condition lines must be TRUE (or skipped) for the entry to be triggered. Toghether with an alert.
The same for Short entries. Combinations are limitless.
INDICATORS AND MTF (MULTI-TIMEFRAME)
In those dropdowns you can select candle values like open/close/high/low/ohlc4, but also some most popular indicators, which I have pre-built into this script: RSI, various Moving Averages, ADX-DMI, Stochastic and Bollinger Bands for start. You can configure parameters of those indicators also in "Settings" popup, in "Indicator Definitions" section. What's important, you can use any of these indicators from higher timeframe, setting MTF multiplier. So if you applied this indicator to 1h chart, but want to use rsi(close,14) from 4h chart, set MTF to 4. If you want to use current timeframe indicators, keep MTF at 1, which is a default setting here.
Note for coders: to keep focus of this script on joining conditions, entire logic for those indicators has been moved to external library, also open source. I encourage you to dig into the code and see how it's done. I love the addition of libraries concept in PineScript.
CUSTOM INDICATOR
Following the "openness" spirit of my master - which is TradingView itself - my work is also open, in 2 ways:
1. This script is open source. So you can grab it, modify or add any functionalities you want. I cannot and don't want to stop you from doing that. I'm asking for only one favor - please mention this source script in your credits.
2. You can import the plot (series) from any other indicator on TradingView. In Settings popup of my script, scroll down to "Indicator Definitions" section, and select the series of your choice in the first dropdown. Now it is ready to use in conditions dropdowns on top of the Settings popup.
Let me give you an example of that last scenario. Take another script of mine, "Pivot Points on SR lines DEMO". You can find it in "Indicators & Strategies" library or here: (). Attach it to your chart. Now come back to THIS script, open Settings popup and in "Custom Indicator aka Imported Source" select "Pivot Points on SR lines: ...". The way it works - it detects if a pivot point happened on Support/Resistance line from the past and returns 1 for PivotLow and -1 for Pivot High. Now in first Long Entry condition set: "custom indicator" + "Greater Than" + "value" + "0" and long entries will be marked on every pivot low noticed on Support/Resistance line.
ALERTS
Last but not least - the alerts. This script produces alerts on the entries calculated by strategy logic, as marked on the chart by the backtester. Moreover, syntax of those alerts is already prepared and fully compatible with TradingConnector - alerts executing tool (bot), if you want to auto-execute those trades. Apart from installing the tool, you need to set
up the alerts in TradingView, here is how:
open CreateAlert popup
in first dropdown select "Joint Conditions Strategy Template"
in second dropdown select "alert() function calls only"
And that's all. You only need to set one alert for the whole script, not one for Longs and one for Shorts as it was in the past. Also, you don't need to setup closing alerts, because stop-loss/take-profit/trailing-stop information is embedded in the entry alert so your broker receives it as early as possible. Alerts sent will look like this: "long sl=40 tp=80", which is exactly what TradingConnector expects.
Phew, that's all folks. If you think I should add something to this template (maybe other indicators?) please let me know in comments or via DM. Happy trading!
P.S. Pyramiding is not supported in this script.
Disclaimer : I'm not saying above combination of conditions will make you money. Actually none of this can be considered financial advice. It is only a software tool. Use it wisely, be aware of the risk and do your own research!
robotrading ZeroCCIIt was not me who authored the strategy. I do not know who the real author of this strategy is. I read about it on wikipedia :) And decided to test the strategy on the cryptocurrency market. It turned out that this strategy really works. The strategy is very simple.
Indicator
CCI indicator with default settings is used. The settings can be changed. Nothing else is used.
Strategy
If CCI is more than 0, then open a long position (and close a short position).
If CCI is less than 0, then open a short position (and close a long position).
Reverse trading.
MZ SRSI Strategy V1.0Strategy Introduction
This strategy starts from selection of 1st Moving Average from one of following:
SMA
EMA
DEMA
TEMA
LRC
WMA
MF
VAMA
TMA
HMA
JMA
Kijun v2
EDSMA
McGinley
Then it calculates the RSI of selected 1st Moving Average
In the end it calculates Moving Average of previously calculated RSI and for this purpose 2nd Moving Average is also selected from above list.
Cross of RSI and its Moving Average generates Strategy Alerts
Only long trades are enabled currently
Default Settings
I've set the default selection to the perfect options for 1D and 4h timeframes. You can modify both MAs selection and their length according to your selected timeframe.
Following default settings are used:
Heiken Ashi Candles are selected by default as source
1st Moving Average selection is set to LRC (Linear Regression Curve)
Length of 1st Moving Average is set to 50
RSI length is set to 2 because it is supposed to be fast
2nd Moving Average of RSI is set to TMA (Triangular Moving Average)
Length of 1st Moving Average is set to 5
Start date is set to 2011
Backtesting can also be done selecting %age of equity
Suggestions for Usage
Mostly winning trades have no prominent drawdown so losing trades can be abolished with Stoploss. Would soon add Stoploss, MTF and Takeprofit options in next version. Also if you want an alerts version of it then just comment below and would publish it later. I’ve found this strategy useful on 1D and 4h timeframes with described default settings.
Linear trendSimple way how to use Linear Regression for trading.
What we use:
• Linear Regression
• EMA 200 as a trend filter
Logic:
Firstly we make two different linear regression movings as oscillator. For this we need to subtract slow moving from fast moving, so we get the single moving around zero. This is the green/red line which appears on the chart.
The trade open when LR cross over the threshold. The trade close when LR cross under the threshold below. Crossing over the threshold is the same as faster moving cross over slower moving.
Also we use EMA as a filter. The trades would be only when the price is over than EMA 200.
P-Signal Strategy & AlertThanks to your advices I removed in this version something that was not necessary for the strategy but added alert and the chart of the current state of the strategy (white 1 - in trade, 0 - out of trade).
DMI (Multi timeframe) DI Strategy [KL]Directional Movement Index Strategy
Entry conditions:
- (a) when DI+ > DI- on timeframe #1, and
- (b) Confirmation: when DI+ > DI- on timeframe #2
In the shown example, timeframe1 was same as the chart (1H) and timeframe2 was 1D.
Stop Loss: ATR based trailing stop
About DMI
Can refer to Investopedia for general understanding.
Applications of DMI in this strategy:
- Assumes uptrend when DI+ is above DI- (when green DI+ lines above red DI-), vice versa for downtrend. This is checked in two different timeframes that can be set by user in settings.
- DX is ignored, it doesn't give a direction of the trend. But if DX was applied, it would be a good indicator for quantifying the strength of uptrend/downtrend. This measurement would typically be read along a threshold (i.e. if below 20, then market is likely consolidating). All of these have been commented out (ignored by pinescript's interpreter via //) in the codes, as said; we are not using DX for sake of simplicity.
Visualizations
To make the chart look cleaner, DMI plots have been simplified to just down/up arrows placed at bottom of the chart.
Referring to the example chart:
- Green arrows : when DI+ > DI- for both timeframes, implies uptrend
- Red arrows: other way around (DI+ < DI-), implies downtrend
P-Signal Strategy (BTCUSD Multi Frame)This is an example of constructing P-Signal strategy on a set of probability spaces. In this case, the daily weekly and monthly time frames are used. Please note that the parameters for each of the spaces (the number of bars in the gear) are different.
Instrument-Z (3Commas Bot)Instrument-Z is what I am currently using as my 3Commas Bot.
It allows you to customize signals from 3 indicators; Crossing MA's, Stochastic RSI, and WaveTrend.
Better yet, it allows you to setup these signals separately depending on whether the Trend MA is going up or down.
So there are 2 sets of inputs for everything, Uptrend inputs and Downtrend inputs.
I have realized that we can't expect a strategy to work the same way in an uptrend vs downtrend, so the inputs should be separated too.
In my testing, separating increased the net profit by 60% on average.
You can select whether you are trading Long or Short.
You can choose your stop loss and take profit levels as well as trade expiration.
You can choose if you only want to trade with the trend (making the opposing signals irrelevant).
The trend is based on the Trend MA.
This script is specifically for cryptocurrencies.
I've noticed that MA crosses on other asset classes are unreliable because the fluctuations are not strong enough to push the MA's across each other in a meaningful way.
If you want to use this as a 3Commas Bot, then you will have to copy the code of the strategy and paste it into your own personal script.
Then you have to change the alert messages at the bottom of the script.
Make sure to change your alert message from this;
{"message_type": "bot", "bot_id": 0000000, "email_token": "0b000a0a-0aa0-00aa-0aa0-000a00000a0a", "delay_seconds": 0}
To this;
{ \"message_type\": \"bot\", \"bot_id\": 0000000, \"email_token\": \"0a000a0a-0aa0-00aa-0aa0-000a00000a0a\", \"delay_seconds\": 0 }
With after each new line and \ before each quotation.
In the Alert setup, select "alert() function calls only".
This indicator is like a middle ground of complexity between the Juicy Trend indicator and the Instrument-A indicator.
And because it does not feature my neural network project, I have made it open script.
Enjoy!
Bollinger Band Breakout Positional Strategy- BN -15M This strategy consists of following criteria:
Buy:
1. Candle should have RSI is above 60 and Close above Bollinger band upper limit
2. Exit When candle is closed below 20MA
Sell:
1. Candle should have RSI is above 40 and Close below Bollinger band lower limit
2. Exit When candle is closed above 20MA
Checkout results.
P-Signal StrategyThis is an example of building a trading strategy based on a p-signal. The p-signal indicates the entropy of the state of the D frame system for the BTCUSD pair in the Kolmogorov probability space.
Combo Backtest 123 Reversal & TEMA1This is combo strategies for get a cumulative signal.
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.
Second strategy
This study plots the TEMA1 indicator. TEMA1 ia s triple MA (Moving Average),
and is calculated as 3*MA - (3*MA(MA)) + (MA(MA(MA)))
WARNING:
- For purpose educate only
- This script to change bars colors.
RSI + MA StrategyHello, everyone!
We have just released an innovative strategy for TradingView. It allows you to facilitate the trading process when you have to use both indicators.
This strategy is:
User-friendly
Configurable
Equipped with the combination of Relative Strength Index (RSI) and Moving Average (MA) indicators
Designed with all required functions to manage positions
Features
The RSI+MA strategy can:
Identify entry points for Long and Short positions.
Depict RSI and MA values concerning each other.
Reduce visual congestion and import usability thanks to using a combo of 2 indicators.
Allow using pivot trading. The RSI+MA strategy will enter a Long position according to the Short position conditions. And vice versa.
Note! If you want to open a Long position, the RSI line should cross MA from top to bottom. If you want to open a Short position, RSI has to cross MA from bottom to top.
Parameters
We have equipped our strategy with more than 14 additional parameters. So, you can configure the EA according to your needs!
Inputs :
Use Reverse Trade — allows swapping Long and Short positions opening conditions.
Resolution — allows you to view an indicator with data on a higher or lower timeframe on the current chart.
RSI Length
RSI Source: Open, High, Low, Close, HL2, HLC3, OHLC4
Show MA — allows you to enable or disable MA displaying.
MA Length
MA Offset
Style:
RSI — RSI indicator line color and style settings.
MA — MA indicator line color and style configuration.
Upper Band — allows customizing line style, color, and RSI upper bound value.
Lower Band — allows you to customize line style, color, and RSI lower bound value.
Background — background color setting within the RSI upper and lower borders.
Precision — number of decimals for RSI values.
Note! Try RSI+MA on your demo account first before going live.
[cache_that_pass] 1m 15m Function - Weighted Standard DeviationTradingview Community,
As I progress through my journey, I have come to the realization that it is time to give back. This script isn't a life changer, but it has the building blocks for a motivated individual to optimize the parameters and have a production script ready to go.
Credit for the indicator is due to @rumpypumpydumpy
I adapted this indicator to a strategy for crypto markets. 15 minute time frame has worked best for me.
It is a standard deviation script that has 3 important user configured parameters. These 3 things are what the end user should tweak for optimum returns. They are....
1) Lookback Length - I have had luck with it set to 20, but any value from 1-1000 it will accept.
2) stopPer - Stop Loss percentage of each trade
3) takePer - Take Profit percentage of each trade
2 and 3 above are where you will see significant changes in returns by altering them and trying different percentages. An experienced pinescript programmer can take this and build on it even more. If you do, I ask that you please share the script with the community in an open-source fashion.
It also already accounts for the commission percentage of 0.075% that Binance.US uses for people who pay fees with BNB.
How it works...
It calculates a weighted standard deviation of the price for the lookback period set (so 20 candles is default). It recalculates each time a new candle is printed. It trades when price lows crossunder the bottom of that deviation channel, and sells when price highs crossover the top of that deviation channel. It works best in mid to long term sideways channels / Wyckoff accumulation periods.
RSI StrategySimple way how to use RSI and MA indicators for trading.
What we use:
• RSI
• SMA calculated by RSI (title: SMA_RSI)
• Delta of RSI and SMA_RSI (title: delta)
• SMA calculated by delta of RSI and SMA & RSI (title: SMA_RSI2)
Logic:
Upon the fact that we use the difference between two indicators that have similar values ( RSI and SMA_RSI), we get number around zero. Next, result is smoothed by calculated the SMA . This is the blue/purple line that appears on the chart - SMA_RSI2.
The trade open when SMA_RSI2 cross over the threshold. The trade close when SMA_RSI2 cross under the threshold below.
Also, the usual EMA 200 is used as a filter, which you can switch on or switch off.
No-lose trading targets (Based on EoRfA) By Mustafa ÖZVERI simulated the NLTTa_EoRfA indicator with the Bitcoin-USD
For details about the indicator, visit my profile on tradingview
For Simulation, with default settings, we order
When on Long setup and price on green area
- open a long position that closes on red area
When on Short setup and price on red area
- open a short position that closes on green area
And we got
- about 15% profit
But only this value can not guarantee good results for trading. BE CAREFUL
Smoothed Waddah ATR~~~All Credit to LAZY BEAR for posting the original Script which is an old MT4 indicator.~~~~
No this system does not repaint... if it does let me know. Either the code is wrong or you are using a repainting chart such as renko candles.
*PURPOSE*
This Is an "Enhanced or Smoothed" version of the script that captures the heiken-ashi closing price as its main calculation variable. While using normal bar or line charts. Enhancements integrate trade filters to reduce false signals.
*WHAT TYPE OF TRADING STRATEGY IS THIS?*
This is a Long Only, Trend Trading System. Is intended to be applied to Charts/Timeframes that produce sustainable trends for which ever asset you are trading.
*NOTE OF ADVICE REGARDING SETTINGS*
Settings can be tweaked but I have found that best results come with the given settings. If a chart is too choppy to trade this indicator successfully, it is advised not to change the settings but either find a different timeframe or different asset to apply this strategy to.
TLDR
Indicator measures the change of the MacD (difference between MAC D of given EMA's) and compares it to the difference between the Upper and Lower Bollinger bands. Green bar over trigger line= entry. Red bar over trigger line = close.
*SETTINGS AND INPUTS*
-MacD of HeikenAshi chart (will always be of the Heikenashi chart even when applied to different chart type)
sensitivity = input(150, title='Sensitivity') =range should be (125-175)multiplier so that MacD can be compared to BB
fastLength = input(20, title='MacD FastEMA Length')
slowLength = input(40, title='MacD SlowEMA Length')
-Bollinger Band of currently used price chart type
channelLength = input(20, title='BB Channel Length')
mult = input(1.5, title='BB Stdev Multiplier')
-14 Period RSI Trade Filter (set to 0 to Disable)
RSI14filter = input(40, title='RSI Value trade filter') =only gives entry when RSI is higher than given value
*ABSTRACT & CONCEPT*
TLDR - Indicator measures the change of the MacD (difference between MAC D of given EMA's) and compares it to the difference between the Upper and Lower Bollinger bands. Green bar over trigger line= entry. Red bar over trigger line = close.
Indicator plots -
Bars are the change in the MAC D and the indicator line is the difference in the BB.
When Bars are higher than the indicator line then it is considered a trend "Explosion"
Green Bars are Trend Explosion to the upside, Red Bars are Trend explosion to the downside.
GENERAL DETAIL-
the core calculation is measuring the change in MacD of current candle compared to the MacD of two previous candles.
This value is multiplied by the sensitivy so it can be compared to the change in Bollinger Band Width.
if the MACD change is positive then you get a green/lime bar for that value. If the MacDchange is negative you get a red/orange bar for that value.
and are determined by whether the actual change is increasing in that direction or decreasing. (bars getting taller or bars getting shorter)
Entry signal for long is A positive change in MACD difference (Green bar) that is greater than the change of the bollinger band (orange signal line) AND if the RSI value is above your filter.
Close signal or Trend Stop Warning Signal is given when a Negative MacD Difference (red bar) is greater than the change of the bollinger band (orange Line)
*CONSIDERATIONS AND THOUGHTS*
I have over 150 iterations of this indicator and this is the most consistent and best version of settings and filters I was able to generate. I built this indicator specifically for 3 charts. SPY monthly, QQQ monthly, BTC 3 Day. However this indicator works well on any long term bullish chart. (tech stocks are great) .
Trend trading systems are intended to be homerun hitting, plunge protecting indicators that allow for long legs and expanding volatility. This indicator does this as the trigger line is Dynamic with the expansion and contraction of the bollinger band.
I do not take every signal specifically not the close signals. Instead they more like warnings in ultra bullish environments.
If i had to pair this indicator with any other filter than the RSI, it would be a long term moving average i.e. the 50 week or equivalent for your chart. signals above rising moving averages means that you are trading with an upward trending market.
Hope this helps. Happy trades.
-SnarkyPuppy
Simple EMA20 Strategy + StochasticThis is a Trend Following Strategy.
The intent of this strategy is to catchthe price as it trends higher than the 20-period EMA and sell immediately after the price closes below it.
I have implemented calculations from Stochastic to make sure the price is coming from an oversold area.
There is also a check to see if the 20-period EMA is trending higher than before.