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).
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?
@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.