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