lib_no_delayLibrary "lib_no_delay"
This library contains modifications to standard functions that return na before reaching the bar of their 'length' parameter.
That is because they do not compromise speed at current time for correct results in the past. This is good for live trading in short timeframes but killing applications on Monthly / Weekly timeframes if instruments, like in crypto, do not have extensive history (why would you even trade the monthly on a meme coin ... not my decision).
Also, some functions rely on source (value at previous bar), which is not available on bar 1 and therefore cascading to a na value up to the last bar ... which in turn leads to a non displaying indicator and waste of time debugging this)
Anyway ... there you go, let me know if I should add more functions.
sma(source, length)
Parameters:
source (float) : Series of values to process.
length (simple int) : Number of bars (length).
Returns: Simple moving average of source for length bars back.
ema(source, length)
Parameters:
source (float) : Series of values to process.
length (simple int) : Number of bars (length).
Returns: (float) The exponentially weighted moving average of the source.
rma(source, length)
Parameters:
source (float) : Series of values to process.
length (simple int) : Number of bars (length).
Returns: Exponential moving average of source with alpha = 1 / length.
atr(length)
Function atr (average true range) returns the RMA of true range. True range is max(high - low, abs(high - close ), abs(low - close )). This adapted version extends ta.atr to start without delay at first bar and deliver usable data instead of na by averaging ta.tr(true) via manual SMA.
Parameters:
length (simple int) : Number of bars back (length).
Returns: Average true range.
rsi(source, length)
Relative strength index. It is calculated using the ta.rma() of upward and downward changes of source over the last length bars. This adapted version extends ta.rsi to start without delay at first bar and deliver usable data instead of na.
Parameters:
source (float) : Series of values to process.
length (simple int) : Number of bars back (length).
Returns: Relative Strength Index.
Rsi2
Double RSI TrendThis is my Double RSI Trend Indicator. It issues Buy and Sell signals based on the Supertrend and a double RSI . The RSIs cross near or at the same time as the Supertrend fires. It has the ability to change if you want signals based on the RSI cross on the same candle, one candle before, and two candles before. I find this one extremely good at catching reversals as long as you filter out some of the signals based on trend.
Double RSI FilterI've seen several youtubers using 2 RSI's on top of one another to filter trades for their strategies. I figured I would just code it up as an all-in-one indicator for people who have the basic package. This way they have an extra slot for another indicator if they need one and also for convenience.
Longs only when RSI 1 is above RSI 2 and shorts only when opposite. The arrows show where crosses of the RSI's occur.
Let me know if there is something else like this where it would just be very convenient to have 2 indicators on one window or other such things and I'll see if I can do something for you guys in my spare time. I'm just an amateur coder, but learning as I do more of these for people.
Thank you!
Hope this helps someone! :)
Estrategia Larry Connors [JoseMetal]============
ENGLISH
============
- Description:
This strategy is based on the original Larry Connors strategy, using 2 SMAs and RSI.
The strategy has been optimized for better total profit and works better on 4H (tested on BTCUSDT).
LONG:
Price must be ABOVE the slow SMA.
When a candle closes in RSI oversold area, the next candle closes out of the oversold area and the closing price is BELOW the fast SMA = open LONG.
LONG is closed when a candle closes ABOVE the fast SMA.
SHORT:
Price must be BELOW the slow SMA.
When a candle closes in RSI overbought area, the next candle closes out of the overbought area and the closing price is ABOVE the fast SMA = open SHORT.
SHORT is closed when a candle closes BELOW the fast SMA.
*Larry Connor's strategy does NOT use a fixed Stop Loss or Take Profit, as he said, that reduces performance significantly.
- Visual:
Both SMAs (fast and slow) are shown in the chart.
By default, the fast SMA is aqua color, the slow changes between green and red depending on the "trend" (price over slow SMA = bullish, below = bearish).
RSI can't be shown because TradingView doesn't allow to show both overlay and panel indicators, so candles get a RED color when RSI is in OVERBOUGHT area and GREEN when they're on OVERSOLD area to help with that.
Background is colored when conditions are met and a position is going to be open, green for LONGs red for SHORTs.
- Usage and recommendations:
As this is a coded strategy, you don't even have to check for indicators, just open and close trades as the strategy shows.
The original strategy uses a 5 period SMA instead of the 10, and 10/90 for oversold/overbought levels, this has been optimized after the testings and results but feel free to change settings and test by yourself.
Also, the original strategy was developed for daily, but seems to work better en 4H.
- Customization:
As usual I like to make as many aspects of my indicators/strategies customizable, indicators, colors etc., feel free to ask if you feel that something that should be configurable is missing or if you have any ideas to optimize the strategy.
============
ESPAÑOL
============
- Descripción:
Esta estrategia está basada en la estrategia original de Larry Connors, utilizando 2 SMAs y RSI.
La estrategia ha sido optimizada para un mejor beneficio total y funciona mejor en 4H (probado en BTCUSDT).
LONG:
El precio debe estar por encima de la SMA lenta.
Cuando una vela cierra en la zona de sobreventa del RSI, la siguiente vela cierra fuera de la zona de sobreventa y el precio de cierre está POR DEBAJO de la SMA rápida = abre LONG.
Se cierra cuando una vela cierra POR ENCIMA de la SMA rápida.
SHORT:
El precio debe estar POR DEBAJO de la SMA lenta.
Cuando una vela cierra en la zona de sobrecompra del RSI, la siguiente vela cierra fuera de la zona de sobrecompra y el precio de cierre está POR ENCIMA de la SMA rápida = abre SHORT.
Se cierra cuando una vela cierra POR DEBAJO de la SMA rápida.
*La estrategia de Larry Connor NO utiliza un Stop Loss o Take Profit fijo, como él dijo, eso reduce el rendimiento significativamente.
- Visual:
Ambas SMAs (rápida y lenta) se muestran en el gráfico.
Por defecto, la SMA rápida es de color aqua, la lenta cambia entre verde y rojo dependiendo de la "tendencia" (precio por encima de la SMA lenta = alcista, por debajo = bajista).
El RSI no puede mostrarse porque TradingView no permite mostrar tanto los indicadores superpuestos como los del panel, así que las velas obtienen un color ROJO cuando el RSI está en el área de SOBRECOMPRA y VERDE cuando están en el área de VENTA para ayudar a ello.
El fondo se colorea cuando se cumplen las condiciones y se va a abrir una posición, verde para LONGs rojo para SHORTs.
- Uso y recomendaciones:
Como se trata de una estrategia ya programada, ni siquiera hay que comprobar los indicadores, sólo hay que abrir y cerrar las operaciones tal y como muestra la estrategia en el gráfico.
La estrategia original utiliza una SMA de 5 periodos en lugar de 10, y 10/90 para los niveles de sobreventa/sobrecompra, esto ha sido optimizado después de las pruebas y los resultados, pero sé libre de cambiar la configuración y probarla por sí mismo.
Además, la estrategia original fue desarrollada para diario, pero parece funcionar mejor en 4H.
- Personalización:
Como siempre me gusta hacer personalizables todos los aspectos de mis indicadores/estrategias, indicadores, colores, etc., preguntar si notas que falta algo que debería ser configurable o si tienes alguna idea para optimizar la estrategia.
CCI + EMA with RSI Cross StrategyThis strategy uses the CCI + 2 RSIs + 2 EMAs to generate trade signals. Trades are only taken during the normal trading session and all open trades are closed 15 min before the close of the current session. A trailing stop loss is used and is customizable.
Not trading advice, use at your own risk.
RSI Local TrendA simple indicator using two RSIs.
Conditions for buy:
RSI(slow) < RSI(fast) and RSI(slow) < long_trigger
Conditions for sell:
RSI(slow) > RSI(fast) and RSI(slow) > short_trigger
It is recommended to use in small timeframes for scalping.
Recommended settings:
slow = 3
fast = 14
long_trigger = 30
short_trigger = 70
In markets where there is very high volatility, it is recommended to change the trigger parameters:
long_trigger = 20
short_trigger = 80
RSI Swing Trading Setup (2-Period)A simple script that adjusts the RSI visibly in order to better accommodate swing trading and certain swing trading setups/strategies.
--------------------------------------------------------------------------------------------------------------------------------------------------------
Best used in conjunction with "Linear Regression Channel by LonesomeTheBlue" with 2.2σ (std.dev) and Show Fib Levels.
^Click image for a redirect to that script.
--------------------------------------------------------------------------------------------------------------------------------------------------------
In certain price action patterns:
A bearish reversal from a previously bullish move can indicate tops of a rally if the RSI moves from 0-40 to 60 (1)
A bullish reversal from a previously bearish move can indicate bottoms of a pullback if the RSI moves from 60-100 to 40 (2)
(USE THE LINEAR REGRESSION CHANNEL TO VALIDIFY THE RETRACEMENTS)
--------------------------------------------------------------------------------------------------------------------------------------------------------
(1)
--------------------------------------------------------------------------------------------------------------------------------------------------------
(2)
--------------------------------------------------------------------------------------------------------------------------------------------------------
3GBH - CapMap v1This indicator compares the RSI of the symbol you're viewing against;
- TOTAL ( market cap of the entire cryptocurrency market )
- TOTAL2 ( market cap of the entire cryptocurrency market excluding BTC )
- BTCs market cap
- ETHs market cap
-----
This helps to track the trend of a certain symbol and to quickly see how it's performing in contrast to key market players ( BTC & ETH ).
It also allows you to see the current state of the crypto market as a whole.
I tend to use TOTAL & TOTAL2 for technical analysis on BTC, and BTC & ETH for technical analysis on alt-coins.
Scalping using RSI 2 indicator with TSLThis strategy implements a simply scalping using the RSI (calculated on two periods), the slopes of two MAs ( EMA or SMA ) having different lengths (by default, I use 50 and 200).
A trailing stop loss (%) is used.
Entry conditions:
.) Fast MA > Slow MA and Price > Slow MA and RSI < Oversold Threshold ------> go Long
.) Fast MA < Slow MA and Price < Slow MA and RSI > Overbought Threshold ------> go Short
Exit conditions:
.) Long entry condition is true and (close >= TP or close <= TSL ) ----> close short position
.) Short entry condition is true and (close <= TP or close >= TSL ) ----> close long position
The strategy performed best on Bitcoin and the most liquid and capitalized Altcoins but works excellent on volatile assets, mainly if they often go trending.
Works best on 3h - 4h time frame.
There's also an optional Volatility filter, which opens the position only if the difference between the two slopes is more than a specific value, which can be set in the study inputs. The purpose is not opening positions if the price goes sideways and the noise is way > than the signal.
Note:
.) the RSI length is 2;
.) the oversold Threshold is 90%;
.) the overbought Threshold is 10%;
.) by default, the trailing stop loss per cent is 1%;
.) by default, the fast MA length is 50;
.) by default, the slow MA length is 200;
.) by default, the MA used is EMA.
Cheers.
Scalping using RSI 2 indicator with TP and TSLThis study implements a simply scalping using the RSI (calculated on two periods), the slopes of two MAs (EMA or SMA) having different lengths (by default, I use 50 and 200).
A take profit (%) and a trailing stop loss (%) are used.
Entry conditions:
.) Fast MA > Slow MA and Price > Slow MA and RSI < Oversold Threshold ------> go Long
.) Fast MA < Slow MA and Price < Slow MA and RSI > Overbought Threshold ------> go Short
Exit conditions:
.) Long entry condition is true and (close >= TP or close <= TSL) ----> close short position
.) Short entry condition is true and (close <= TP or close >= TSL) ----> close long position
The strategy performed best on Bitcoin and the most liquid and capitalized Altcoins but works excellent on volatile assets, mainly if they often go trending.
Works best on 3h - 4h time frame.
There's also an optional Volatility filter, which opens the position only if the difference between the two slopes is more than a specific value, which can be set in the study inputs. The purpose is not opening positions if the price goes sideways and the noise is way > than the signal.
Note:
.) the RSI length is 2;
.) the oversold Threshold is 90%;
.) the overbought Threshold is 10%;
.) by default, the take profit per cent is 0.5%;
.) by default, the trailing stop loss per cent is 0.5%;
.) by default, the fast MA length is 50;
.) by default, the slow MA length is 200;
.) by default, the MA used is EMA.
Cheers.
IFR2 - RSI2When the price is over the EMA and RSI 2 is less then 25 so an open order is going to be made and the strike is the high of the antepenultimate price
Setup RSI2 R3 [Valente]Indicator for the Larry Connors RSI2 R3 Setup.
Green Candle: When RSI2 is decreasing for 3 candles, the first is below 60 and the last is below 10.
There is a SMA200 Filter option
IFR 2 Stormer RSI 2STORMER's IFR 2 strategy or if you prefer RSI 2.
It consists of a trader technique known as STORMER.
This strategy works preferentially in the daily period. But it does not prevent it from being used in other periods.
Dissecting the strategy:
Buy when 2-Period IFR smaller Oversold n periods in example 10.
And close the trade when the price reaches the maximum of the last 2 periods.
A 200 period filter is also used.
Everything can be changed IFR (RSI), Stop high n periods, sma.
A estratégia IFR 2 do STORMER ou se preferir RSI 2.
Consiste em uma técnica do trader conhecido como STORMER.
Esta estrategia funciona preferencialmente no periodo diario. Mas não impede de ser usado em outros periodos.
Dissecando a estratégia:
Comprar quando IFR de 2 Períodos menor Oversold "Sobrevendido" n períodos no exemplo 10.
E encerrar o trade quando o preço atingir a máxima dos últimos 2 periodos.
É usado também um filtro sma 200 períodos.
Tudo pode ser alterado IFR(RSI), Stop high n períodos, sma.
(ง ͠° ͟ل͜ ͡°)ง Larry Connors RSI-2 Scalping StrategyMore info here:
stockcharts.com
and here:
systemtradersuccess.com
Very interesting and simple scalping strategy with unbelievable results.
I added 4 versions that combines only the RSI OB/OS thresholds.
Also the single variable that you can change is the RSI, sometimes RSI 3 or RSI 4 works better then the original.
Also his exit point is not quite good in these days, so I added TP and SL to adjust it according to the market conditions.
Added re-entries.
It works in any time frame, so play with the TF, RSI and with all 4 variants until it fits to your needs.
Enjoy!
Zekis
RSI-RENKO Divine StrategyLive, non-repainting strategy using RENKO and RSI mixed together to multiple types of long and short positions.
- Features -
Live entry direction with trade warnings and alerts
Live trade building buy and sell limits (for buy/sell limits)
Entry location icons as well as pyramid entries (to add to existing position)
Swing trades that keep you in the trade for the maximum possible profit
1 scalp target based on the RSI settings and entry location
Dynamic trailing stop for swings and scalps
Alert conditions for every update and condition change of the strategy (Provided by indicator study)
4 pre-built color themes, including candlestick coloring
This script is used solely for alerts to the RSI-RENKO Divine Strategy , because Trading View still after 3 years of requesting does not provide the ability to use alert conditions inside a strategy script, only an indicator script. This strategy should be used to backtest your settings. Beyond alerts and strategy inputs, the strategy and indicator are identical.
RSI-RENKO Divine Strategy (Backtesting)Live, non-repainting strategy using RENKO and RSI mixed together to multiple types of long and short positions.
- Features -
Live entry direction with trade warnings and alerts
Live trade building buy and sell limits (for buy/sell limits)
Entry location icons as well as pyramid entries (to add to existing position)
Swing trades that keep you in the trade for the maximum possible profit
1 scalp target based on the RSI settings and entry location
Dynamic trailing stop for swings and scalps
Alert conditions for every update and condition change of the strategy (Provided by indicator study)
4 pre-built color themes, including candlestick coloring
This strategy is best used with the companion indicators: Renko RSI and Renko Trend Momentum using the identical RSI and Trend settings.
The linked script is identical and used solely for alerts, because Trading View still after 3 years of requesting does not provide the ability to use alert conditions inside a strategy script, only an indicator script. This strategy should be used to backtest your settings.
The approach to this strategy uses several parallel trades of different types. In order to generate multiple trade types the "pyramid trades" setting of the strategy (second tab of the settings that lets you adjust the number of pyramid contracts) should be used.
- Trade Types -
Swing: This trade is entered on the solid arrows after the RSI has become oversold or overbought. It is key that all trades wait for some degree of pullback before entering, even after the trend flips between positive and negative. This trade is held until stopped out or an opposite trade is triggered that reverses the position.
Scalp: These trades have a limit buy/sell entry and a target. The initial target is the opposing RSI overbought or oversold level and changes in real time.
Turning on/off the different trade types (strategy only) is simple done by decreasing the number of contracts used for that trade type to zero. When the quantity is set to zero, that trade is not considered.
- Session -
The session filter is used to narrow trade executions by only allowing trades that are inside the session boundaries. This can be used to isolate the London or New York session for example. The default is 24 x 7 which filters no trades (Trading View has a bug when resetting this, so simply reset the indicator to get it back to 24x7).
Please see the following 3 videos introducing the concept of this strategy.
All feature requests or bug reports are welcome either by direct messaging or comments on this page or the linked indicator page.
Please PM for access. Cheers.
Renko RSIThe goal of this indicator is to plot the RSI values "as if" the chart is a true price action based Renko chart. It can be used on a time series chart or Renko series chart. The RSI is derived from the raw price action of a time-based chart, where the historic and live price is clustered into Renko bricks. The Renko brick production algorithm is entirely backed by Renko Price Bars Overlay and thoroughly tested.
The algorithm takes into account rapid brick production within a single time candle and adjusts accordingly. The output may vary slightly between different chart time frames for the same indicator settings, but this is due to the lack of price fluctuation visibility that can occur in higher chart time frames. If the brick tick size is low, an appropriate chart interval should be selected that maximizes the amount of price volatility visible to the indicator. A bad setting would be something like a 1 tick EURUSD Renko setting on an H4 chart, there simply is no way to derive the exact and ordered price fluctuations in a single H4 candle, 1 pip at a time. A more appropriate chart time frame would be 1-3 minutes for this selected Renko brick size.
Plots user specified RSI based on Renko bricks. This would be the same (or very close to) the RSI viewed on a normal Renko chart based on price action alone.
Works well with Renko Price Bars Overlay script.
See also: Renko Trend Momentum
Tensor Toolbox Overlay BetaThis purpose of this script is to test new features we might want to implement in Tensor Cloud (See: . Also, to work towards a full, all-in-one indicator solution (Tensor Toolbox). In this first version of Tensor Toolbox Overlay, we propose two new features for Tensor Cloud:
The Veil.
Ichimoku Weight/Smoothing.
The Veil is an RSI filter. The Ichimoku smoothing takes Ichimoku and averages it with Tensor Cloud. The Ichimoku feature will probably not make it into Tensor Cloud but Veil might. Tensor Cloud should remain as pure as possible. It's all up to your feedback. Initial features of Tensor Toolbox Overlay:
Tensor Cloud.
Support & Resistance.
MACD background.
Long & Short potentials.
Tensor Toolbox Overlay needs a lot more features yet to remain elegant. A second edition called Tensor Toolbox Oscillator is coming as well (Can only fit so much on the chart). The goal with both is to have a suite that takes the best of all indicators and provides easy decision making, for those who like to keep control. For Overlay, I also intend to duplicate the functionality of MTPredictor at a fraction of the cost. Feedback appreciated.
Enjoy :)
Dav-o meterPseudo code
Example
General info and acknowledgements
Author: maqpie
Date of publishing: 20th of july 2017
This script is based upon Davinci's dav-o meter and his original script, which searches for W's and M's in price, OBV, RSI and/or Willy.
Although the original script is elegant, a W or M has to occur within 5 bars.
However, often what you will see is that a W or M forms over more than 5 bars.
This script tries to remove that limit.
It took me several different approaches to find a good solution. For the most part because of the lack of any real debugging tool in Pine script.
Let me know what you think, because I feel like I need tone down the number of options so it is easier to use.
If you have any questions, or things you would like to see different please contact me at TRI.
Have fun playing and goofing around with it!
How it works
Now, trading is more of an art form than a science and this indicator is no exception.
When talking about M's and W's, it begs the question: what exactly counts as a W or M?
My personal experience is that for a W to count as such, it has to adhere to the following rules:
1. A 'W' has 5 points, A, B, C, D and E E
2. Point A can be any point C /
3. Point B should be lower than A A / \ /
4. Point C should be higher than B \ / D
5. Point D should be lower than C, but higher than B B
6. Point E should be higher than C
1. A 'M' has 5 points, A, B, C, D and E B
2. Point A can be any point / \ D
3. Point B should be higher than A A \ / \
4. Point C should be lower than B C \
5. Point D should be higher than C, but lower than B E
6. Point E should be lower than C
Script input parameters
You can use the following indicators to search for W's or M's:
- price (close)
- OBV
- RSI
- Willy
For each of these indicators you set the following options:
- Use: whether you want to use it
- The maximum width: over how many bars a W / M is allowed to form
- The maximum offset: how many bars back a W / M is allowed to form
- Strict: when not set, rule 5 (see 'How it works') changes: point D no longer has to be above B (for W), and no longer has to be below B (for M)
- Length: length of the indicator, for example a 14 bar RSI
Other options:
- Potential dav-o: show potentials which are like regulars dav-o's, except that rule 6 (see 'How it works') no longer applies.
- Period: you can limit the period for backtesting. Useful to identify under what market conditions the script works best.
Final note: using the potential dav-o in combination with unsetting the 'Strict' rule will make this script all but useless.
TEXAS 2 Step RSI-2 - Alerts Built-inBe sure to Add to Favorites (down below) and/or Like/Follow this script so that you will be alerted to UPDATES.
Adding to Favorites makes it available in your list of Indicators.
The Texas 2 Step is a lower indicator (arrows on candles added for reference) based on the RSI-2 Strategy made famous by Larry Connors.
I use this indicator for:
Timing Entries and Exits
Trading Between Up/Ddown Signals
Detecting Trends and Pull Backs
I use this indicator by looking for the RSI-2 number going back inside the 10-90 range(gray) after being outside (red/green). This tells me the price is no longer at an extreme. You never know how many candles will remain in the extreme areas so wait for a candle to close inside the range.
On longer time frames (daily/weekly) you will notice several candles will stay in the extreme areas resulting in 100 pips or more before returning to the inside range. In these cases you can go LONG/SHORT in the direction of the extreme area and close your position once it returns to the inside range.
There are 4 Built-In Notifications already created for you and are available by simply right clicking in the indicator area and selecting:
Condition: TX2Step v3 - RSI
Then 1 of the 4 Alerts:
Green Alert - RSI2 > 90 and line turns Green
Red Alert - RSI2 < 10 and line turns Red
Down - RSI2 < 90 after being in the top RSI2 > 90 area
Up - RSI2 > 10 after being in the bottom RSI2 < 10 area
I look forward to hearing your thoughts on the indicator and will definitely like to build upon this indicator and continue to update it.
This adaptation was based off of the original code from the talented Chris Moody.
Plenty of additional information about Larry Connors RSI-2 Strategy with PDFs and Backtests in the stock markets on the original Script.
Value Chart and RSI2 with AlertBased on LazyBear's and TheMightyChicken's Value Chart.Value Chart is used as a signal in Hubba-Hubba Style strategy.
You can trigger Alarm when extreme level exceeded. Also the indicator monitors value of RSI2 and draws dot if value exceeds top or bottom of RSI level