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

[amibroker] Re: no position over the weekend



PureBytes Links

Trading Reference Links

"I want a composite that shows signals only for days
when there are both buys and shorts ..."
Yuki,
Why "a composite" ? This would make things complicated.
The solution could be
1. Create first the composites
Buy=...;
Sell=...;
Short=...;
Cover=...;
AddToComposite(Buy,"~buy","v");
AddToComposite(Short,"~short","v");
2. Then, in IB
 b=Foreign("~buy","v");
s=Foreign("~short","v");
Plot(b,"Buy signals",colorBlack,1);Plot(s,"Short 
signals",colorWhite,1);
Plot((b*s!=0)*(b+s),"Sum of Buy+Short signals",colorRed,2);
the red bars will give you the sum.
3. Back in your AA, 
b=Foreign("~buy","v");
s=Foreign("~short","v");
Filter=b*s!=0;//explore current stock, all quotations
AddColumn(b,"Buy signals",1.0);
AddColumn(s,"Short signals",1.0);
AddColumn(b+s,"Sum",1.0);
you may see the signals for the requested days.
Dimitris Tsokakis

--- In amibroker@xxxxxxxxxxxxxxx, Yuki Taga <yukitaga@xxxx> wrote:
> Hi Anthony,
> 
> Wednesday, January 21, 2004, 11:55:30 PM, you wrote:
> 
> AF> Yuki,
> 
> AF> Could it be : Buy + Short
> 
> This does work, Anthony, but the result is not what I'm looking for,
> unfortunately.  I want a composite that shows signals only for days
> when there are both buys and shorts (excludes days which have no
> signals, and days which have either buys or shorts only). This
> displays buys plus shorts, but unfortunately it returns such values
> as buys = 6 plus shorts = 0, returning 6.
> 
> Yuki


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 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/