PureBytes Links
Trading Reference Links
|
Graham: Your tip of using Flip works for my purposes of changing the
background color if long or short. So thank you.
Just and FYI: for some reason it does not give accurate results in
addcolumn or printf statements used for debugging. Both LongTrade and
ShortTrade are always = 1.
Here is the code i used to change the background.
LongTrade = Flip(Buy,Sell);
ShortTrade = Flip(Short,Cover);
Color=IIf(LongTrade,colorLightYellow,IIf(ShortTrade,colorPaleGreen,colorWhite));
Plot( 1,"",Color,styleArea|styleOwnScale,0,1);
Also, it would be nice to be able to change the background of the
price panel (i.e. a different panel than the one controlled by the
buy/sell logic) based on the results of my program. ChartShowArrows
does this for the arrows, but I find a change of background color very
helpful as well. Thanks in advance for any tips on this one.
--- In amibroker@xxxxxxxxxxxxxxx, "Bill Crawford" <crawdady@xxxx> wrote:
> I am working in array mode (vs. a loop) and want to be able to
> determine if I am long, short, or have no position. Is there a
> variable that has this information already, or does anyone have a
> suggestion for how to do it while in array mode.
>
> Alternatively, I could write it into a loop, but I want to use it for
> changing the background color of the price chart on all of my systems.
> (i.e. if long, background color is yellow, if short it is light
> green, and white if no position.
>
> Thanks for the help
>
>
> Bill
------------------------ Yahoo! Groups Sponsor --------------------~-->
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/cosFAA/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/
|