RE: Range Indikator als Trendfilter | |
hallo Alex,
intereste Idee.
Code:
INputs:L1(5),L2(10),TT(1700); Array:HL[20](0) ; Vars:20); if time = TT then begin for X = 20 downto 1 begin HL[X] = HL[X - 1]; end; HL[0] = (HighToday - LowToday); end;
if HL[20] <> 0 then begin value1 = T3Average(high - low,L1); value2 = Average_a(HL, L2); value3 = T3Average(value2,2); value4 = value1 / value3; end;
Plot1(value4,"Ranges"); commentary("HL[0] = ",HL[0],newline,"HL[2] = ",HL[2],newline,"Time = ",time);
Function - HighToday
vars:HT(0);
HT=HT[1];
if date>date[1] then HT=0;
if h>HT then HT=h;
hightoday=HT;
LowToday sollte jetzt klar sein.
Leider sieht diese Indikator auf Dax und Bunds nicht sehr überzeugend aus. Keine eindeutige Signale.
Probiere dieses: {PaintBar}
Inputs:price(close),r(125),s(25),u(5),Grenze(10); vars:Grenze2(-10),M(0),N(0); Grenze2 = Grenze * -1;
value1 = TSI(Price, r, s, u);
if value1 crosses under Grenze OR value1 crosses over Grenze2 then begin M = 1; end; if M = 1 and SwingHighBar(1,value1,1,2) = 1 OR SwingLowBar(1,value1,1,2) = 1 then begin N = 1; end; if value1 crosses over Grenze or value1 crosses under Grenze2 then begin M = 0; N = 0; end;
if N = 1 then begin PlotPaintBar(high,low,"NT"); end;
grüße,
Jim
|