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

[amibroker] Re: Candlestick Charts



PureBytes Links

Trading Reference Links

Hi Yuki,

Thanks for catching that.  I will review how Stockcharts defines their
color coding and then do my best to translate to AB code.  Hopefully I
will get to do so over the Holidays.

I look forward to this little project and will share with you any code
that I create.

Thanks for the support.

Wishing you all the best,

Dave

--- In amibroker@xxxxxxxxxxxxxxx, Yuki Taga <yukitaga@xxxx> wrote:
>
> Hi marketmonk777,
> 
> Thursday, December 22, 2005, 12:31:54 PM, you wrote:
> 
> m> Thanks for the tip.   I did play with this a little bit and it may
> m> allow me to accomplish what I would like to do but haven't been able
> m> to so far.
> 
> m> So allow me to descibe how I think Stockcharts colors their candles.
> 
> m> Rule # 1:  Close today >= Close yesterday  "Hollow White Candle"
> 
> m> Rule # 2:  Close today <= Close yesterday  "Filled Red Candle"
> 
> Rules 1 and 2 are in conflict, because they both use 'or equal'. Only
> one of them can use that.  (If the stock closes unchanged, would you
> like hollow white or filled red, because you cannot have both, and
> I'm assuming none of your other rules would trigger, although they
> might.)
> 
> m> Rule # 3:  Open today above yestedays close and closes today lower
> m> than the open.  "Black Candle"  Opens bullishly but closes bearishly
> 
> m> Rule # 4:  Open today below yesterdays close and closes today higher
> m> than the open.  "Hollow Red Candle"  Opens bearishly but closes
bullishly.
> 
> m> That's my take on the coloring of the candles.  What I am attempting
> m> to do is to mimick this coloring as close as possible.  Rule # 4 may
> m> have to have an Orange color as I am not sure we can programatically
> m> change the color of the outline.
> 
> m> So it looks like I would like to have 4 different colors (White, Red,
> m> Black, and Orange) based on the 4 rules above.
> 
> m> This is what I will be trying to implement over the holidays.
> 
> m> Trade well,
> 
> I think you will have to do all this by code per chart.  First, you
> will name and define some variables.
> 
> For example: BearishClose = O > Ref(C,-1) AND C < O;
> 
> Then, once you have named and defined all your variables, have a look
> at nested IIF() statements for your Plot or Title statements.
> 
> For example:
> 
> up = MA(OBV(),30) > Ref(MA(OBV(),30),-1);
> 
> Plot(MA(OBV(),30),"OBV 30-SMA", IIf(up, colorDarkGreen, IIf(down,
> colorYellow, colorBlack)), styleLine);
> 
> You can nest all the IIF()s you like, I believe, so you can cover all
> your variables. Just make sure to have a closing parenthesis for each
> instance, and remember that the last instance needs an "if none of
> the conditions apply".
> 
> Yuki
>






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.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/