ludwigii
Forumer storico
Ciao Lud..
ma quella famosa lettera C del grafico postato a pag 74
quando parte!!??
ci credo poco, era un'idea così, cmq nn si sa mai.
Ciao Lud..
ma quella famosa lettera C del grafico postato a pag 74
quando parte!!??
probabilmente potrebbero iniziare a salire con il discorso di Bernanke verso le 16-16.30 perchè ora siamo a 15 mezzore, potrebbe essere così, stiamo a vedere, seguiamo oscillatori e medie.
da un punto di vista degli oscillatori, sia gli usa che noi (nn il Dax) siamo in chiusura della fase ciclica di ribasso mi pare, almeno a livello di tempi e di breve ovviamente, non credo di medio
Grazie. M5 sta per?
Come segno di riconoscenza a Lud per i suoi insegnamenti, offro a lui e a tutti i seguaci del 3D, questo programmino MQL4 che rappresenta in un unico grafico l'oscillatore Shaff calcolato su 4 TF :
M5 (traccia rossa punteggiata),
M15 (traccia oro continua,
H1 (traccia verde continua)
e H4 (traccia azzurra punteggiata).
IMPORTANTE : l'indicatore va caricato esclusivamente su grafico M5 !!!
A me e' utile anche come (PSEUDO) rappresentazione dei cicli :
traccia H4 = ciclo settimanale
traccia H1 = ciclo giornaliero
traccia M15 = cico 6-8 ore.
Spero vi possa servire.
Ecci il sorgente MQL4 :
//+------------------------------------------------------------------+
//| Multi Shaff Timeframe Chart |
//| IMPORTANT : USE ONLY WITH M5 CHART |
//+------------------------------------------------------------------+
//////////////////////////////////////////////////////////////////////
#property indicator_separate_window
#property indicator_buffers 4
#property indicator_width1 1
#property indicator_color1 Red
#property indicator_width2 2
#property indicator_color2 Gold
#property indicator_width3 2
#property indicator_color3 Lime
#property indicator_width4 1
#property indicator_color4 Aqua
//---- input parameters
extern int MAShort=8;
extern int MALong=13;
extern int Cycle=8;
//---- Variables
double Shaff_M5[1999], Shaff_M15[1999], Shaff_H1[1999], Shaff_H4[1999];
double MCD, LLV, HHV, MA_Short, MA_Long, ST;
double smconst, Old_M5, Old_M15, Old_H1, Old_H4;
bool check_begin=false;
bool check_begin_MA=false;
int n, s, Tmfrm, strt, oldstrt_M15, oldstrt_H1, oldstrt_H4;
double MA, OldShaff;
double MCD_Arr[99];
int pos, barstocalc;
//////////////////////////////////////////////////////////////////////
int init()
{
//IndicatorShortName("LinearRegressionChannel:"+BarsToCount);
SetIndexStyle(0,DRAW_LINE,STYLE_DOT);
SetIndexBuffer(0,Shaff_M5);
SetIndexStyle(1,DRAW_LINE,STYLE_SOLID);
SetIndexBuffer(1,Shaff_M15);
SetIndexStyle(2,DRAW_LINE,STYLE_SOLID);
SetIndexBuffer(2,Shaff_H1);
SetIndexStyle(3,DRAW_LINE,STYLE_DOT);
SetIndexBuffer(3,Shaff_H4);
oldstrt_M15 = 1999;
oldstrt_H1 = 1999;
oldstrt_H4 = 1999;
Old_M5 = 50.0;
Old_M15 = 50.0;
Old_H1 = 50.0;
Old_H4 = 50.0;
double a = 1+Cycle/2;
smconst = 2/a;
return(0);
}
//////////////////////////////////////////////////////////////////////
int deinit()
{
return(0);
}
//////////////////////////////////////////////////////////////////////
int start()
{
int countedBars=IndicatorCounted();
if(countedBars < 0)
{
Print("error counting bars !");
return;
}
barstocalc = Bars - countedBars - 1;
if (barstocalc > 1999) barstocalc = 1999;
for( pos=barstocalc; pos>=0; pos-- )
{
strt = pos;
Tmfrm = 5;
OldShaff = Old_M5;
Old_M5 = Shaff_Calc();
Shaff_M5[pos] = Old_M5;
strt = iBarShift( Symbol(), PERIOD_M15, Time[pos], false);
if(strt != oldstrt_M15)
{
Tmfrm = 15;
OldShaff = Old_M15;
Old_M15 = Shaff_Calc();
oldstrt_M15 = strt;
}
Shaff_M15[pos] = Old_M15;
strt = iBarShift( Symbol(), PERIOD_H1, Time[pos], false);
if(strt != oldstrt_H1)
{
Tmfrm = 60;
OldShaff = Old_H1;
Old_H1 = Shaff_Calc();
oldstrt_H1 = strt;
}
Shaff_H1[pos] = Old_H1;
strt = iBarShift( Symbol(), PERIOD_H4, Time[pos], false);
if(strt != oldstrt_H4)
{
Tmfrm = 240;
OldShaff = Old_H4;
Old_H4 = Shaff_Calc();
oldstrt_H4 = strt;
}
Shaff_H4[pos] = Old_H4;
}
return(0);
}
/////////////////////////////////////////
double Shaff_Calc()
{
LLV=0;
HHV=0;
ST=0;
MA=OldShaff;
check_begin = false;
check_begin_MA = false;
n = 1;
s = 1;
//Print(pos," ",TimeHour(Time[pos])," ",Tmfrm," ",strt," ",OldShaff);
for( int shft=Cycle+1; shft>=0; shft-- )
{
MA_Short=iMA(Symbol(),Tmfrm,MAShort,0,MODE_EMA,PRICE_OPEN,shft+strt);
MA_Long=iMA(Symbol(),Tmfrm,MALong,0,MODE_EMA,PRICE_OPEN,shft+strt);
MCD_Arr[n] = MA_Short - MA_Long;
MCD = MA_Short - MA_Long;
if (n >= Cycle )
{
n = 1;
check_begin = true;
}
else n = n + 1;
if (check_begin)
{
for (int i = 1 ;i<=Cycle; i++)
{
if (i == 1) LLV = MCD_Arr;
else
if( LLV > MCD_Arr ) LLV = MCD_Arr;
if (i == 1 ) HHV = MCD_Arr;
else
if( HHV < MCD_Arr) HHV = MCD_Arr;
}
ST = ((MCD - LLV)/(HHV - LLV))*100 + 0.01;
s = s + 1;
if (s >= (Cycle)/2)
{
s = 1;
check_begin_MA = true;
}
}
else ST = 0;
//Print(pos," ",n," ",MCD," ",LLV," ",HHV," ",ST);
if (check_begin_MA )
{
MA = smconst * (ST - OldShaff) + OldShaff;
}
}
return(MA);
}