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

[amibroker] Buy & Sell on Same Bar



PureBytes Links

Trading Reference Links

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





YAHOO! GROUPS LINKS