[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Portfolio Trading vs Buy&Hold comparison



PureBytes Links

Trading Reference Links




Jim
Easy first:
 
As far as 
showing the price arrays in the pop up box<FONT 
face="Times New Roman" size=3>, 
mycolor=IIf<FONT 
size=2>(C<FONT 
size=2>>O, 
colorBlue, 
IIf(<FONT 
color=#ff0000 size=2>C<<FONT color=#ff0000 
size=2>O,<FONT color=#ff0000 
size=2>colorRed,<FONT color=#ff0000 
size=2>colorBlack));
<FONT color=#0000ff 
size=2>Plot(<FONT 
color=#ff0000 size=2>C, 
"<FONT 
face="Courier New" color=#8b0000 size=2>, O:"<FONT 
face="Courier New" color=#000000 size=2> + <FONT face="Courier New" 
color=#ff0000 size=2>O 
+ ", H:"<FONT 
face="Courier New" color=#000000 size=2> + <FONT face="Courier New" 
color=#ff0000 size=2>H 
+ ", L:"<FONT 
face="Courier New" color=#000000 size=2> + <FONT face="Courier New" 
color=#ff0000 size=2>L 
+ ", C:"<FONT 
face="Courier New" color=#000000 size=2> + <FONT face="Courier New" 
color=#ff0000 size=2>C 
+" V:"<FONT 
face="Courier New" color=#000000 size=2>+ <FONT face="Courier New" 
color=#0000ff size=2>WriteVal<FONT face="Courier New" color=#000000 
size=2>(<FONT face="Courier New" color=#ff0000 
size=2>V<FONT face="Courier New" color=#000000 
size=2>,<FONT face="Courier New" color=#ff00ff 
size=2>1<FONT 
color=#000000>), 
mycolor, <FONT color=#ff0000 
size=2>styleCandle<FONT 
color=#000000>);
Got my curiosity on the chart title, here is a "doodle" I 
quickly put together
doodle = Min<FONT 
size=2>(Ref<FONT 
size=2>(DateNum<FONT 
size=2>(),-1<FONT 
size=2>)-Ref<FONT 
size=2>(DateNum<FONT 
size=2>(),-2<FONT 
size=2>),Ref<FONT 
size=2>(DateNum<FONT 
size=2>(),-2<FONT 
size=2>)-Ref<FONT 
size=2>(DateNum<FONT 
size=2>(),-3<FONT 
size=2>));
ChartSetting = <FONT face="Courier New" color=#0000ff 
size=2>WriteIf<FONT face="Courier New" 
size=2>(doodle<<FONT face="Courier New" color=#ff00ff 
size=2>7,<FONT 
face="Courier New" color=#8b0000 size=2>"daily"<FONT 
face="Courier New" size=2>,<FONT face="Courier New" color=#0000ff 
size=2>WriteIf<FONT face="Courier New" 
size=2>(doodle>=<FONT face="Courier New" color=#ff00ff 
size=2>7 <FONT 
face="Courier New" color=#ff0000 size=2>AND<FONT face="Courier New" 
size=2> doodle<<FONT face="Courier New" color=#ff00ff 
size=2>20, <FONT 
face="Courier New" color=#8b0000 size=2>"weekly"<FONT 
face="Courier New" size=2>, <FONT face="Courier New" color=#8b0000 
size=2>"Monthly"));<FONT 
size=2>
Title =<FONT color=#0000ff 
size=2>EncodeColor(<FONT color=#0000ff 
size=2>SelectedValue(mycolor))+ <FONT 
color=#0000ff size=2>Name()+<FONT 
color=#8b0000 size=2>" "+<FONT color=#0000ff 
size=2>Date()+Chartsetting<FONT 
face="Courier New" size=2>+<FONT face="Courier New" color=#8b0000 
size=2>", O:" + 
O + <FONT 
color=#8b0000 size=2>", H:" + <FONT 
color=#ff0000 size=2>H + <FONT color=#8b0000 
size=2>", L:" + <FONT color=#ff0000 
size=2>L + ", 
C:" + <FONT color=#ff0000 
size=2>C +" 
V:"+ <FONT color=#0000ff 
size=2>WriteVal(<FONT color=#ff0000 
size=2>V,<FONT color=#ff00ff 
size=2>1) +"; 
"+<FONT color=#0000ff 
size=2>SectorID(<FONT color=#ff00ff 
size=2>1)+" / 
"+<FONT color=#0000ff 
size=2>IndustryID(<FONT color=#ff00ff 
size=2>1);
<FONT 
face="Courier New" size=2><FONT face=Arial 
size=3>Cheers,Graham<A 
href="">http://groups.msn.com/asxsharetrading<A 
href="">http://groups.msn.com/fmsaustralia-----Original 
Message-----From: Jim [<A 
href="">mailto:bankedout@xxxxxxxxxxxxx]Sent: 
Tuesday, 13 January 2004 10:11 AMTo: amibroker@xxxxxxxxxxxxxxxSubject: 
[amibroker] A couple ?'sHello,I have some trouble getting my 
custom colored price bars to displaythe same type of information as the 
"stock" price bars included withAmibroker.In the "stock" version, 
next to the ticker symbol at the top of thechart, it states the periodicity 
of the chart.  For example if youare looking at a Daily chart, it says 
"Daily" next to the tickersymbol.  Weekly says Weekly, and Monthly says 
Monthly.  I can'tfigure out how to get that in my custom price 
chart.Second issue is that I'm having trouble getting information in 
tothe little hover box.  That's not the real name I'm sure.  
Well,let's say you are on a standard price chart in Amibroker.  You 
justmove your mouse pointer over a price bar.  A little box pops 
uptelling you the Date, Value, Open, High, Low, Close, Volume, 
OpenInterest.  In a few seconds or so, this box disappears.  If 
you moveyour mouse cursor again, it appears with the new information you 
arepointing at (without clicking anything).Well, in my custom 
colored bar chart, my little hover box onlystates Date, Value, Close.  
I don't get the Open, High, Low, orVolume. My code for custom 
colored bars is below.  Any help would be 
greatlyappreciated.Thanks in advance,Jim**After you 
paste code, make sure Scaling is set to "Automatic", andin the Grid Lines 
section: "Middle" and "Show Dates" are checked** --This color scheme looks best 
with a black background IMHO--col=IIf(C>O AND 
C>Ref(C,-1),colorBrightGreen,IIf(C<O AND C<Ref(C,- 
1),colorRed,colorYellow)); Plot( C, "Close", col, styleBar); Title=  
EncodeColor (colorWhite) + Name () + EncodeColor(colorDefault) + " O=$" + 
WriteVal (O, 1.2) + " H=$" + WriteVal (H,1.2) + " L=$" + WriteVal (L, 1.2) + 
" C=$" + WriteVal (C, 1.2) + " "+ WriteVal ((ROC(C,1)), 1.1) + "% " + 
WriteVal( DateTime(),formatDateTime );I use this volume below the 
chart, so the bar colors match:col=IIf(C>O AND 
Close>Ref(C,-1),colorBrightGreen,IIf(C<Open AND 
C<Ref(C,-1),colorRed,colorYellow));Plot( V, "Volume", col, 
styleHistogram | styleThick );Title=  EncodeColor (colorWhite) + Name 
() + EncodeColor(colorDefault) + "   Volume " + WriteVal (V, 1.0) 
+ "  " + WriteVal(DateTime(), formatDateTime );Send BUG 
REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
suggest@xxxxxxxxxxxxx-----------------------------------------Post 
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx(Web page: <A 
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
group FAQ at: <A 
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.htmlYahoo! 
Groups LinksTo visit your group on the web, go to: <A 
href="">http://groups.yahoo.com/group/amibroker/To 
unsubscribe from this group, send an email 
to: amibroker-unsubscribe@xxxxxxxxxxxxxxxYour use of Yahoo! 
Groups is subject to: <A 
href="">http://docs.yahoo.com/info/terms/


Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
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.