{- Filename: CompositeIndex_adjust -} (************************************************ Indicator gemaakt op: 1/29/2008 Auteur: ************************************************) var Prm1, Prm2, Prm3, Prm4, Prm5, Prm6,i : integer; Calc : real ; SRSI3, SRSId, CI, MA1, MA2 : TSeries; begin Prm1 := CreateParameterInteger('MA1', 5, 20, 13, True); Prm2 := CreateParameterInteger('MA2', 20, 50, 33, True); Prm3 := CreateParameterInteger('RSI-kort',1,14,3, True); Prm4 := CreateParameterInteger('MA-RSI-kort',1,10,3,True); Prm5 := CreateParameterInteger('RSI-lang',7,21,14, True); Prm6 := CreateParameterInteger('Momentum',3,15,9, True); with Indicator do begin ShortName := 'Comp_Index_Adjust' ; RequiredBars := Prm2 ; end; Begin i := 1 ; SRSId := CreateSeries(Barcount); SRSI3 := CreateSeries(BarCount); CI := CreateSeries(BarCount); MA1 := CreateSeries(BarCount); MA2 := CreateSeries(Barcount); End; For i:= 1 to (Barcount-1) do Begin SRSI3 := MA((RSI(Close,Prm3)),maSimple,Prm4); SRSId := Momentum((RSI(Close,Prm5)),Prm6); Calc := SRSI3[i]+SRSId[i]; CI[i] :=Calc; MA1 := MA(CI,maSimple,Prm1); MA2 := MA(CI,maSimple,Prm2); End; With CreateLine(CI) Do Begin Width :=2 ; Color := RGB(0,128,255); End; With CreateLine(MA1) Do Begin Color := CLPurple; End; With CreateLine(MA2) Do Begin Color := ClGreen; End; end.