|
|
| ||||
| 70% hirate with MACD Trendmeter 70% hirate with MACD Trendmeter hi I tested this indicator (unfortunately in Dutch): google: "MACD Trendmeter" (first hit) on a 15min and 1hour EUR/USD from 2006 till now. It came up with a hitrate of 70%. I just want to test it with CTL code, but I can't convert it. It's basically an add on to the MACD indicator which filters out noise and emphasizes the trend. Easy Language (TradeStation) code is: Input:Length1(5),Length2(35),Length3(15); Value1 = Average(Close, Length1)-Average(Close, Length2); Value2 = XAverage(value1,length3)[1]; Value3 = 0; if value1 crosses over 0 then buy ("EL1") this bar at close; if value1>0 and value1 crosses over value2 then buy ("EL2") this bar at close; if value1>0 and value1 crosses under value2 then exitlong ("XL") this bar at close; if value1 crosses under 0 then sell ("ES1") this bar at close; if value1<0 and value1 crosses under value2 then sell ("ES2") this bar at close; if value1<0 and value1 crosses over value2 then exitshort ("XS") this bar at close; this is the TA-script (Wallstreet Pro) code: {- Filename: MACD-Trendmeter -} var MAPer1, MAPer2, MAPer3, i: integer; MA1, MA2, Zero: TSeries; X1, X2: TLineCrossings; begin { Indicator parameter definities } MAPer1 := CreateParameterInteger('MA periode 1', 1, 999, 5, true); MAPer2 := CreateParameterInteger('MA periode 2', 1, 999, 35, true); MAPer3 := CreateParameterInteger('MA periode 3', 1, 999, 15, true); { Indicator eigenschappen } with Indicator do begin ShortName := 'MACD Trend'; { Aantal benodigde koersen om eerste indicatorwaarde te berekenen } RequiredBars := MAPer2 + MAPer3; end; MA1 := SubtractSeries(MA(Close, maExponential, MAPer1), MA(Close, maExponential, MAPer2)); MA2 := MA(MA1, maExponential, MAPer3); Zero := FillSeries(CreateSeries(BarCount), 0); X1 := Crossings(MA1, Zero); X2 := Crossings(MA1, MA2); for i:=0 to BarCount-1 do if IsValid(MA1[i]) then begin if X1[i] = lc1Over2 then EnterLong(i); if (MA1[i] > 0) and (X2[i] = lc1Over2) then EnterLong(i); if (MA1[i] > 0) and (X2[i] = lc2Over1) then ExitLong(i); if X1[i] = lc2Over1 then EnterShort(i); if (MA1[i] < 0) and (X2[i] = lc2Over1) then EnterShort(i); if (MA1[i] < 0) and (X2[i] = lc1Over2) then ExitShort(i); end; CreateLine(MA1).Color := clLime; CreateLine(MA2).Color := clRed; end. Can anyone please convert this to CTL (including trading strategy)? thanks a lot! kind regards, Ruud |
| Sponsored Links |
| |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | Rate This Thread |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 80 Trading strategies that the Big Dogs use | scratchy | Beginners Forum | 9 | 03-04-10 01:30 AM |
| 70% hirate with MACD Trendmeter | foureyes | Technical Trading | 0 | 04-16-09 01:02 PM |
| 80 Trading stategies for forex | scratchy | Beginners Forum | 20 | 05-04-07 12:07 PM |