PureBytes Links
Trading Reference Links
|
Here's a good indicator that I use all the time, developed by Dimitris Tsokakis.
I think of it as a Turtle break out and have used for backtesting in volatile micro
cap stocks. On day to day basis I use it in a control mode.
Not sure what strategy one would use on opitmizing the SHIFT parameter below
but the default look back is 22 trading days, and that will draw a line at the
highest high for the last 4 trading month.
Put it in your indicator builder window and see if it does part of what you're looking for.
Maybe Dimitris will comment and put the shift parameter in context.
Best regards.
JOE
// For Indicator Window NAME: Break Outs - DT
// Dimitris Tsokakis
// An Indicator Plots a high and low bar and color codes the price line for bullish breaks
//
H0=H;
L0=L;
C0=C;
O0=O;
Lookback=Param("LookBack",22,10,50,1); // Default for interday commodity currency trading
shift=Param("Shift", 11,5,50,1); x0=LastValue(Cum(1));
x1=x0-shift;
H=Ref(H,-shift+1);
L=Ref(L,-shift+1);
H1=LastValue(Ref(HHV(H,Lookback),-1));
L1=LastValue(Ref(LLV(L,Lookback),-1));
Plot(H1,"H1",colorYellow);
Plot(L1,"L1",colorYellow);
H=H0;L=L0;C=C0;O=O0;
up=Cross(H,H1) AND Cum(1)>x1;
dn=Cross(L1,L) AND Cum(1)>x1;
Plot(C,"Close",IIf(Cum(1)>x1-Lookback AND Cum(1)<=x1,colorBlue,IIf
(Up,colorBrightGreen,IIf( Dn,colorRed,colorBlack))),64);
PlotShapes(shapeDownArrow*(Cum(1)==x1+1),colorBlue);
----- Original Message -----
From: Dean Hodgins
To: amibroker@xxxxxxxxxxxxxxx
Sent: Sunday, October 24, 2004 3:48 PM
Subject: [amibroker] Plot High Value Code Question
I'm attempting to plot a straight horizontal line on a weekly chart
that that uses the highest high of the last 4 weeks including the
current week and plots that line horizontally.
I've tried initializing a variable that finds a max value for the
past 3 weeks but my coding doesn't work.
/* Switch to weekly time frame */
TimeFrameSet( inWeekly );
maxhigh = Max(( "H", inWeekly, 0 ),( "H", inWeekly, -1 ),( "H",
inWeekly, -2 ),( "H", inWeekly, -3 )); ***** bad code here ??
Pd1=Param("EMA 1 Period",5,2,200,1);
Pd2=Param("EMA 2 Period",8,2,200,1);
Plot(EMA(C,pd1), "EMA 1",ParamColor( "Color EMA", 38 ), styleThick);
Plot(EMA(C,pd2), "EMA 2",ParamColor( "Color WMA", 21 ), styleThick);
Plot(maxhigh,"Pivot",colorBlack,styleLine);
PlotOHLC( Open, High, Low, Close, "Modified " + Name(),
colorBlack, styleCandle );
Any help or suggestions would be much appreciated.
Thanx & Regards,
Dean H.
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
a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
b.. To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
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:
http://docs.yahoo.com/info/terms/
|