All RSI

Posez vos questions relatives au trading, Aidez les autres membres, et découvrez les nombreuses discussions de ce forum dédié à l'apprentissage et la formation sur la bourse et la finance.

Modérateur : Administrateurs

Répondre
Message
Auteur
Avatar de l’utilisateur
jmrt
VideoBourse family
Messages : 878
Inscription : 10 mars 2010, 10:32

All RSI

#1 Message par jmrt »

Un petit indicateur libre de tous droits.
Si vous aimez, consommez.
Si vous trouvez ce machin correct, dites-le moi , j’en posterai d’autres de temps en temps.

//+------------------------------------------------------------------+
//| All RSI.mq4 |
//| binladen |
//+------------------------------------------------------------------+
#property copyright "binladen"
#property link ""
#define indicatorName "All RSI"
//----
#property indicator_separate_window
#property indicator_minimum 0
#property indicator_maximum 100
#property indicator_buffers 1
#property indicator_color1 Gold
#property indicator_level1 30
#property indicator_level2 70
#property indicator_levelcolor DimGray
//---- input parameters
extern int RSIperiod =14;
extern int AppliedPrice =0;
extern bool showHigherTimeframes=true;
extern int barsPerTimeFrame =35;
extern bool shiftRight =False;
extern color txtColor =Silver;
extern color separatorColor =DimGray;
//---- buffers
double ExtMapBuffer1[];
//----
string shortName;
string labelsShort[] ={"M1","M5","M15","M30","H1","H4","D1"};
string labelsLong[] ={"M15","M30","H1","H4","D1","W1","MN1"};
string labels[];
int periodsShort[]={PERIOD_M1,PERIOD_M5,PERIOD_M15,PERIOD_M30,PERIOD_H1,PERIOD_H4,PERIOD_D1};
int periodsLong[] ={PERIOD_M15,PERIOD_M30,PERIOD_H1,PERIOD_H4,PERIOD_D1,PERIOD_W1,PERIOD_MN1};
int periods[];
int Shift;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
if (shiftRight) Shift=1;
else Shift=0;
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexShift(0,Shift*(barsPerTimeFrame+1));
SetIndexLabel(0,"RSI");
//----
barsPerTimeFrame =MathMax(barsPerTimeFrame,30);
shortName=indicatorName+" ("+RSIperiod+")";
IndicatorShortName(shortName);
if (showHigherTimeframes)
{
ArrayCopy(labels,labelsLong);
ArrayCopy(periods,periodsLong);
}
else
{
ArrayCopy(labels,labelsShort);
ArrayCopy(periods,periodsShort);
}
//----
for(int i=1;i<7;i++)
if (Period()==periods)
{
string tmpLbl=labels;
int tmpPer=periods;
//----
for(int k=i ;k>0; k--)
{
labels[k] =labels[k-1];
periods[k]=periods[k-1];
}
labels[0] =tmpLbl;
periods[0]=tmpPer;
}
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
for(int l=0;l<7;l++)
{
ObjectDelete(indicatorName+l);
ObjectDelete(indicatorName+l+1);
}
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
string on;
int wn=WindowFind(shortName);
int k=0;
//----
for(int p=0; p<7;p++)
{
for(int i=0; i<barsPerTimeFrame;i++,k++)
ExtMapBuffer1[k]=iRSI(NULL,periods[p],RSIperiod,AppliedPrice,i);
ExtMapBuffer1[k]=EMPTY_VALUE; k+=1;
//----
on=indicatorName+p;
if(ObjectFind(on)==-1)
ObjectCreate(on,OBJ_TREND,wn,0,0);
ObjectSet(on,OBJPROP_TIME1,myTime(k-Shift*(barsPerTimeFrame+1)-1));
ObjectSet(on,OBJPROP_TIME2,myTime(k-Shift*(barsPerTimeFrame+1)-1));
ObjectSet(on,OBJPROP_PRICE1, 0);
ObjectSet(on,OBJPROP_PRICE2,100);
ObjectSet(on,OBJPROP_COLOR ,separatorColor);
ObjectSet(on,OBJPROP_WIDTH ,2);
on=indicatorName+p+1;
if(ObjectFind(on)==-1)
ObjectCreate(on,OBJ_TEXT,wn,0,0);
ObjectSet(on,OBJPROP_TIME1,myTime(k-Shift*(barsPerTimeFrame+1)-6));
ObjectSet(on,OBJPROP_PRICE1,100);
ObjectSetText(on,labels[p],9,"Arial",txtColor);
}
//----
SetIndexDrawBegin(0,Bars-k);
return(0);
}
//+------------------------------------------------------------------+
//+ Custom functions and procedures +
//+------------------------------------------------------------------+
int myTime(int a)
{
if(a<0)
return(Time[0]+Period()*60*MathAbs(a));
else return(Time[a]);
}
//+------------------------------------------------------------------+
Pièces jointes
All_RSI.mq4
(4.59 Kio) Téléchargé 295 fois
Mon blog : FXprotechnics

Jerem
Membre actif
Messages : 13
Inscription : 17 mai 2010, 14:26

Re: All RSI

#2 Message par Jerem »

Merci pour le All RSI, je cherchais justement un indic comme ça.
J'ai utilisé ton code pour me faire un All Stochastic aussi ;)

Si d'après les retours l'indicateur est bon, je le posterai ou si ça t'intéresse n'hésite pas ;)
Image

Didger
Membre actif et régulier
Messages : 73
Inscription : 24 mars 2009, 10:06

Re: All RSI

#3 Message par Didger »

Jerem a écrit :Merci pour le All RSI, je cherchais justement un indic comme ça.
J'ai utilisé ton code pour me faire un All Stochastic aussi ;)

Si d'après les retours l'indicateur est bon, je le posterai ou si ça t'intéresse n'hésite pas ;)
Merci jmrt pour l'indicateur qui est tres pratique. :lol:
Par contre je suis également preneur pour la version MACD... :wink:

Merci

Avatar de l’utilisateur
jmrt
VideoBourse family
Messages : 878
Inscription : 10 mars 2010, 10:32

Re: All RSI

#4 Message par jmrt »

graphique
Pièces jointes
Capture.PNG
Mon blog : FXprotechnics

Jerem
Membre actif
Messages : 13
Inscription : 17 mai 2010, 14:26

Re: All RSI

#5 Message par Jerem »

Voilà je viens de faire le All MACD,

J'ai repris le code de jmrt (merci à lui)
alors il y a peut-etre des variables non utilisées (je n'ai pas checké les différences entre variables MACD et RSI)

Dis moi ce que tu en penses ;)
Pièces jointes
All_MACD.mq4
(5.17 Kio) Téléchargé 274 fois
Image

Didger
Membre actif et régulier
Messages : 73
Inscription : 24 mars 2009, 10:06

Re: All RSI

#6 Message par Didger »

Jerem a écrit :Voilà je viens de faire le All MACD,

J'ai repris le code de jmrt (merci à lui)
alors il y a peut-etre des variables non utilisées (je n'ai pas checké les différences entre variables MACD et RSI)

Dis moi ce que tu en penses ;)
C'est bizzar, je n'ai pas l'UT sur le graphique

Didger
Membre actif et régulier
Messages : 73
Inscription : 24 mars 2009, 10:06

Re: All RSI

#7 Message par Didger »

Il me vient une question :roll:

Est il possible de modifier n'importe quel indicateur,afin l'utiliser en multi Time :?:

Merci

Jerem
Membre actif
Messages : 13
Inscription : 17 mai 2010, 14:26

Re: All RSI

#8 Message par Jerem »

l'UT ? désolé je suis débutant... ;)

Je pense que l'on peu modifier tous les indicateurs ouai ;)
Image

Didger
Membre actif et régulier
Messages : 73
Inscription : 24 mars 2009, 10:06

Re: All RSI

#9 Message par Didger »

Jerem a écrit :l'UT ? désolé je suis débutant... ;)

Je pense que l'on peu modifier tous les indicateurs ouai ;)
Et bien, pour un débutant c'est un bon début !!!

Merci beaucoup,

et avis aux experts :wink:

Jerem
Membre actif
Messages : 13
Inscription : 17 mai 2010, 14:26

Re: All RSI

#10 Message par Jerem »

Je n'ai que 1 semaine d'experience lol
Mais je taff dans l'informatique, et developper forcement, c'est pas compliquer... ;)

tu peux me dire ce que c'est l'UT ? (Ultimate Trade ?? lol) Unité de Temps ?
Didger a écrit :
Jerem a écrit :l'UT ? désolé je suis débutant... ;)

Je pense que l'on peu modifier tous les indicateurs ouai ;)
Et bien, pour un débutant c'est un bon début !!!

Merci beaucoup,

et avis aux experts :wink:
Image

Avatar de l’utilisateur
Guntablier
Membre actif et régulier
Messages : 53
Inscription : 13 mai 2010, 03:51

Re: All RSI

#11 Message par Guntablier »

Question candide, comment l'intégrer sur MT4 ? :oops:
Image
Je ne dors jamais, je n'ai aucun horraire... sauf celui des trades !

Avatar de l’utilisateur
jmrt
VideoBourse family
Messages : 878
Inscription : 10 mars 2010, 10:32

Re: All RSI

#12 Message par jmrt »

Jerem
ton indicateur est correct mais il manque une décimale (pas obligatoire)
et maintenant il te reste le stochastique 14, 3, 3, à faire (hehe!)
Je verrai encore ce week end pas le temps maintenant
Mon blog : FXprotechnics

Avatar de l’utilisateur
jmrt
VideoBourse family
Messages : 878
Inscription : 10 mars 2010, 10:32

Re: All RSI

#13 Message par jmrt »

Ne t'acharne pas stp sur le MACD classique qui est beaucoup trop laggy (retard de 2, 3, 4 bougies)
Je n'utilise pas les MACD sous cette forme ni aucune MACD en tant que telle. Il faut un machin très réactif surtout si l'UT est courte. (30, 15, 5 minutes c'est court)
Il vaudrait mieux prendre une MACD jurik ou Zerolag ou Hull ou autre ( je ne sais pas quoi car je n'utilise pas)
par contre je crois une stochastic 14, 3, 3 (paramétrable) pourrait être très intéressante surtout si elle est mise en relation avec les Bollinger adéquates ou les canaux de Donchian corrects.

a+
Mon blog : FXprotechnics

Avatar de l’utilisateur
jmrt
VideoBourse family
Messages : 878
Inscription : 10 mars 2010, 10:32

Re: All RSI

#14 Message par jmrt »

voici une relation Bollinger Stochastic mal construite (imprécise) mais c'est la piste à développer à mon avis sous cette forme ou une autre
Un report de la stochastic sur la courbe des prix serait sans doute à examiner aussi

#property copyright "Copyright © 2007, Matt Edmonds."
#property link "matt.edmonds@gmail.com"
//---- indicator settings
#property indicator_separate_window
#property indicator_buffers 4
#property indicator_color1 Yellow
#property indicator_color2 White
#property indicator_color3 White
#property indicator_color4 White



extern int StochasticPeriod=1;
extern int BollingerPeriod=10; // 20 , 50
extern int BollingerDeviation = 1; // 2
extern int BollingerShift = 0;

//---- indicator buffers
double Stochastic[];
double BollingerUpper[];
double BollingerLower[];
double BollingerMiddle[];


//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- 2 additional buffers are used for counting.
IndicatorBuffers(4);

//---- drawing settings
SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,2);
SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,1);
SetIndexStyle(2,DRAW_LINE,STYLE_SOLID,1);
SetIndexStyle(3,DRAW_LINE,STYLE_DOT,1);

SetIndexBuffer(0,Stochastic);
SetIndexLabel(0,"Stochastic Bollinger Bands");
SetIndexBuffer(1,BollingerUpper);
SetIndexBuffer(2,BollingerLower);
SetIndexBuffer(3,BollingerMiddle);
SetIndexLabel(3,"Bollinger Middle");

//---- name for DataWindow and indicator subwindow label
IndicatorShortName("Stochastic Bollinger Bands");

//---- initialization done
return(0);
}
//+------------------------------------------------------------------+
//| Calculations |
//+------------------------------------------------------------------+
int start()
{
int limit;
int i;
int counted_bars=IndicatorCounted();
//---- check for possible errors
if(counted_bars<0) return(-1);
//---- last counted bar will be recounted
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;

//---- main loop
for(i=0; i<Bars; i++)
{
Stochastic= iStochastic(NULL, 0, StochasticPeriod, 1, 3, MODE_SMA, 0, MODE_MAIN, i);
}

//---- done

for(i=0; i<Bars; i++)
{
BollingerLower = iBandsOnArray(Stochastic,0,BollingerPeriod,BollingerDeviation,BollingerShift,MODE_LOWER,i);
BollingerUpper = iBandsOnArray(Stochastic,0,BollingerPeriod,BollingerDeviation,BollingerShift,MODE_UPPER,i);
BollingerMiddle = iBandsOnArray(Stochastic,0,BollingerPeriod,BollingerDeviation,BollingerShift,MODE_MAIN,i);
}

return(0);
}
//+------------------------------------------------------------------+
Mon blog : FXprotechnics

Jerem
Membre actif
Messages : 13
Inscription : 17 mai 2010, 14:26

Re: All RSI

#15 Message par Jerem »

Voilà le All Stochastic ;)
Pièces jointes
All_Stoch.mq4
(5.26 Kio) Téléchargé 284 fois
Image

Avatar de l’utilisateur
jmrt
VideoBourse family
Messages : 878
Inscription : 10 mars 2010, 10:32

Re: All RSI

#16 Message par jmrt »

congratulations. Cela me semble correct le all sto.
je regarde à fond ce week-end
thx pour ton travail
on parle interprétation stochastic ce weekend si tu veux bien.
a+
Mon blog : FXprotechnics

Avatar de l’utilisateur
jmrt
VideoBourse family
Messages : 878
Inscription : 10 mars 2010, 10:32

Re: All RSI

#17 Message par jmrt »

es-tu certain que ton all stochastic all renvoie les valeurs exactes ?
comparaison à faire avec le stochastic de mt4
a+
Mon blog : FXprotechnics

Jerem
Membre actif
Messages : 13
Inscription : 17 mai 2010, 14:26

Re: All RSI

#18 Message par Jerem »

Oui je l'ai testé avec le Stochastic de MT4, et les graph coincident.
Mais sur le All Stoch, les courbes sont un peu plus "optues"
Image

Avatar de l’utilisateur
jmrt
VideoBourse family
Messages : 878
Inscription : 10 mars 2010, 10:32

Re: All RSI

#19 Message par jmrt »

si tu dis c'est juste , je te crois
thx pour l'indic
Mon blog : FXprotechnics

Répondre