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]
47 Acme R System Signal Acrne R System: Look for Rectangle Breakouts Inputs: {R Parameters) RectangleLength(4), RectangleRange(l2), RectangleFactor(1.0), RectangleRatio(0.3), {Filter Parameters} FiltersOn(True), FilterLength(l4), HiniiiiumATR(l.o), {Position Parameters} Equity(100000), RiskModel(3), RiskPercent(2.0), RiskATR(l.O), EntryFactor(0.25), DraHTargets(True); Variables: N(O), ATR(O.O), ATRLength(20), TradeFilter(True), BuyStop(O.O), ShortStop(O.O), (R Variables} InRectangle(False), RectangleHigh(0.0), RectangleLow(o.O); ATR = Volatility(ATRLength); RectangleHigh = Highest(High, Rectanglelengtti); RectangleLow = Lowest(Low, RectangleLength); BuyStop = RectangleHigh + (EntryFactor * ATR); Shortstop = RectangleLow - (EntryFactor * ATR); If FiltersOn Then TradeFilter ATR >= MinimumATR; If TradeFilter Then Begin (C.ilitil.ilr -.It-iii". I).is<-<l iiri li-.k rii<i<li-l N A.iii.4..-ish,ii.-s(iiiiiiiv. ki-.kM...i.-i. Kiaivrt.-hi. 1% 1 ): {Determine whether or not we are in a rectangle} InRectangle = AcmeRectangular(RectangleLength, RectangleRange, RectangleFactor, RectangleRatio); If InRectafigle Then Begin {Draw Entry Targets on the Chart} If DrawTargets Then Conditioni = AcmeEntryTargetsCR", BuyStop, 0, 0, 0); BuyCAcme LE S") W Shares Next Bar on BuyStop Stop; {Draw Entry Targets on the Chart} If DrawTargets Then Conditioni = AcmeEntryTargetsCR", 0, 0, Shortstop, o); SellCAcme SE R") N Shares Next Bar on ShortStop Stop; End; End; e Range R Inputs: Lengthl(2), Length2(7), Lowerlljiiit(.7), UpperLimit(1.3); Plot2(LoweTLimit, "Lower Limit"); Plot3(UpperLimit, "Upper Limit"); If Date <> CurrentDate Then Plotl(Acn)ˆRangeRatio(Lengthl, Length2), "Acme RR");
Acme Rectangle Indkator i **************»**; Acme Rectangle: Draw a rectangle Inputs: RectangleLength(4), RangeLength(12), RangeFactor(1.0), RangeRatloLi[nit(0.3); Variables: RectangleHigh(O.O), RectangleLow(O.O), UpperLine(-l). LowerLine(-i); RectangleHigh = Highest(High, RectangleLength); RectangleLow = Lowest(Low, RectangleLength); If AciiieRectangular(RectangleLength, RangeLength, RangeFactor, RangeRatioLimit) Then Begin UpperLine = TL New(Date[RectangleLength-l], Tirae[RectangleLength-l}, RectangleHigh, Date[o], Tirae[o], RectangleHigh); If UpperLine > 0 Then Begin If CetBackCroundColor = Black Then TL SetColor(UpperLine, Yellow) Else TL SetColor(UpperLine, Black); TL SetSize(UpperLine, l); End; LowerUne = TL Hew(Date[RectangleLength-l], TimetRectangleLength-1]. RectangleLow, Date[o}, Tiine[0}, RectangleLow); If LowerLine >= 0 Then Begin If CetBackCroundColor = Black Then TL SetColor(LowerLine, Yellow) Else TL SetColor(LowerLine, Black); TL SetSize(LowerLine, l); End; End; Acme Spread Acme spread: Plot the Spread I Requirements Datai:Stock l Intraday Data2: Stock 2 Intraday DataB:Stock l Daily (hidden) Data4:Stock 2 Daily (hidden) Inputs: Pricel(Close of DataB), Price2(Close of Data4), StandardDeviatlons(l.s), Length(30); Variables: HV1(0.0}, HV2(0.0), CV(O.O), VolatilityBand(O.O), VolatUityConstant (0.0523), UpperBand(O.o), LowerBand(O.O), Spread(O.O); If Date <> Date[l} Then Begin HVl = AcmeVolatility(Length) of Data3; HV2 = AcmeVobtility( Length) of Data4; CV = Correlation(Pricel, Price2, Length); VolatilityBand = VolatilityConstant * (HVi + HV2) * (l - CV); UpperBand = StandardDeviations * VolatilityBand; LowerBand = StandardDeviations * (-VolatilityBand); End; Spread = (Close of Datai / Pricel) - (Close of Data2 / Price2); Plotl(Spread, "Spread"); Plot2(UpperBand, "UB"); Plot3(0, "Zero"); Plot4(LowerBand, "LB");
Acme Trade Manager Signal Acme Trade Manager: Set stops and profit targets ***♦#♦♦*♦******♦**************♦♦**»»********♦♦*** Inputs: SySternlDC"), {Position Management Parameters} ExitFactor(0.2S), StopBars(1), ProfitTarget(True), ProfltFactor(0.9), HaldBars(S), DrawTargets(True), {Trade Logging} LogTrades(False), LogFileCOrders.txt"); Variables: ATR(0.0), ATRLength(20), ATRFactor(O.O), ProfitBars(O), SellStop(O.o), SeUTargeti(o.o), SellTarget2(o.o). C0VˆrStop(0.D), CoverTarget1(0.0), CoveiTarget2(o.o); ATR = Volatility(ATRLength); ATRFactor = ProfitFactor * ATR; ProfitBars = IntPortion(HoldBars/2) * 1; SellStop = Lowest(Low, StopBars) - (ExitFactor * ATR); ExitLongCAcme LX-") Next Bar at SellStop Stop; If ProfitTarget Then Begin SellTargetl = High + ATRFactor; ExitLongCActne LX+") CurrentContracts/2 Shares Next Bar at SellTargetl Limit; SellTarget2 = High[ProfitBars} + (2 * ATRFactor); ExitLongCAcme LX++") CurxentContracts/3 Shares Next Bar at SellTarget2 Limit; End; If BarsSinceEntry >= HoldBars - 1 Then IxitlnnRCAcmo IX") Ni-xl B.ii on Opi-n. (uvi-rMup llil......L(Hitih, ».!..) I (Ulll.ul"! * AIR); ExitShortCAcme SX-") Next Bar at CoverStop Stop; If ProfitTarget Then Begin CoverTargetl = Low - ATRFactor; ExitShortCAcme SX+") CiirrentContracts/2 Shares Next Bar at CoverTargetl Limit; CoverTarget2 = Low[ProfitBars] - (2 • ATRFactor); ExitShortCAcme SX++") CurrentContracts/2 Shares Next Bar at CoverTarget2 Limit; End; If BarsSinceEntry >= HoldBars - l Then ExitShortCAcme SX") Next Bar on Open; {Draw Exit Targets on the Chart} If DrawTargets Then If MarketPosition = X Then Conditioni = AcmeExitTargets(SystˆmID. SellStop. SellTargetl, SellTarget2) Else If HarketPosition = -1 Then Conditioni = AcmeExitTargets(SystemID, CoverStop, CoverTargetl, CoverTarget2); {Log Trades for Spreadsheet Export} Conditioni = AcmeLogTrades(LogTrades, LogFile, SystemID); Acme Triangle Acme Triangle: Plot Triangle Formations Inputs: Length(20), Strength(3), MaximumSlope(o.5), MaximumPivots(3); Variables: FoundHighPivot(False), FoundLowPivot(False), N(O), SHl(-l), SLl(-l), SH2(-a), SL2(-1), TH(-l), TL(-l). HighS]opr(o.o), lowM«».-("-»). Ii...-.iu.j:l,(.i.(.). ll..i.ilh.w(ii.ii);
[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]
|