TradingView
LucasVivien
21 de Jan de 2022 18:01

MA Bollinger Bands + RSI (Study) 

Bitcoin / TetherUSBinance

Descrição

This study/indicator script is meant to allow users to set alerts based on my MA Bollinger Bands + RSI (Strategy).
Both Study and Strategy scripts reflect the exact same user inputs, parameters and trading signals.

6 different alerts available:
- MABB+RSI Long (or Short) Signal (all): activates for every single Long (or Short) signals
- MABB+RSI Long (or Short) Signal: activates when trade direction changes from Short to Long (or from Long to Short)
- MABB+RSI Long (or Short) Re-Entry Signal: after a stop loss was hit, activates upon same trade direction if new signal
(“Enable SL” & “Allow re-entry” must be switched on)

Chart legend:
- Red arrow = Short Signal
- Blue arrow = Long Signal
- Red square = Stop loss (when trade entry)
- Purple square = Stop loss (when hit)

NB1: Be sure to set both Study and Strategy script settings to the same values if you want to achieve similar results in both scripts.
NB2: When setting up your alerts, preferably use option “Once per bar close” to get proper confirmations.


Enjoy!

Notas de Lançamento

! OUTDATED !
If you are using coresponding "Strategy" script, be aware that its content is not reflected this "Study" script version anymore.
I will update Study script accordingly in a few days.

Notas de Lançamento

! UPDATED !

- Study() and Strategy() Scripts now both reflect the same results for a given set of settings.
All « strategy.position_size » variables were replaced by custom identifier: LSF (Long, Short, Flat) in corresponding Strategy Script

- Bigger arrows (blue / red) for signals along with trade direction change

Notas de Lançamento

Hi all,

- Alerts conditions added when SL are hit! You can now use them when automating your trading.

- There were inconsistencies within stop losses plots and activations: those where fixed.
NB:
Still minor issues when stop loss should activate on the candle right after trade entry candle. Instead of stopping, trade keeps going until it hits stop loss in following candles (or until trade direction reversal)
This issue occurs only when stop loss is set very close to trade entry price. So, depending on your strategy settings, if you give enough room for your trades to “breathe”, this will not be a problem.

Notas de Lançamento

!!! OUTDATED SCRIPT !!!

I'll update the Study Script, according to new upadates on the Strategy Script, in a few days

Notas de Lançamento

UPDATED according to last Strategy script update

Notas de Lançamento

Avoid repainting on security function
Comentários
qasim429
thank you for your kind sharing spirit.
enrybds
Hi, i got a fake long signal todaya al 13:08, anyone more? What happened? Thx
LucasVivien
@enrybds, Hello! On what TickerID, time frame and strategy/study settings are you operating?
enrybds
@LucasVivien, 15min BTC perp futures Binance. Default settings, no TP no SL and volatility parameter enabled. Another long signal at 21:03 and 21:15 i dont whats wrong. SOrry for my english
LucasVivien
@enrybds, Hello Sit, sorry for late answer. I think you issue comes from how you setup your alerts (4 different options after selecting your alerts condition). These options (Only once, Once per bar, Once per bar close and Once per minute) determine when the alert will be released. In your case, you want to base your signals on 15min candles. Hence, you should use "Once per bar close" so the alert is realised only uppon signal validation. I think this should fix your problem!
qasim429
thank you lucas!
but do you have repainting problems with the security function?
I had this kinda problem when i set the alert with alertcondition.
it's caused by the security function.
i'm trying to figure out how to avoid it.

thanks again!
LucasVivien
@qasim429, Hi Qasim and thank you for your comment. I had the same error message popping too when setting alerts. I made a tiny update to the script so it cannot repaint anymore. You might still get the error message just because there is a security() function in the script but there won't be actual repainting problems anymore ;)
qasim429
@LucasVivien, thank you ! you are my hero.
LucasVivien
@qasim429, my pleasure :) and thank you very much for what you sent me!! you're a Star!
LucasVivien
Let me know in the comments what kind of alerts you would like to get for this Study
Mais