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

Re: [amibroker] ApplyStop & ValueWhen question



PureBytes Links

Trading Reference Links


Thanks for the reply Anthony but I'm not sure 
that's what I am looking for.  I want the sell price to be exactly that 
amount (i.e. low of the bar right before buying).  That's why I was trying 
to use ApplyStop.  Is it possible to use SellPrice= ValueWhen 
(Buy, L) ?
 
HB
 
<BLOCKQUOTE 
>
----- Original Message ----- 
<DIV 
>From: 
Anthony Faragasso 

To: <A title=amibroker@xxxxxxxxxx 
href="">amibroker@xxxxxxxxxxxxxxx 
Sent: Monday, October 14, 2002 10:22 
PM
Subject: Re: [amibroker] ApplyStop& 
ValueWhen question
HB,Does this 
help.Buy=Cross(C,MA(C,28));Sell=Ref(Buy,-2) OR C < 
ValueWhen(Buy,Ref(L,-1));HB wrote:> Hello 
all,>> I'm trying to code some AFl to sell if EITHER of the 
following 2> conditions are met:- 2 days have passed since buyingOR- 
the price has> dropped below the low of the bar right before buying The 
following AFL> is not working correctly.  What am I doing wrong 
?> //ApplyStop(0,2, Ref(Low, -1),1);  // I don't think this one is 
right> ApplyStop(0,2, ValueWhen(buyconditions, Low, 1),1);  // 
this one is> not working correctly>> Buy = 
buyconditions;>> Buy = ExRemSpan(Buy,2);>> Sell = 
Ref (Buy, -2); 
////////////////////////////////>>>                    
Yahoo! Groups 
Sponsor                        
ADVERTISEMENT>> Post AmiQuote-related messages ONLYto: 
amiquote@xxxxxxxxxxxxxxx> (Web page: <A 
href="">http://groups.yahoo.com/group/amiquote/messages/)>> 
Check group FAQ at:> <A 
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html>> 
Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service.Post 
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
href="">http://groups.yahoo.com/group/amiquote/messages/)Check 
group FAQ at: <A 
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Your use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service.