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

Re: [amibroker] Re: Testing a high beta strategy: some problems



PureBytes Links

Trading Reference Links




Hi,
For those interested, posted here is an indicator 
formula which plots candlesticks as per MS version. If you find any 
issues please let me know. Enjoy!<FONT face="Courier New" 
color=#008000>/*   Candle Chart - Plotted as per MS candle 
chart   */<FONT 
size=2> <FONT 
color=#008000>/*   Rules:                                       */<FONT 
face="Courier New" color=#000000 size=2> <FONT face="Courier New" 
color=#008000 size=2>/*   The first bar is always green. 
   If current bar closes higher than previous bar then 
current bar is green.    If current bar closes lower than 
previous bar then current bars is red.    If current bar 
closes at the same price as previous bar then current bar is the 
   same color as previous 
bar.                     */<FONT 
face="Courier New"> <FONT 
color=#008000>/*   Authored by: William Peters on 13th Jan 
2004      */<FONT 
face="Courier New"> UpCandleColor = 
colorGreen<FONT 
face="Courier New">; DownCandleColor = 
colorRed<FONT 
face="Courier New">; FlipColor = 
Flip( <FONT 
color=#0000ff>Nz( <FONT 
color=#000000>C > <FONT 
color=#0000ff>Ref( <FONT 
color=#000000>C, -<FONT 
color=#ff00ff>1 ), <FONT 
color=#ff00ff>1 ), <FONT 
color=#000000>C < <FONT 
color=#0000ff>Ref( <FONT 
color=#000000>C, -<FONT 
color=#ff00ff>1<FONT 
color=#000000> )); CandleColor = IIf<FONT 
color=#000000>( FlipColor == <FONT 
color=#ff00ff>1<FONT 
color=#000000>, UpCandleColor , DownCandleColor ); <FONT 
color=#0000ff>Plot( <FONT 
color=#000000>Close, <FONT 
color=#ff00ff>"Close", CandleColor, <FONT 
color=#000000>styleCandle<FONT 
face="Courier New"> ); PlotStyle = 
styleNoLine + 
styleLeftAxisScale 
+ styleOwnScale + 
styleNoLabel + 
styleNoDraw<FONT 
face="Courier New">; <FONT 
color=#0000ff>Plot( <FONT 
color=#000000>Open, <FONT 
color=#ff00ff>"Open", <FONT 
color=#ff00ff>0<FONT 
color=#000000>, PlotStyle ); Plot<FONT 
color=#000000>( High<FONT 
color=#000000>, "High", 
0<FONT 
size=2>, PlotStyle ); <FONT 
color=#0000ff>Plot( <FONT 
color=#000000>Low, <FONT 
color=#ff00ff>"Low", <FONT 
color=#ff00ff>0<FONT 
color=#000000>, PlotStyle ); Plot<FONT 
color=#000000>( Volume<FONT 
color=#000000>, "Volume", 
0<FONT 
size=2>, PlotStyle ); <FONT 
color=#000000>Title = <FONT 
color=#0000ff>Name() + <FONT 
color=#ff00ff>"  -  " + 
WriteVal( <FONT 
color=#0000ff>DateTime(), <FONT 
color=#000000>formatDateTime ) + <FONT 
color=#ff00ff>"  - " + <FONT 
color=#ff00ff>" Open: " + <FONT 
color=#000000>O + <FONT 
color=#ff00ff>",   Hi: " + <FONT 
color=#000000>H + <FONT 
color=#ff00ff>",   Low: " + <FONT 
color=#000000>L + <FONT 
color=#ff00ff>",   Close: " + <FONT 
color=#000000>C + <FONT 
color=#ff00ff>",   Volume: " + <FONT 
color=#0000ff>WriteVal(<FONT 
color=#000000>V,<FONT 
color=#ff00ff>1<FONT 
color=#000000>); <FONT 
color=#000000>GraphXSpace = <FONT 
color=#ff00ff>4; 
Regards,William Peters<A 
href="">www.amitools.com


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.