PureBytes Links
Trading Reference Links
|
Yuki, here is the builtin Price code. It has some custom code in it that is commented out. It will not work in my desktop when I uncomment this custom code, but the builtin coding works fine when the custom code is commented out.
Interestingly, it works fine either way in my Compaq notebook, commented, or uncommented.
If you decide to try this, I would like to hear if it worked for you in your builtin price chart when it is uncommented.
I just now pasted this code in a custom window, and it won't work there either. Ron D
==========================================
/*Plot(IIf(C>O,C/O,O/C),"PctYel",colorYellow,styleOwnScale);
Plot(EMA(IIf(C>O,C/O,O/C),3),"Ema3PctGrn",colorBrightGreen,styleOwnScale);
Plot(EMA(IIf(C>O,C/O,O/C),4),"Ema10PctBlu",colorBlue,styleOwnScale);
bbot=BBandBot(C,Prefs(4),Prefs(8)/100);
BbotDip=bbot>Ref(bbot,-1) AND Ref(bbot,-1)<Ref(bbot,-2);
Midbody0=IIf(C>O,(C-O)/2+O,(O-C)/2+C);
Midbody=IIf(Midbody0>Ref(Midbody0,-1),Ref(Midbody0,-1),Midbody0);
Midbody2=EMA(midbody,2);
BbotGrtr=bbot>Ref(bbot,-1);
Midbody3=EMA(midbody,3);
Midbody4=EMA(midbody,4);
Midbody5=EMA(midbody,5);
Midbody6=EMA(midbody,6);
Midbody7=EMA(midbody,7);
Midbody8=EMA(midbody,8);
Midbody9=EMA(midbody,9);
Midbody10=EMA(midbody,10);
Plot(midbody0,"MdbyYel",colorYellow,styleThick);
Title="Lines for Month,Week";
Plot(IIf(Month()!=Ref(Month(),-1),1,0),"",42,styleHistogram|styleOwnScale|styleNoLabel,0,5);
Plot(IIf(DayOfWeek()<Ref(DayOfWeek(),-1),1,0),"",43,styleHistogram|styleOwnScale|styleNoLabel,-0.55,12);
Plot(IIf(Month()!=Ref(Month(),-1),1,0),"",42,styleHistogram|styleOwnScale|st
yleNoLabel,0,5);
Plot(IIf(DayOfWeek()<Ref(DayOfWeek(),-1),1,0),"",43,styleHistogram|styleOwnS
cale|styleNoLabel,-0.55,12);*/
//--Indicator-End--
// Above line instructs the parser that the code
// below is only for commentary/interpretation window
// This provides significant performance improvement
//
// (C)2002 amibroker.com
#include "C:\\program files\amibroker\afl\include\writeuponstock.afl";
movshort = MA( C, Prefs(4) );
movmed = MA( C, Prefs(6) );
movlong = MA( C, Prefs(28) );
btop = BBandTop( C, Prefs( 4 ), Prefs(8)/100 );
bbot = BBandBot( C, Prefs(4), Prefs(8)/100 );
width = btop - bbot;
lslop = LinRegSlope( C, 30 ) + 100;
lslo = LLV( lslop, 90 );
lshi = HHV( lslop, 90 );
lswidth = lshi - lslo;
trend = 100*( lslop - lslo )/lswidth;
mawidth = MA( width, 100 );
relwidth = 100*(width - mawidth)/mawidth;
_N( tname = Name()+"("+FullName()+")" );
"Price and moving averages:";
tname + " has closed " + WriteIf( C > movshort, "above" , "below" ) + " its short time moving average. ";
"Short time moving average is currently " + WriteIf( movshort > movmed, "above", "below") + " mid-time, and " + WriteIf( movshort > movlong, "above", "below" ) + " long time moving averages.";
"The relationship between price and moving averages is: "+
WriteIf( C > movshort AND movshort > movmed, "bullish",
WriteIf( C < movshort AND movshort < movmed, "bearish", "neutral" ) ) + " in short-term, and "+
WriteIf( movshort > movmed AND movmed > movlong , "bullish",
WriteIf( movshort < movmed AND movmed < movlong, "bearish", "neutral" ) ) + " in mid-long term. ";
"\nBollinger Bands:";
tname+ " has closed " +
WriteIf( C < bbot, "below the lower band by " +
WriteVal( 100 *( bbot-C )/ width, 1.1 ) + "%. " +
WriteIf( trend < 30, " This combined with the steep downtrend can suggest that the downward trend in prices has a good chance of continuing. However, a short-term pull-back inside the bands is likely.",
WriteIf( trend > 30 AND trend < 70, "Although prices have broken the lower band and a downside breakout is possible, the most likely scenario for "+tname+" is to continue within current trading range.", "" ) ), "" ) +
WriteIf( C > btop, "above the upper band by " +
WriteVal( 100 *( C- btop )/ width, 1.1 ) + "%. " +
WriteIf( trend > 70, " This combined with the steep uptrend suggests that the upward trend in prices has a good chance of continuing. However, a short-term pull-back inside the bands is likely.",
WriteIf( trend > 30 AND trend < 70, "Although prices have broken the upper band and a upside breakout is possible, the most likely scenario for "+tname+" is to continue within current trading range.", "" ) ), "" ) +
WriteIf( C < btop AND ( ( btop - C ) / width ) < 0.5,
"below upper band by " +
WriteVal( 100 *( btop - C )/ width, 1.1 ) + "%. ",
WriteIf( C < btop AND C > bbot , "above bottom band by " +
WriteVal( 100 *( C - bbot )/ width, 1.1 ) + "%. ", "" ) );
WriteIf( ( trend > 30 AND trend < 70 AND ( C > btop OR C < bbot ) ) AND abs(relwidth) > 40,
"This picture becomes somewhat unclear due to the fact that Bollinger Bands are currently",
"Bollinger Bands are " )+
WriteVal( abs( relwidth ), 1.1 ) + "% " +
WriteIf( relwidth > 0, "wider" , "narrower" ) +
" than normal.";
WriteIf( abs( relwidth ) < 40, "The current width of the bands (alone) does not suggest anything conclusive about the future volatility or movement of prices.","")+
WriteIf( relwidth < -40, "The narrow width of the bands suggests low volatility as compared to " + tname + "'s normal range. Therefore, the probability of volatility increasing with a sharp price move has increased for the near-term. "+
"The bands have been in this narrow range for " + WriteVal(BarsSince(Cross(-40,relwidth)),1.0) + " bars. The probability of a significant price move increases the longer the bands remain in this narrow range." ,"")+
WriteIf( relwidth > 40, "The large width of the bands suggest high volatility as compared to " + tname + "'s normal range. Therefore, the probability of volatility decreasing and prices entering (or remaining in) a trading range has increased for the near-term. "+
"The bands have been in this wide range for " + WriteVal(BarsSince(Cross(relwidth,40)),1.0) + " bars.The probability of prices consolidating into a less volatile trading range increases the longer the bands remain in this wide range." ,"");
"\nThis commentary is not a recommendation to buy or sell. Use at your own risk.";
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.766 / Virus Database: 513 - Release Date: 9/17/2004
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/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/
|