TradingView
JayRogers
30 mar 2021 18:30

Example - MA-Cross Retracement Detection 

Bitcoin / U.S. dollarBitstamp

Opis

The retracement tracker function(s) in this script outline how to:

  • Track conditions using "toggle" booleans.
  • Use multiple coinciding conditions to trigger an event just once.


What is a retracement?

"Retracements are temporary price reversals that take place within a
larger trend. The key here is that these price reversals are temporary
and do not indicate a change in the larger trend."


Quote Source: https://www.investopedia.com

Informacje o Wersji

Typo fix.
Komentarze
AtomOfScent
This will be helpful for integrating into other indicators, thanks.
samrejtlr
Hello sir
Maxilla_
Sir, how can we create alerts with this script?
JayRogers
@Maxilla_, the following should theoretically add alert functionality:
if _retracement > 0 alert( syminfo.tickerid + ": Negative Retracement Event to (" + tostring( _slowEMA ) + ").", alert.freq_once_per_bar ) if _retracement < 0 alert( syminfo.tickerid + ": Positive Retracement Event to (" + tostring( _slowEMA ) + ").", alert.freq_once_per_bar )
Więcej