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

RE: [amibroker] Buy & Sell on Same Bar



PureBytes Links

Trading Reference Links

Depends on what you want. How about this:

Buy = bcond1 AND bCond3 OR bCond2 AND NOT(scond1 OR scond2);

--

Terry

-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of larypowell
Sent: Monday, October 31, 2005 21:11
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Buy & Sell on Same Bar

 

The following code can return buy and sell arrows on the same bar.  How can that be eliminated?  Thanks,  Larry

 

bCond1= Ref(Cross(C,Lowerband),-1) AND C > lowerband ;

bCond2= C > Average ;

bCond3= C > EMA(C,55);

scond1= Ref( Cross(average2,C),-1)AND C < average2;

scond2=C < Lowerband2;

Buy = bcond1 AND bCond3 OR bCond2;

Sell = scond1 OR scond2;

Buy = ExRem( Buy, Sell );

Sell = ExRem( Sell, Buy );

Short = Sell;

Cover = Buy;




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





SPONSORED LINKS
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software Investment analysis software


YAHOO! GROUPS LINKS