Simple Moving Average Crossing Areas

Category: Indicators By: Leo Created: December 3, 2018, 11:07 AM
December 3, 2018, 11:07 AM
Indicators
12 Comments

Hi all,

I create and indicator that highlighted the moment previous to a crossing SMA and the moment afterwards. What is called “Golden Cross” and “Death Cross”

The indicator is very simple but an be very usefully for an automatic strategy. Because it shows in real time the moment where is inevitable the crossing of two Simple Moving Average and the moment afterwards.

How it can be used? well I can imagine an strategy using it as a filter for Higher Time Frame or multi crossing of SMA in different time frame.

Hope you like it.

period001 = 50
period = 100

WMA001=weightedaverage[period001](close)
WwMA001=weightedaverage[period001](WMA001)
SMA002=average[period002](close)

//Crossing areas definiton
CrossingBULL=0
IF WMA001 > SMA002 and WwMA001 < SMA002 then
CrossingBULL=1
ENDIF
CrossingBEAR=0
IF WMA001 < SMA002 and WwMA001 > SMA002 then
CrossingBEAR=1
ENDIF

Return CrossingBULL COLOURED(0,150,0) STYLE(histogram,2) as "Crossing Bull", CrossingBEAR COLOURED(200,0,0) STYLE(histogram,2) as "Crossing Bear", 0 as "cero"

Download
Filename: Moving-averages-Crossing-Areas.itf
Downloads: 281
Leo Veteran
" IF YOU HAVE WEALTH , IT'S A DUTY TO HELP THOSE WHO DON'T " Manoj Bhargava
Author’s Profile

Comments

Logo Logo
Loading...