PureBytes Links
Trading Reference Links
|
When stocks Gap
up or down at the Open this tends to offset and introduce lag in
Indicators that require a significant numbers of bars to get in sync (think of
the T3). To reduce the Gap-effect (offset and lag) I started to DeGap
some of my price arrays. If you trade the Open, especially stocks that gap
frequently, you may want to try the formula below to see how DeGapping
works for you<SPAN
class=250464823-06072004>.
<SPAN
class=250464823-06072004>
Happy
Trading,
<SPAN
class=250464823-06072004>herman.
<FONT
size=2>
<FONT
size=2>SetBarsRequired(BarCount-<FONT
color=#ff00ff>1);Os=0;<FONT
color=#800000>for( b = 1 ; b <
BarCount-1 ; b++ )<SPAN
class=250464823-06072004> {<FONT
color=#800000>
if( L[b-1] > H[b]
) Os[b] = -(L[b-1] - H[b]) +
Os[b-1];<SPAN
class=250464823-06072004> else <FONT
color=#800000>if( L[b] >
H[b-1] ) Os[b] = (L[b] -
H[b-1]) + Os[b-<FONT
color=#ff00ff>1];<SPAN
class=250464823-06072004> else Os[b] =
Os[b-1];<SPAN
class=250464823-06072004> Ox[b] = O[b] -
Os[b]; Hx[b] =
H[b] - Os[b];<SPAN
class=250464823-06072004> Lx[b] = L[b] -
Os[b]; Cx[b] =
C[b] - Os[b];
}
Plot(C,<FONT
color=#ff00ff>"C",1,<FONT
color=#ff00ff>128); // Raw Price
arrayPlotOHLC(Ox,Hx,Lx,Cx,<FONT
color=#ff00ff>"Cx",2,<FONT
color=#ff00ff>128); // DeGapped
Price arrayPlot(<FONT
color=#0000ff>RSIa(C,10),<FONT
color=#ff00ff>"Raw RSI(Close,10)",1,<FONT
color=#ff00ff>1|styleOwnScale,0,<FONT
color=#ff00ff>300);Plot(<FONT
color=#0000ff>RSIa(Cx,10),<FONT
color=#ff00ff>"DeGapped Close",4,<FONT
color=#ff00ff>1|styleOwnScale,0,<FONT
color=#ff00ff>300);Plot(<FONT
color=#ff00ff>50,"",<FONT
color=#ff00ff>1,1|styleOwnScale,<FONT
color=#ff00ff>0,300);
<FONT
face="Lucida Console">
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Sponsor
ADVERTISEMENT
Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/amibroker/
To unsubscribe from this group, send an email to:amibroker-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|