TradingView
ChrisMoody
Jul 28, 2014 3:20 PM

CM_Ultimate_MA_MTF_V2 

Apple Inc.NASDAQ

Description

CM_Ultimate_MA_MTF_V2 - Added Tilson T3

Defaults to Current Timeframe on Chart.
Ability to Plot 2nd Moving Average.
Ability to set Moving Averages to Custom Chart TimeFrame. Example Daily Ma on 60 Minute chart. Many Different Options from Weekly to 1 Minute.
Ability to Plot Cross where Moving Averages Cross (If using 2nd Moving Average).
Ability to Plot Highlight Bars when Price Crosses 1st Moving Average, or 2nd MA.

Moving Averages Supported in Inputs Tab
SMA - Simple Moving Average
EMA - Exponential Moving Average
WMA - Weighted Moving Average
HullMA - Hull Moving Average
VWMA - Volume Weighted Moving Average
RMA - Moving Average used in RSI - Similar to EMA
TEMA - Triple Exponential Moving Average
Tilson T3 - Tilson T3 Moving Average
Comments
AlleexA
Thank you very much for this code. However, how can I add alert only when there is a color changing and not each time indicator is red (or green)?
Like if previous one is red the next one is red, not giving alert to sell again

Thank you so much
guz12
@AlleexA, you need to use:
alertcondition(crossover(out1, out2),"LONG_condition","Go Long!")
alertcondition(crossunder(out1, out2),"SHORT_condition","Go Short!")
and it will only trigger when one goes above the other, not at every close when the condition out1>out2 or out1<out2 is met.
I am not sure about that but it works for me when I try it with 1 minute timeframe.
Joe4711
@guz12, Hello guz12, thanks for your comments regarding the indicator "CM_Ultimate_MA_MTF_V2". It would be nice if you could send me the whole script how to generate the alarm using color change or direction change? Thanks a lot. Many greetings, Andrew
guz12
@Joe4711, Trading View doesn't allow large messages so I can send it to you in several bites. I will try in the next minutes.
joris1944
@guz12, any change you can share the code with me too? Much appreciated!
guz12
@joris1944, ok I'll do that today
zkovacs31
@guz12, hey any chance you could send it to me too? many thanks!!
guz12
@zkovacs31, you just need to add the following alert conditions before plotting:

alertcondition(crossover(out1, out2),"LONG_condition","Go Long!")
alertcondition(crossunder(out1, out2),"SHORT_condition","Go Short!")

and turn all the "true / false" parameters to "true" and also change the parameters like atype,atype2, len and len2 to better suite the chart (moving average types and lengths of the moving averages, for exemple 2,2,12,26 respectively

I will try to send you the complete script which is not much different from just adding the 2 alert conditions.
djslawo
@guz12, Where you put complete script?
More