"Crosses over" question with EMA

Questions about MultiCharts and user contributed studies.
reitberg
Posts: 77
Joined: 20 Mar 2006
Been thanked: 1 time

"Crosses over" question with EMA

Postby reitberg » 01 Jun 2011

var0 = XAverage( Close, Length ) ;

if Close crosses over var0[10] then

Does this code above mean that the Close can cross over the EMA at any moment during the last 10 bars?


Thanks

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: "Crosses over" question with EMA

Postby TJ » 01 Jun 2011

var0 = XAverage( Close, Length ) ;

if Close crosses over var0[10] then

Does this code above mean that the Close can cross over the EMA at any moment during the last 10 bars?


Thanks
the square bracket [10] is a bar reference.

in this case, it is referring to the bar that is 10 bars ago.

var0[10] refers to the value of var0 at the close of a specific bar,
and that bar is the 10th bar prior to the current bar.


Return to “MultiCharts”