09-09-2011, 10:47
|
#16 (permalink)
|
|
Almost Jazz Pianist
Data registrazione: Aug 2004
Località: Fiji
Messaggi: 11,613
|
Citazione:
Originalmente inviato da 100pezzi
nella beta 5.4 basta mettere
Codice:
Input: TCLen(10), MA1(23), MA2(50);
//Input: TCLen(NumericSimple), MA1(NumericSimple), MA2(NumericSimple);
Var: XMac(0), Frac1(0), PF(0), PFF(0), Frac2(0), Factor(.5),
value1, value2, value3, value4, SchaffTC;
SETCALCOSCARRAY(true);
{Calculate a MACD Line}
XMac = MACD(c,MA1,MA2) ;
{1st Stochastic: Calculate Stochastic of a MACD}
Value1 = LLV(XMac, TCLen);
Value2 = HHV(XMac, TCLen) - Value1;
{%FastK of MACD}
Frac1 = IIF(Value2 > 0, ((XMac - Value1) / Value2) * 100, Frac1[1]);
{Smoothed calculation for %FastD of MACD}
PF = IIF(CurrentBar<=1, Frac1, PF[1] + (Factor * (Frac1 - PF[1])) );
{2nd Stochastic: Calculate Stochastic of Smoothed Percent FastD, ‘PF’, above.}
Value3 = LLV(PF, TCLen);
Value4 = HHV(PF, TCLen) - Value3;
{%FastK of PF}
Frac2 = IIF(Value4 > 0, ((PF - Value3) / Value4) * 100, Frac2[1]);
{Smoothed calculation for %FastD of PF}
PFF = IIF(CurrentBar<=1, Frac2, PFF[1] + (Factor * (Frac2 - PFF[1])));
plotchartNoZero(PFF, 1, red, solid, 1);
|
ho notato che l'indicatore aspetta la chiusura della candela per aggiornarsi, è possibile avere l'aggiornamento in tempo reale?
|
|
|