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

[amibroker] Double buy arrows using exrem??? Bug or (probably) user-error?



PureBytes Links

Trading Reference Links

Using this code, I sometimes get two consecutive buy (or short) 
arrows:

Buy=  condition1;
Short= condition2;

Sell= C<Ref(longstop,-1);  
Cover = C>Ref(shortstop,-1); 

Buy=ExRem(Buy, Sell);
Sell=ExRem(Sell, Buy);
Short=ExRem(Short,Cover);
Cover=ExRem(Cover, Short);

PlotShapes(IIf(Buy,1,IIf(Short,2,IIf(Sell,4,IIf(Cover,3,0)))),IIf
(Buy OR Cover,colorGreen,IIf(Short OR Sell,colorRed,0)),0,IIf(Buy OR 
Cover,L,H));

Any ideas why?

In understand Buy=ExRem(Buy, Sell) to mean I can ONLY get a buy 
signal after a sell has been generated. So what happens if the next 
signal after a buy is a short? Is the buy just closed or is a short 
opened at the same time?

Also, in a non-always in system, i.e. using cover and sell as stops, 
is the code marked *** vaild?

Buy=ExRem(Buy, Sell or short); ***
Sell=ExRem(Sell, Buy);
Short=ExRem(Short,Cover or buy); ***
Cover=ExRem(Cover, Short);

Thanks.

Andy





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 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/