logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

2 Pages<12
Options
Go to last post Go to first unread
wabbit  
#21 Posted : Wednesday, May 2, 2012 8:30:46 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
Nope JJ, you were right at the start of the thread ... the code returns a 17 period EMA of CLOSE prices ... that's all.

Our interpretations are faithful to the concept, even if the original code is completely borked!



wabbit [:D]

wabbit  
#22 Posted : Wednesday, May 2, 2012 8:38:37 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
Code:

//Indicatore FiltroDiMeyer



datatime=N



PeriodoEma = 17

SmoothingEma= 2 / (PeriodoEma + 1)

PeriodoStdDeviationEma = 9

PeriodoStdDeviationPrezzo = 9



//condizioni iniziali

IF BarIndex=0 THEN

	Ema = close

ELSE

	//crea EMA di Meyer

	Ema = Ema[1] * (1 - SmoothingEma) + close * SmoothingEma

	SigmaEma = STD[PeriodoStdDeviationEma](Ema)

	SigmaPrezzo = STD[PeriodoStdDeviationPrezzo](close)

	Alfa = SigmaEma / SigmaPrezzo

	SmoothingEma=Alfa

ENDIF



RETURN Ema[datatime] COLOURED(0,0,255) AS "Filtro di Meyer "



// Nella finestra 2-Variables si deve aggiungere la variabile N (con valore di default 0).

// In the 2-Variables you must add the variable N (default value 0).
The Ema[] in the RETURN line returns the values in the Ema array assigned earlier in the code.

The value of N and therefore "datatime" is a horizontal shift, similar to MS Ref().

The comment at the end only really makes sense when you're looking at the ProBuilder code window, specifically the top right:



wabbit [:D]

wabbit attached the following image(s):
ProBuilder.GIF
jjstein  
#23 Posted : Wednesday, May 2, 2012 11:16:26 AM(UTC)
jjstein

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 5/13/2005(UTC)
Posts: 715
Location: Midwest, USA

Was thanked: 1 time(s) in 1 post(s)
Hmmm. Well, I played around a bit, and see what you mean about REF() -- was able to to get to the 3029.4 using an N of 2 in ProRealTime.

That matches a MetaStock EMA 17 with horizontal shift of 2 (for today, anyway).

So...why all the rigamorole with STDEV ratio code in the original?

ProRealTime Chart -- 3029.4
UserPostedImage

jjstein  
#24 Posted : Wednesday, May 2, 2012 11:18:19 AM(UTC)
jjstein

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 5/13/2005(UTC)
Posts: 715
Location: Midwest, USA

Was thanked: 1 time(s) in 1 post(s)
Wabbit -- How did you do your ProBuilder.GIF attachment?

wabbit  
#25 Posted : Wednesday, May 2, 2012 4:50:37 PM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
AFAIK, AdmIns and Mods privilege. wabbit [:D]
Users browsing this topic
Guest (Hidden)
2 Pages<12
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.