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]


49

Inputs:

LookbackBaxs(Numetic),

Strergth(Numeiic),

RangeFactor(Nuineric);

Variables:

RangeDelta(o.O), HighPivot(O,0), LowPivot(O.O), mghMinimuni(7);

AcmeDoubleTop = -l;

RangeDelta = RangeFactor » Volatility(LookbackBars);

HighPivot = PivotHigtiVSBar(l, High, Strength, Strength, LookbackBars);

LowPivot = PivotLowVSBar(l, Low, Strength, Strength, LookbackBars);

If HighPivot -1 and LowPivot -1 and HighPivot >= HighMinimum and AbsValue(High - High[HighPivot}) AbeValue(Hlgh - Highest(High, Hi HighPivot > LowPivot Then AcmeDoubleTop = HlPivot;

AcmeEntryTargets

<= RangeDelta and ;hPivot)) <= RangeDelta and

AcmeEntryTargets: Plot the entry points forstopandlimitorders

Inputs:

SystemlD(Strlng), BuyStopCNunwric), BuyLimit(Numeric), ShortStop(Numeric), ShortLimit(Numeric);

Variables:

PlotColor(Black),

BSLine(-l),

BLLine(-l),

SSLine(-l),

SLLine(-l),

BSStringC"),

BLString(""),

SSStrinHC").

4ISliii4-.(-),

HMixl( 1).

BLText(-l)j SSText(-l), SLText(-l);

AcmeErtryTaxgets = False; If LastBarOnChart Then Begin

If CetBackCroundColor = 1 Then

PlotColor = White; If BuyStop > 0 Then Begin

BSString = LE " + SystemID + " Stop BSLine = TL New(Date[o], Time[0], BuyStop, Date[l). Time[l), BuyStop); If BSLine >= 0 Then Begin

TL SetColor(BSLine, PlotColor); TL SetSize(BSLine, 1); TL SetExtfiight(BSLine, True}; BSText = Text New(Date, Time, BuyStop, BSString); Text SetColor(BSText, PlotColor); End; End;

If BuyLimit > 0 Then Begin

BLString = " LE " + SystemID + " Limit "; BLLine = TL New(Date[0}, Time[0], BuyLimit, Date[l}, Time[l], BuyLimit); If BLUne >= 0 Then Begin

TL SetColor(BLLire. PlotColor);

TL SetSize(BLLine, l);

TL SetExtRight(BLLine, True);

BLText = Text New(Date, Time, BuyLimit, BLString); TextJetColor(BLText, PlotColor); End; End;

If Shortstop > 0 Then Begin

SSString = " SE " + SystemID " Stop "; SSLine = TL New(Datelo}, Time[0}, Shortstop, Date[l}, Time[l}, Shortstop); If SSLlne >= 0 Then Begin

Tl SetColor(SSLine, PlotColor);

Tl SetSize(SSLine, l);

TL SetExtRight(SSLine, True);

SSText = Text New(Date, Time, Shortstop, SSString); Text SetColor(SSTeyt, PlotColor); End; End;

If ShortLimit > 0 Then Begin

SLString = " SE " + SystemID + " Limit "; SLLijie - TL New(Date[0], Time[o], ShortLimit, Date[l], Time[l], ShortLimit); If SLLine >- 0 Then Begin

Tl SetColor(SlLine, PlotColoi);

II SHSl7r(SIHnr. 1):

II M-l)(IRiKhl(MHi>i-. Iria),

Mti-xt 1<-Kl - (1). <-. III1K-. -.hnill null, MMiliig);



Text SetColoi(SLText, PlotColor);

End; End;

AcmeEntryTargets = True;

AcmeExitTargets

AcmeExitTargets: Plot the stop bss points and profit targets ******************************************************************}

Inputs:

SystemlD(String), StopLoss(Numeric), ProfitTargetl(Numeric), PTofttTarget2(Numeric);

Variables:

PlotColor(Black),

SLLine(-l),

PTlLine(-l),

PT2Line(-l),

SLStringC"),

SLText(-l),

PTiStrirc"),

PTlText(-l),

PT2String(""),

PT2Text(-l);

AcmeExitTargets = False;

If LastBarOnChart Then Begin

If HarketPosition = 1 Then Begin

SLString = " LX " + SystemID + "-"; PTlStrlng - " LX " SystemID + "+"; PT2String = " LX " + SystenlD + "**"; End;

If HarketPosition = -a Then Begin

SLString = " SX " + SystemID + "-";

PTlString = " SX " + SystemID + "+";

PT2String = " SX " + SystemID + "++"; End;

If CetBackCroundColor = 1 Then

PlotColor = White; SLUne = TL New(Date[0l. Tiine[Ol, StopLoss. Date[l]. Tin>cll. Sloplo4.>; 1 Ml iw > 11 Ihiii Hiyiri

It S,Ui>lm(Mt....., l-lfll.iloij.

TL SetSize(SLLire, a); TL SetExtRight(SLLine, True);

SLText = Text New(Date, Time, StopLoss, SLString); Text SetColor{SLText, PlotColor); End;

PTlLine = TL New(Date[Ol, Time[o}, ProfitTargetl, Date[l], Time[l}, ProfitTargetl); If PTlLine >= 0 Then Begin

Tl...SetColor(PTlLine, plotColcr);

TL SetSize(PTlLine, l);

TL SetExtRight(PTlLine, True);

PTlText = Text New(Date, Time, ProfitTargetl, PTlString); Text SetCobr(PTlText, PlotColor); End;

PT2Line = TL New(Date[0l, Time[0], ProfitTarget?, Date[l}, Time[l}, ProfitTarget2); If PT2Line >= 0 Then Begin

TL SetColor(PT2Line, PlotColor);

TL SetSize(PT2Line, l);

TL SetExtRight(PT2Line, True);

PT2Text = Text New(Date, Time, ProfitTarget2, PT2Strlr); Text SetColor(PT2Text, PlotColor); End; End;

AcmeExitTargets = True;

AcmeFloacChannelHigh

AcmeFloatChannelHigh: Return the value of the upper float channel ***+****++*+*]).***+]).♦+*»»

Inputs:

TheFloat(Numeric);

Variables:

FbatBarsCo);

AcmeFloatCharnelHigh = 0;

FloatBars = 0;

If TheFloat > 0 Then Begin

FloatBars = AcmeCetFloatBars(TheFloat);

If FloatBars > 0 Then

AcmeFloatChannelHigh - Highcst(High. lii.i1H.ii>>):

End;



acmefloatchanrllow

AcmeFloatChanrelLow: Return the value of the lower float channel *♦********»**************»************»********************♦********}

Inputs:

TheFloat(Nufneric);

Variables:

FloatBars(o)i

AcmeFloatChannelLow = 0;

FloatBars = 0;

If TheFloat > 0 Then Begin

FloatBars = AcmeGetFloatBars(TheFloat);

If FloatBars > 0 Then

AcmeFloatChannelLow = Lowest(Low, FloatBars);

End;

acmegetfloat

This listing contains only a partial list of float values. Refer to Chapter 4 for obtaining and adding a float value to the AcmeGetFloat function.

AcmeGetFloat: Get the float of a given stock ****************»»*****************

Inputs:

Synbol(String);

Variables: ix(0),

Sy«bolFound(False);

Array:

Sy«bols(2048J(""), Floats[2048J(0.0);

ix . i;

Synboblixl . -A": Floatsli.l . 368.5; i« - ix ( SyniholsriKl "AA"; Floilsfixl 7«..;: i« i> . ! i>,l -AAII"; >

Symbols

"ABC";

Symbols

"ABF";

Symbols

"ABFS"

Symbols

" "

Symbols

"ABI";

Symbols

"ABK";

Symbols

"ABM";

Symbols

"ZBRA"

Symbols

"ZICA"

syid»ls

"ZICO"

synbou

"ZIXI"

symbols

"zoil"

syrt ls

-zonx"

Symbols

"ZQK";

Symbols

"ZMN"

SymbolFound =

False;

; fldat5[ix] : FlDats[ix] . j Floats[ix] ;"; Floats[ix]

; Floats ; Floats ; Floats ; Floats[ixI ; Floats[ixI ; Floats[i : Floats [i: ; Floats [i] ;"; float5[iK ; float5[ix] ; FlDats[ix]

= 101.7; ix = ix + l; = 37.0; ix = ix + l; = 15-1; ix = ix + l; = 64-7; ix = ix + l; = 141.5; ix = ix + 1; -- 75.2i ix = ix + l; . 15-B; ix = ix + i; = 24-7; ix = ix + l; = 2B.1; ix = ix + 1; = 7.6; ix = ix + l; = 11.4; ix = ix + l; = 6.9; Ix = ix + 1; = 28.B; ix = ix + l; = 12.9; ix = ix + 1; = 9.5;

iu = ix + l;

While SymbolFound = False and (iu - il) > 1 Begin im = IntPortion((il + iu) / 2); If Symbol = Symbols[im] Then

SymbolFound = True Else If Symbol < Symbols[imI Then

iu = im ase

il = im;

End;

AcmeGetFloat = o; If SymbolFound Then

AcmeGetFloat = Floats[im] * lOOOOOO.OO;

acmegetfloatbars

AcmeGetFloatBars: Calculate the bar number for a float turnover

***«****4***>t:***l****«***4***«***)>*««*««********«,*****4:*******«*«*4.J

Inputs:

FloatValue(Numeric);

Variables:

TotalVolume(0.0). Barlndex(o);

TotalVolune - o.o; bailndrh - 0;

ii (urm-mllui . ii iik-m llriii



[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]