1 pi?ce(s) jointe(s) Bonjour ? tous,
L'int?rieur avec le code ci-dessous est cens? dessiner et identifier les lignes S/R mais je ne vois que des points. Qu'est-ce qui ne va pas?? Voir photo jointe aussi.
// ------------------------------------------------------------ -------------------
//| KG Support Resistance.mq4 |
//| Copyright ? 2007, MetaQuotes Software Corp. |
//|
http://www.metaquotes.net|
//| modifier par frantacech |
// ------------------------------------------------------------ -------------------
#propri?t? copyright Kang_Gun
#lien de propri?t? http://www.free-knowledge.com
cha?ne R?vision = R?vision 2?;
//------------------------------------------------------------- -------------------
//R?vision 1 = frantacech ajoute les options allert, email et SR TF
//R?vision 2 = KG acc?l?re le niveau SR
#propri?t? indior_chart_window
#propri?t? indior_buffers 8
#property indior_color1 Jaune
#property indior_color2 Jaune
#property indior_color3 Vert Lime
#property indior_color4 Vert Lime
#property indior_color5 Bleu
#property indior_color6 Bleu
#property indior_color7 Rouge
#property indior_color8 Rouge
//---- Param?tres d'entr?e
extern bool AlertePossible = vrai?;
extern bool AlertOnlySound = false?;
cha?ne externe Sound = tick.wav;
extern bool SendMailPossible = faux?;
extern bool ShowM15 = vrai?;
extern bool ShowH1 = vrai?;
extern bool ShowH4 = vrai?;
extern bool ShowD1 = vrai?;
//---- tampons
double ExtMapBuffer1[]?;
double ExtMapBuffer2[]?;
double ExtMapBuffer3[]?;
double ExtMapBuffer4[]?;
double ExtMapBuffer5[]?;
double ExtMapBuffer6[]?;
double ExtMapBuffer7[]?;
double ExtMapBuffer8[]?;
int KG?;
// ------------------------------------------------------------ -------------------
//| Fonction d'initialisation int?rieure personnalis?e |
// ------------------------------------------------------------ -------------------
int init()
{
//---- ? l'int?rieur
si (MontrerM15) {
SetIndexStyle(0,DRAW_ARROW,STYLE_DOT,1,Jaune);
SetIndexDrawBegin(0,KG-1);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexLabel(0,R?sistance M15);
SetIndexArrow(0, 158);
SetIndexStyle(1,DRAW_ARROW,STYLE_DOT,1,Jaune);
SetIndexDrawBegin(1,KG-1);
SetIndexBuffer(1,ExtMapBuffer2);
SetIndexLabel(1, prend en charge M15);
SetIndexArrow(1, 158);
}
si (MontrerH1) {
SetIndexStyle(2,DRAW_ARROW,STYLE_DOT,1,LimeGreen);
SetIndexDrawBegin(2,KG-1);
SetIndexBuffer(2,ExtMapBuffer3);
SetIndexLabel(2,R?sistance H1);
SetIndexArrow(2, 158);
SetIndexStyle(3,DRAW_ARROW,STYLE_DOT,1,LimeGreen);
SetIndexDrawBegin(3,KG-1);
SetIndexBuffer(3,ExtMapBuffer4);
SetIndexLabel(3,Soutien H1);
SetIndexArrow(3, 158);
}
si (MontrerH4) {
SetIndexStyle(4,DRAW_ARROW,STYLE_DOT,1,Blue);
SetIndexDrawBegin(4,KG-1);
SetIndexBuffer(4,ExtMapBuffer5);
SetIndexLabel(4,R?sistance H4);
SetIndexArrow(4, 158);
SetIndexStyle(5,DRAW_ARROW,STYLE_DOT,1,Blue);
SetIndexDrawBegin(5,KG-1);
SetIndexBuffer(5,ExtMapBuffer6);
SetIndexLabel(5,Soutien H4);
SetIndexArrow(5, 158);
}
si (MontrerD1) {
SetIndexStyle(6,DRAW_ARROW,STYLE_DOT,1,Red);
SetIndexDrawBegin(6,KG-1);
SetIndexBuffer(6,ExtMapBuffer7);
SetIndexLabel(6,R?sistance D1);
SetIndexArrow(6, 158);
SetIndexStyle(7,DRAW_ARROW,STYLE_DOT,1,Rouge);
SetIndexDrawBegin(7,KG-1);
SetIndexBuffer(7,ExtMapBuffer8);
SetIndexLabel(7,Soutien D1);
SetIndexArrow(7, 158);
}
//----
retour(0);
}
// ------------------------------------------------------------ -------------------
//| Fonction de d?sinitialisation de l'int?rieur du client |
// ------------------------------------------------------------ -------------------
int deinit()
{
retour(0);
}
//------------------------------------------------------------- ------------------
bool Fractal (string M,int P, int shift)
{
if (Period()gt;P) return(-1);
P=P/P?riode();
si (shiftlt;P)retour(-1);
if (shiftgt;Bars-P)return(-1);
pour (int i=1;ilt;=P;i )
{
si (M==U)
{
if (High[shift i]gt;High[shift])return(-1);
if (High[shift-i]gt;=High[shift])return(-1);
}
si (M==L)
{
if (Low[shift i]lt;Low[shift])return(-1);
if (Low[shift-i]lt;=Low[shift])return(-1);
}
}
retour(1);
}
//------------------------------------------------------------- ------------------
int start()
{
entier D1=1440, H4=240, H1=60, M15=15?;
KG=Barres?;
tandis que(KGgt;=0)
{
si (MontrerM15)
{
si (Fractale(U,M15,KG)==1)
{
ExtMapBuffer1[KG]=??lev?[KG]?;
if (ExtMapBuffer1[KG]==Bid) {MakeAlert(M15 Res, KG); }
}
sinon {ExtMapBuffer1[KG]=ExtMapBuffer1[KG 1]?; if (ExtMapBuffer1[KG]==Bid) {MakeAlert(M15 Res, KG); }}
si (Fractale(L,M15,KG)==1)
{
ExtMapBuffer2[KG]=Faible[KG]?;
if (ExtMapBuffer2[KG]==Bid) {MakeAlert(M15 Sup, KG); }
}
sinon {ExtMapBuffer2[KG]=ExtMapBuffer2[KG 1]?; if (ExtMapBuffer2[KG]==Bid) {MakeAlert(M15 Sup, KG); }}
}
si (MontrerH1)
{
si (Fractale(U,H1,KG)==1)
{
ExtMapBuffer3[KG]=??lev?[KG]?;
if (ExtMapBuffer3[KG]==Bid) {MakeAlert(H1 Res, KG); }
}
sinon {ExtMapBuffer3[KG]=ExtMapBuffer3[KG 1]?; if (ExtMapBuffer3[KG]==Bid) {MakeAlert(H1 Res, KG); }}
si (Fractale(L,H1,KG)==1)
{
ExtMapBuffer4[KG]=Faible[KG]?;
if (ExtMapBuffer4[KG]==Bid) {MakeAlert(H1 Sup, KG); }
}
sinon {ExtMapBuffer4[KG]=ExtMapBuffer4[KG 1]?; if (ExtMapBuffer4[KG]==Bid) {MakeAlert(H1 Sup, KG); }}
}
si (MontrerH4)
{
si (Fractale(U,H4,KG)==1)
{
ExtMapBuffer5[KG]=??lev?[KG]?;
if (ExtMapBuffer5[KG]==Bid) {MakeAlert(H4 Res, KG); }
}
sinon {ExtMapBuffer5[KG]=ExtMapBuffer5[KG 1]?; if (ExtMapBuffer5[KG]==Bid) {MakeAlert(H4 Res, KG); }}
si (Fractale(L,H4,KG)==1)
{
ExtMapBuffer6[KG]=Faible[KG]?;
if (ExtMapBuffer6[KG]==Bid) {MakeAlert(H4 Sup, KG); }
}
sinon {ExtMapBuffer6[KG]=ExtMapBuffer6[KG 1]?; if (ExtMapBuffer6[KG]==Bid) {MakeAlert(H4 Sup, KG); }}
}
si (MontrerD1)
{
si (Fractale(U,D1,KG)==1)
{
ExtMapBuffer7[KG]=??lev?[KG]?;
if (ExtMapBuffer7[KG]==Bid) {MakeAlert(D1 Res, KG); }
}
sinon {ExtMapBuffer7[KG]=ExtMapBuffer7[KG 1]?; if (ExtMapBuffer7[KG]==Bid) {MakeAlert(D1 Res, KG); }}
si (Fractale(L,D1,KG)==1)
{
ExtMapBuffer8[KG]=Faible[KG]?;
if (ExtMapBuffer8[KG]==Bid) {MakeAlert(D1 Sup, KG); }
}
sinon {ExtMapBuffer8[KG]=ExtMapBuffer8[KG 1]?; if (ExtMapBuffer8[KG]==Bid) {MakeAlert(D1 Sup, KG); }}
}
KG--;
}
retour(0);
}
// ------------------------------------------------------------ -------------------
DateHeure AlertTime?;
void MakeAlert(string _Notice, int Index)
{
si (Index gt;= 1) retour?;
if (AlertTime == iTime(Symbol(), Period(), Index)) return?;
AlertTime = iTime(Symbole(), P?riode(), Index);
cha?ne Notice = StringConenate(Croix , Symbole(), , _Notice);
if (AlertPossible) {PlaySound(Sound); if (AlertOnlySound==false) {Alert(Notice);}}
if (SendMailPossible) SendMail(Avis, );
}
https://www.sundytrading.com/crypto-...ng-profit.html