Skip to content
View in the app

A better way to browse. Learn more.

Tom Next - Trading Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

EMA ausführliche code gesucht

Moin,

kennt jemand von euch den EMA (Exponential moving average) ohne die Abkürzung des Aufrufs seines letzten Wertes?

Ich will meine Indikatoren mit Arrays realisieren und stecke hier fest. Nehme ich den defaut code so bezieht es sich auf den letzten Balken und nicht auf den vorherigen ArrayWert.

Ich will mit den Array meinen eigenen MTF in MC kreieren und da werden Balken her obsolet wenn nicht gar schädlich (in diesem Fall).

Featured Replies

'Start Berechnung des exponentiellen FAST Moving Average
'###################################################################################################################################################			

startindex= erstedatenperiode(Daten)
endindex= letztedatenperiode(Daten)

		Wert=Daten(startindex)
		Faktor = 2/( 1 + FastEMA )

		For i = startindex + 1 to endindex
				Wert = Wert*(1-Faktor)+ Daten(i)*Faktor
				Ergebnis(i)=Wert
		Next 

 

Das ist der Code in VBS , denke , dass er Dir am ehesten helfen kann ( wegen MC ) .

 

"Daten" = Close (oder High oder Low oder Open :-) )

 

Hier noch die Theorie dazu : http://vtadwiki.vtad.de/index.php/Exponentieller_Durchschnitt

 

Es wird also nur der vorherige Wert des Array genutzt , begonnen wird mit dem Close der ersten Periode .

 

Gruß KB

 

PS.: ggfs auch in MT4 wenn Du das bevorzugst ....

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.