Zum Inhalt springen
View in the app

A better way to browse. Learn more.

#T/N/X/T

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.

RSI Indikator von Hand programmiert - MT4

Geschrieben

Weiss jemand einen RSI-Indikator irgendwo zum downloaden, der von "Hand" programmiert ist - also nicht die interne Funktion iRSI() von Metatrader benutzt, sondern die Formel implementiert hat. Ich muss eine kleine Modifikation vornehmen.

 

Danke

Featured Replies

Geschrieben

Ich befürchte ja das ich deine Frage falsch verstehe, aber ich versuchs trotzdem.

 

Nutzt dir das nichts ?

 

RSI

Geschrieben

Weiss jemand einen RSI-Indikator irgendwo zum downloaden, der von "Hand" programmiert ist - also nicht die interne Funktion iRSI() von Metatrader benutzt, sondern die Formel implementiert hat. Ich muss eine kleine Modifikation vornehmen.

 

Danke

//+------------------------------------------------------------------+
//|                                                      	RSI.mq4 |
//|                  	Copyright © 2004, MetaQuotes Software Corp. |
//|                               		http://www.metaquotes.net/ |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2004, MetaQuotes Software Corp."
#property link  	"http://www.metaquotes.net/"

#property indicator_separate_window
#property indicator_minimum 0
#property indicator_maximum 100
#property indicator_buffers 1
#property indicator_color1 DodgerBlue
//---- input parameters
extern int RSIPeriod=14;
//---- buffers
double RSIBuffer[];
double PosBuffer[];
double NegBuffer[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                 		|
//+------------------------------------------------------------------+
int init()
 {
  string short_name;
//---- 2 additional buffers are used for counting.
  IndicatorBuffers(3);
  SetIndexBuffer(1,PosBuffer);
  SetIndexBuffer(2,NegBuffer);
//---- indicator line
  SetIndexStyle(0,DRAW_LINE);
  SetIndexBuffer(0,RSIBuffer);
//---- name for DataWindow and indicator subwindow label
  short_name="RSI("+RSIPeriod+")";
  IndicatorShortName(short_name);
  SetIndexLabel(0,short_name);
//----
  SetIndexDrawBegin(0,RSIPeriod);
//----
  return(0);
 }
//+------------------------------------------------------------------+
//| Relative Strength Index                                      	|
//+------------------------------------------------------------------+
int start()
 {
  int	i,counted_bars=IndicatorCounted();
  double rel,negative,positive;
//----
  if(Bars<=RSIPeriod) return(0);
//---- initial zero
  if(counted_bars<1)
 	for(i=1;i<=RSIPeriod;i++) RSIBuffer[bars-i]=0.0;
//----
  i=Bars-RSIPeriod-1;
  if(counted_bars>=RSIPeriod) i=Bars-counted_bars-1;
  while(i>=0)
	{
 	double sumn=0.0,sump=0.0;
 	if(i==Bars-RSIPeriod-1)
   	{
		int k=Bars-2;
		//---- initial accumulation
		while(k>=i)
  		{
       	rel=Close[k]-Close[k+1];
       	if(rel>0) sump+=rel;
       	else  	sumn-=rel;
       	k--;
  		}
		positive=sump/RSIPeriod;
		negative=sumn/RSIPeriod;
   	}
 	else
   	{
		//---- smoothed moving average
		rel=Close[i]-Close[i+1];
		if(rel>0) sump=rel;
		else  	sumn=-rel;
		positive=(PosBuffer[i+1]*(RSIPeriod-1)+sump)/RSIPeriod;
		negative=(NegBuffer[i+1]*(RSIPeriod-1)+sumn)/RSIPeriod;
   	}
 	PosBuffer[i]=positive;
 	NegBuffer[i]=negative;
 	if(negative==0.0) RSIBuffer[i]=0.0;
 	else RSIBuffer[i]=100.0-100.0/(1+positive/negative);
 	i--;
	}
//----
  return(0);
 }
//+-----------------------------------------------------------------+

 

Kommt von http://codebase.mql4.com/263

 

Interessant noch die Theorie dazu auf Deutsch : http://www.chartundr...katoren/rsi.htm

 

KB

Geschrieben
  • Autor

danke Leute! Ich bin heute mit dem falschen Bein aufgestanden. :girl_hysteric: Logisch: der RSI ist ja als Source-Code dabei. Ich habe letzte Woche zu lange ein anderes SDK programmiert. Bei Metatrader sind die Funtionen ja dabei.

 

Sorry für die dumme Frage. Aber danke - jetzt weiss ich wenigstens wo ihr alle euren Samstag Mittag verbringt :beers:

Geschrieben

Weil es grade zum Thema passt.

Es gibt ein sehr umfangreiches Buch, dass sich einzig und allein dem RSI widmet.

Amazon

 

Gibt es auch als PDF.....

Geschrieben

Meine persönliche "Übersetzung" für RSI: Relativ Sinnloser Indikator (bitte nicht persönlich nehmen)

 

SCNR

Geschrieben

Meine persönliche "Übersetzung" für RSI: Relativ Sinnloser Indikator (bitte nicht persönlich nehmen)

Yep, entsinne mich, je nach Periode sieht der RSI 1 zu 1 identisch mit dem Linienchart der Schlußkurse aus.

Dein Kommentar

Du kannst jetzt schreiben und Dich später registrieren. Wenn Du ein Konto hast, melde Dich jetzt an, um unter Deinem Benutzernamen zu schreiben.

Gast
Auf dieses Thema antworten...

Account

Navigation

Suche

Suche

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.