Type/to search

2 Moving Average Color Direction Detection

SMA
1
Follow
1789
Followers

The filling option is added between the moving averages (it is deactivated by default, activate in configuration if you wish), if the 2 averages are green the filling will be green, if the 2 averages are red the filling will be red, this would confirm a trend healthy in the case that you are using a fast and a slow average, in the case that the fast average changes of direction will be filled in the purple color, this can indicate several things: a correction of the trend is being generated, possible rest of the price , possible start of laterality, possible change of trend, when the color is purple the trader will have to analyze the general context to be able to define what could be happening.

The following alerts were created:

  • Change Direction 1-MA
  • Change Direction 2-MA
  • Cross Under 2-Ma/1-Ma
  • Cross Under 1-Ma/2-Ma
  • Cross Over 2-Ma/1-Ma
  • Cross Over 1-Ma/2-Ma
  • Cross 1-Ma/2-Ma

backtest

img

Source
Pine
//@version=3
study(shorttitle="MA_2X", title="2 Moving Average Color Direction Detection ", overlay=true)

// === INPUTS

ma_1 = input(true, title="1-MA")
ma_type   = input(defval="SMA", title="1-MA Type: ", options=["SMA", "EMA", "WMA", "VWMA", "SMMA", "DEMA", "TEMA", "HullMA", "ZEMA", "TMA", "SSMA"])
ma_len    = input(defval=20, title="1-MA Lenght", minval=1)
ma_src    = input(close, title="1-MA Source")
reaction_ma_1  = input(defval=3, title="1-MA Reaction", minval=1)

ma_2 = input(true, title="2-MA")
Strategy parameters
Strategy parameters
1-MA
1-MA Type:
1-MA Lenght
1-MA Source
1-MA Reaction
2-MA
2-MA Type:
2-MA Lenght
2-MA Source
2-MA Reaction
FILLING
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)