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

Re: [amibroker] sellprice & open



PureBytes Links

Trading Reference Links


Dear Stephane,
 
When you use ApplyStop() function AmiBroker takes 
care
about exiting at open when there is a price 
gap exceeding
stop limit.
 
But when you use sellprice you have to take care 
about setting
up the sellprice correctly. In other words 
AmiBroker takes sellprice
directly without range checking. BTW: I wrote 
about it in this
group when buy/sellprice was 
introduced.
 
Best regards,Tomasz Janeczko===============AmiBroker - the 
comprehensive share manager.<A 
href="">http://www.amibroker.com
<BLOCKQUOTE 
>
----- Original Message ----- 
<DIV 
>From: 
S.C. 
To: <A title=amibroker@xxxxxxxxxxxxx 
href="">amibroker@xxxxxxxxxxxxxxx 
Sent: Sunday, November 04, 20015:54 
PM
Subject: [amibroker] sellprice & 
open

Tomacz,
 
I would like to know if you have inculded the 
position of the open in the sellprice ( or buyprice )
for example when you write a stopLossprice ( 
SLp) 
Slp = ValueWhen<FONT 
size=2>(Buy,LLV<FONT 
size=2>(L,5<FONT 
size=2>),1)- 
MA(<FONT 
color=#0000ff size=2>ATR(<FONT color=#ff00ff 
size=2>1),10<FONT 
size=2>);
Sellprice=Slp;
if the open is below the Slp , the right sellprice is the open and notthe 
Slp.
it is the reason why, I have added in testing
Slp = ValueWhen<FONT 
size=2>(Buy,LLV<FONT 
size=2>(L,5<FONT 
size=2>),1)- 
MA(<FONT 
color=#0000ff size=2>ATR(<FONT color=#ff00ff 
size=2>1),10<FONT 
size=2>);
StopLoss= L<Slp AND <FONT color=#0000ff 
size=2>BarsSince(Buy)!=<FONT color=#ff00ff 
size=2>0;
Sl=StopLoss and Ref(StopLoss,-1)=0; /* to get one binary spike*/<FONT 
size=2>
Slp=IIf<FONT 
size=2>(Sl,IIf<FONT 
size=2>(O<= Slp ,O,<FONT color=#0000ff 
size=2>IIf(L< Slp, Slp ,<FONT 
color=#ff00ff size=2>0)),<FONT color=#ff00ff 
size=2>0);
Sellprice=Slp;
 
Just to Know
Stephane
 Your 
use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service.