TradingView
ChartArt
15. Sept. 2015 13:01

Moving Average Cross Alert, Multi-Timeframe (MTF) (by ChartArt) 

S&P 500SP

Beschreibung

See when two moving averages cross. With the option to choose between four moving average calculations:

  • SMA = simple moving average
  • EMA = exponential moving average (default)
  • WMA = weighted moving average
  • Linear = linear regression


The moving averages can be plotted from different time-frames, like e.g. the weekly or 4 hour time-frame using HL2, HLC3 or OHLC4 as price source for the calculation. In addition there is a background color alert and arrows when the moving averages cross each other when the price also rises or falls. And the moving averages are colored depending on their trend direction (if they are trending up or down).
Kommentare
JayP2577
Hi! Please can someone tell me how to add an alert for only when a sell or buy signal is generated, would be much appreciated! cheers.
nwowehfp
Hi ChartArt,
very nice script. it is what i have been trying to do in the last two years.
very simple.
i'm new to tradingview, can you explain me how can i use this script?
it is free, right?
how can I customize it an use it?
thanks a lot
A.
aventeren
Is it possible to have set this up as a 9 EMA and 20 SMA?
mehranmoradi8778
boardwalkpartners36912
Does this repaint?
Ddraig
I love this script and been using it for a little while but I was wondering how do I make an alert telling me when the buy and sell is?

I added these two lines

alertcondition(Buy, title="Buy BTC Alert")
alertcondition(Sell, title="Sell BTC Alert")

Maybe I'm a bit confused with how to set it up in TradingView's alert system?
yoda
@Ddraig, I would like to set up an alert when 4 time frames indicate a cross 2 with range candles 2 normal is this possible?
mehran7moradi02421
mikeh21
@Ddraig, The function creates alert condition that is available in Create Alert dialog. Please note, that alertcondition does NOT fire alerts from code automatically, it only gives you opportunity to create a custom condition for Create Alert dialog. Alerts must be still set manually. Also, an alert triggered based on a custom condition you created in Pine code is not displayed on a chart.
Ddraig
@mikeh21, I had forgotten that I posted this, but you are correct and I have it working quite well for me.
Mehr