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]
42 Acme F System Signal Lme F Systen: Look for float breakouts and pullbacks Inputs: {F Parameters} FloatFactor(1.0), BaseBars(7), BaseFactor(o.25), 1 5( )> TableFactor(0.35), (Filter Parameters} FiltersOn(True), FilterLength(30), Hini[nu(nPiice(l5), {Position Parameters} Equity(lOOOOO), RiskModelO), RiskPercent(2.0), RiskATR(l.O), EntryFactor(0.3), DrawTargets(True); Variables: N(o}, ATR(0.0), ATRLength(20), MA(O.O), HALength(SO), TradeFilter(True), BuyStop(O.O), ShDrtStop(O.O), {F Variables} TheFloat(o.o), FloatHighl(o.o), FloatHigh2(0.0), HighBaseCount(l), FloatLowl(0.0), FloatLow2(o.o), LowBaseCount(l), BaseDelta(0.0), TableOelta(O.O); If TheFloat = 0.0 Then Begin {Compute the number of base bars based on float turnover) ThH 1o.il riiMll.i. h>l * A<trKrt-II lo.)l(l,il4iibi>lN.irir); End Else If TheFloat > 0.0 Then Begin {Initialize variables} ATR = Average{Range, ATRLength}; HA Aveiage(aose, HALength); FloatHighl = AcmeFloatChannelHigh(TheFloat); FloatLowl = AcmnFloatChannelL0W(TheFloat); {Run trade filters} If FiltersOn Then TradeFilter - Close >= HinimunPiice; If TradeFilter Then Begin {Calculate shares based on risk model} N = AcmeGetShares(Equity, RiskModel, RiskPercent, RiskATR); {Entry Signals} BuyStop -r High + (EntryFactor » ATR); Shortstop = Low - (EntryFactor * ATR); BaseDelta = BaseFactor * ATR; TableDelta = TableFactor * ATR; If HlghBaseCount >= BaseBars and High > (FloatHighl - ATR) and Highest(High, TableBars) - Lowest(High, TableBars) <= TableDelta and Close > MA Then Begin {Draw Entry Targets on the Chart} If DrawTaigets Then Conditionl = AcmeEntryTargets("F", BuyStop, 0, 0, 0); Buy("Acme LE FB"} N Shares Next Bar at BuyStop Stop; End; If LowBaseCount >= BaseBars and Low < (FloatLowl + ATR) and Highest(Low, TableBars) - Lowest(Low, TableBars) <= TableDelta and Close < MA Then Begin {Draw Entry Targets on the Chart} If DrawTargets Then Conditionl = AcmeEntryTarget4("F", 0, 0, Shortstop, o); SeUCAcme SE FB") N Shares Nert Bar at Shortstop Stop; End; If Low (FloatLowl + ATR) and DMIPlus (FilterLength) > DMIMinus(FillerLcMgth) .ind Close > MA Then Begin {Dr.iw Entry TjrRTts on the (luiil) (.....llliDiil A(mliilivl-iih,<t*-("l". Iliiv.li>>. u, (I. u), lluv("Ai..... II II") N 1. -. ¹»l 11. Kli lluyMop -lop,
End; If High >= (FloatHighl - ATR) and DMIHinus(FilterLength) > DraPlus(FilterLength) and Close < HA Then Begin (Draw Entry Targets on the Chart} If DrawTargets Then Conditioni - AcmeEntryTargets("F", 0, 0, Shortstop, 0); SellCAcrne SE FP") N Shares Next Bar on Shortstop Stop; End; End; {Calculate running base count and changing float channel values} If AbsValue(FbatHighl - FloatHigh2) <= BaseDelta Then HighBaseCount = HighBaseCount + l Else HighBaseCount l; FloatHigh2 = FloatHighl; If AbsValue(FloatLowl - FloatLowl) <= BaseDelta Then LowBaseCount = LowBaseCount + l Else LowBaseCount - 1; FloatLow2 = FloatLowl; End; Acme Float Box Indicator Acrne Float Box: Plot the upper and lower Hoat indicator lines This is an implementation of the Cumulative-Volume Float Indicator described on Page 74 of the book "The Precision Profit Float Indicator" by Steve Woods. Three dashed lines have been added to indicate Fibonacci retracement levels at the 38 , 50%, and 2% mark. Inputs: FloatFactor(l.O); Variables: TheFloat(0.0), FloatBars{0). ri(i,illliKh(n-(>). I liMlliiw(ii.n). Float38 0.0), Floatso 0.0), Float62 0.0), PlotColor(Black). UpperLine(-l), LowerLine(-a), Line38(-l), Line50(-1), Line62(-1); If LastBarOnChart Then Begin FloatBars - 0; TheFloat = FbatFactor * AcmeGetFloat(CetSymbolNanie); If TheFloat > 0 Then Begin FloatBars = AcmeCetFbatBars(TheFloat); If FloatBars > 0 Then Begin FbatHigh = AcnieFloatChannelHigh(TheFloat); FbatLow = AcnieFloatChannelLow(TheFloat); If CetBackCroundColor = l Then PlntColor = White; Upperline = T Wew(Date[0], Tiitie[0], FbatHigh, Date[FloatBarsT, Time[FloatBars], FloatHigh); If UpperLine >= 0 Then Begin TL SetColor(UpperLine, PlotColor); TLSetSize(UpperLine, 1); End; LowerLine - TL New(Date[0], Time[0], FloatLow, Date[FloatBars], Time[FloatBars], FloatLow); If LowerLine >= 0 Then Begin TL SetColor(LowerLine, PlotColor); TL SetSi2e(LowerLine, 1); End; Fbat38 = FbatHigh - O.38 * (FloatHigh - FloatLow); Line3S = TL New(Date[0], Time[o], Float38, Date[FloatBars], Time[FbatBars], Float38); If Line38 >= 0 Then Begin TL SetStyle(Line38, Tool Dashed); TL SetColor(Line38, PlotColor); TL SetSize(Line3S, 0); End; Floatso - FloatHigh - 0-50 * (FloatHigh - FloatLow); LineSO - TL New(Date[0], Time[0], FbatSO, Date[FbatBars], Time[FloatBars], FloatSO); If LineSO >= 0 Then Begin TL SetStyle(Line50, Tool Dashed); TL SetColor(Line50, PlotColor); Tl SetSize(Line50, 0); End; " Flo.it62 . llodtHigh - 0.67 ♦ (riojlHiKh tlo.Hlow}; Lin<-f<? • [I Ni>w(l.ilrn, rim(-(l, Mo.ild?, n.ih-tliMMI.ii<.. liin<-tl(Mtn.ii-.. M<Ml(<7); I I I llll-l..> > i> Ihni lli-f.in II .1-1 1-(1 .;. Ii>.il l,i-.hril).
TL SetColor(Line62, PbtColor); TL SetSize(Line62, o); End; End; End; Acme Float Ctiannel Indicator I »*+*+++**++*+*».♦♦»•*♦♦**+++♦♦♦**♦♦*»*♦+♦********♦♦**♦♦♦» »*»****»*♦ Acme Float Channel: Plot the float channels based on turnover This is an implementation of the Cumulative-Volume Channel Indicator described on Page 78 of the book "The Precision Profit Float Indicator" by Steve Woods Inputs: FloatFactor(l.O), BaseBars(7), RangeFactor(o.J); Variables: TheFloat(0.0), (High Parameters} FloatHighl(0.0), FloatHigh2(0.0), HigheaseCount(l), (Low Parameters} FbatLowi(O.O), FloatLow2(0.0), LowBaseCount(l), {Alert Parameters] AlertString(""), RangeDelta(0.0), PercentLimit(0.25), LookbackBars(20), ADXLimit(20), Strength). Length2(0); If TheFloat = 0.0 Then Begin {Compute the number of base bars based on float turnover) TheFbat = FloatFactor ♦ AcmeCetFloat(CetSymbolName); End Else If TheFloat > 0.0 Then Begin (Computr the rh.innri Mnps) t lii.iMli-.lil liMl(li.inii<-llliKb(llirl I.Ml); Plotl(FloatHighl, "High"); FloatLowl = AcmeFloatChannelLow(ThEFIoat); Plot2(FloatLowl, "Low"); (Generate alerts} RangeDelta = RangeFactor * Volatility(LDokbackBars); If (High > Plotl or (High + RangeDelta >= Plotl and AcmeRangePercent(Close, 1) >= (l - PercentLimit))) and HighBaseLount >= BaseBars Then Begin AlertString = "Upper Fbat Channel Breakout: Long"; AleTt(AlertString); End; If (LOW <= Plot2 or (Low - RangeDelta Pbt2 and AcmeRangePercent(Close, l) <= PercentLimit)) and LowBaseCount >= BaseBars Then Begin AlertString - "Lower Float Channel Breakout: Short"; Alert(AlertString); End; If High * RangeDelta Plotl and ADX(LookbackBars) ADXlimit and DMIMinus(LookbackBars) > CIPlusCLookbackBars) Then Begin AlertString = "Touch Upper Float Channel in Downtrend: Short"; AlertString = AlertString + " (ADX: " + MumToStr(ADX(LookbackBars), 0) 4 ")"; Alert(AleTtString); End; If Lew - RangeDelta <= Plot2 and ADX(LookbackBars) > ADXLimit and DMIPlus(LookbackBars) > DMIMinus(LookbackBars) Then Begin AlertString = "Touch Lower Float Channel in Uptrend: Long"; AlertString = AlertString + " (ADX: " + NumToStr(ADX(LookbackBars), 0) + ")"; Alert(AlertString); End; Length2 - AcmeOoubleTop(LookbackBars, Strength, RangeFactor); If High + RangeDelta >= Plotl and LengthZ > Then Begin AlertString "Double Top; Short"; AlertStiing = AlertString ♦ " (length: " + NuniToStr(Length2, O) + *•)"; Alert(AIertString); End; LcM)!lh2 A( incDonhIrfiot I(ini(I . . kit.ii II luw R.iiit:<-Iii-ll.i PlotJ .111.1 \r»f,\\iJ , Ihrii ll<>;ii) SI -1)>,11. R.inf;i-.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]
|