back start next
[start] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [ 15 ] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47] [48] [49] [50] [51] [52] [53] [54]
15 3 Pattem Trading 3.3 Pattem Trading Sjstem (Acme M) The Acme M code is divided into five general sections - Trade Filtering - Market Pattem Identification - Pattem Qualifier Identification - Position Sizing - Signal Generation The Acme M sjstem uses two trade filters: Minimum Price and Minimum ATR. The filters can be apphed individuahy or together. For example, filter out ah stocks with aprice less than $20 and an ATR of less than one. To use just one filter, set the other filter to zero. For )1 , set the Minimum Price to zero, and set the ATR to a number such as 1.5. If the stock passes the filtering process, then the eight market pattems are tested in sequence. Two strings are created that track the bullish and bearish pattems for each bar. Iffhe Acme pattem function retums 1, then the pattem is buhislL and the corresponding letter is appended to the LongSlring\anable. If the Acme function retums 2, then the pattem is bearish, and the letter is added to the ShortSlringvasiable. After pattem identification, the bar is tested for pattem quahfieis. Fitst, the AcmeOii4vera function is called to determine whether or not the bar is on the 50-day mo\ing a-erage. If so, then the letter A is added to both the LongStiing and ShortString. Then, ah ofthe narrow range pattems are tested. Ifany narrow range pattem is found, then the letter N is appended to the appropriate string, depending on whether or notabar partem has aheadjbeen found. For example, ifabuUishTestpattem has been foimd, and the bar is anNRbar, then the letter sequence "TN" wih be contained in the LongString -ariable. If a bearish Test pattem has been foimd, then the letter sequence "TN" wih be contained in the ShortString -ariable. Now, with the pattems and quahfiers identified, the sjstem compares the number ofpattems in each string with the minimum number specified as an input parameter, MmmiiaiPatierns. Iffhe LongString has a length greater than the minimum, then a potential long entrj has been identified. Ifthe ShortString has alengfhgreaterthanfhe minimum, then a short entrjhas been identified. Finahy. the sjstem tests the fohowing entrj conditions before vatidating the signal: - Swing condition, - Range percentage condition, and - Gap condition. The EasyLanguage code for the Acme M System is shown in Example 3.4. 3.4. Acme M System Acme M System: Look for multiple combinations of market patterns 1. Cobra (C) 2. Hook (H) 3. Inside Day 2 (I) 4. Tail (L) 5. Harami (H) 6. 1-2-3 Pullback (P) 7. Test (T) 8. V Zone (V) Qualifiers 1. Moving Average (A) 2. Narrow Range (N) Inputs: {H Parameters) HiniiiiumPatterns(3), {Filter Parameters} FiltersOn(True), FUterLength(l4), HinimumPrice(15), HiniiiiumATR(i.o), (Position Parameters} Equity(iooooo), RiskHodel(3)> RiskPercent(2.0), RiskATR(l.O), EntryFactor(o.lo), DrawTargets(True); Viriables: N(O), ATR(0.0), ATRLength(20), TradeFllter(Tri BuyStop(O.O), SbortStop(O.O), (H Variables) PatternStringC"), LongStringC"), ShorlSlrinKC"). Rrl..iiiV.ilui-(o). .-(.11( »), 1 iiiiilil i(>ii(l.il.i-).
3 pattem trading 3.3 pattern trading sj-sieni (acme m) CPercent(0.25), CRangeFactor(0.8), HLength(l), HPercent(0.2), LPercent(0.3), LLength(7), PADX(25), PLength(14), VFactor(1.5), NRFactor(0.7), NLengthl(5). NLength2(10), NLength3(4), MRange(5), HRargePercent(0.4), HighText(o), LowText(O); ATR = Average(Rarge, ATRLength); BuyStop = High + (EntryFactor * ATR); Shortstop = Low - (EntryFactor * ATR); {Rtn trade filters} If FiltersOn Then TradeFilter = Close > HinimurnPrice and ATR >= HinimumATR; If TradeFilter Then Begin PatternString = ""; LongString = ""; ShortString = ""; ReturnValue = AcineCobra(CPercent, CRangeFactor); If RettrnValue > 0 Then Begin PatternString = "C"; If ReturnValue = l Then LongString = LongString + PatternString Else ShortString = ShortString + PatternString; End; ReturnValue = AcmeHook(HLefigth, HPercerrt); If ReturnValue > Then Begin PatternString = "H"; If ReturnValue = 1 Then LongString = LongString + PatternString Else ShortString - ShortString t PatternString; End; II ni.....Iii.iil-lt.tv/ Ihi-ii lli-.m IMH.Mi.l.l.iK LongString = LongString + PatternString; ShortString = ShortString + PatternString; End; ReturnValue = AcmeTail(LPercent, LLength); If ReturnValue > 0 Then Begin PatternString = "L"; If ReturnValue = 1 Then LongString = LongString + PatternString Else ShortString = ShortString + PatternString; End; ReturnValue = AcmeHarami; If ReturnValue > 0 Then Begin PatternString = "H"; If ReturnValue = 1 Then LongString = LongString + PatternString Else ShortString = ShortString + PatternString; End; ReturnValue = AcniePullback(PADX, pLength); If ReturnValue > 0 Then Begin PatternString = "P"; If ReturnValue = l Then LongString = LongString + PatternString Else ShortString = ShortString + PatternString; End; ReturnValue = AcmeTest; If ReturnValue > 0 Then Begin PatternString = "T"; If ReturnValue = l Then LongString = LongString + PatternString Else ShortString = ShortString + PatternString; End; If High >= AcmeVHigti(VFactor, Filter Length) Then ShortString = ShortString + "V"; If Low <= AcmeVLow(VFactor, FilterLength) Then LongString - LongString + "V"; (Pattern Qualifiers) ACondition - AcmeOnAveraKe(ALengih); If ACondition Thrn BcRin I.illrriiSlriri) "A"; 1<" :1" , .....K.ltiiiK t I.iM.-mi.Iiidk;
3PattemTrading ShortString = ShortString + PatternString; End; Conditioni = AcmeNarrowRange(NLengthl, l) and AcnieNarrowRange(NLengthl, 0)[ll; Condition2 = Low > Low[i] and High < High[lJ and Low[l] > Low[2] and High[lJ < High[2]; Conditions = AcmeNarrow1!ange(NLength2, 0); Condition4 = AcmeInsideDayNR(NLength3, 0); Conditions = Range <= NRFactor * ATR; If (Conditioni or ConditionZ or Conditions or Condition4 or Conditions) Then Begin PatternString = "N"; If 5trLen(LongString) > 0 Then LongStiing = LongString + PatternString; If StrLen(ShortString) > 0 Then ShortString = ShortString + PatternString; End; {Calculate shares based on risk model} N = AcmeGetShares(Equity, RiskModel, RiskPercent, RiskATR); {Multiple Pattern Buy Signal} If StrLen(LongString) >= MlnimumPatterns and Low < Lowest(Low, MRange - l)[l] and AcmeRangePercent(High, MRange) <= MRangePercent and High > Low[ll Then Begin {Draw Entry Targets on the Chart} If DrawTargets Then Conditioni = AcmeEntryTargetsCM", BuyStop, 0, 0, 0); BuyCAcme LE H") N Shares Next Bar on BuyStop Stop; End; (Multiple Pattern Sell Signal} If StrLen(ShortString) >= MinimumPatterns and High > Highest(High, MRange - i)[il ant AcmeRangePercent(Low, MRange) > (l - 1 and MRangePercent) and Low < High[l] Then Begin {Draw Entry Targets on the Chart} If DrawTargets Then Conditioni = AcmeEntryTargetsCH", 0, 0, Shortstop, O); SellCAcme SE M") N Shares Next Bar on Shortstop Stop; End; End; 3.4 Examples The following charts are examples oftrades generated by the Acme M System. Each example uses Equity of $100.000 and the Percent Volatihtj Model with a risk of 2%. For stocks, trade filtering is lumed on. and for mdices, trade filtering is tumed off. We do not apply trade filtering to the indices because fhey have lower ADX readings. 3.4.1 Abgenix The chart in Figure 3.11 shows an Acme M long entrj on August 20*, 2001. The number ofbuhish pattems is equal to four- - A Hook (H) where a short would have been tiiered but the bar re-ersed, - A Tail (L) where the open and close are in the high end offhe range, - A successful Test (T) offhe previous low two bars earher, and - The bar is a narrow range (N) bar. The ongmal posihon size offhe entrjwas 800 shares. Half offhe position (400 shares; was closed two days later, and the rest offhe position was sold on the third and fifth days after entrj. ABGXL f31.00D homo 2S.d0a 27.000 Ze.O0D 2S.O0D -24.00D 23.000 22.000 rifiin- i.ll. 1....-1 IVilliiii
[start] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [ 15 ] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47] [48] [49] [50] [51] [52] [53] [54]
|