PureBytes Links
Trading Reference Links
|
<FONT face="Courier New" color=#0000ff
size=2>uh, that was supposed to be "sorry if *I* missed the
point...
<FONT face="Courier New" color=#0000ff
size=2>
<FONT face="Courier New" color=#0000ff
size=2>dave
<BLOCKQUOTE
>
I'm probably
misunderstanding something basic here, but why not skip the buyin that
case, instead of entering it and exiting later the same day? inother
words, add the condition Ref(Low, -1) > MyStop to the buy
condition.or are you trying to make a profit on that partial day when
this sequencehappens?sorry if you missed the
point...dave> It would be nice to exit longs at the open if
you knew your stops> would be hit later in the day. That seems to be
what I'm doing with> the following illustrative code.>>
Cl = Foreign("QQQ","Close");>
BuyPrice=SellPrice=ShortPrice=CoverPrice=Open;>
SetTradeDelays(1,1,1,1);>
ApplyStop(stopTypeLoss,stopModePercent,5,True);> Buy =
Cross(EMA(Cl,5),MA(Cl,15));> Sell = Cross(MA(Cl,15),EMA(Cl,5));>
Equity(1);> Short = Sell; Cover = Buy;>
Equity(1);>> What I'm trying to do is to trade QQQ at the open
as called by my Buy> & Sell conditions, but to exit the trade at
the open if the previous> day's low was below my stop, and then wait
for the next trade signal.>> The 1/7/03 long position (with a 5%
StopLoss) was closed at the open> on 1/21/03 but the stop wasn't hit
until later that same day :-(>> Does anyone know how I should
change the code so that it activates> the stop based on the prior day's
bar?>> I have the range set for 01/01/02 to 09/12/03. In
Settings I> have "Activate stops immediately" and "Allow same day exit"
checked.> I'm using eod data.>>
Keith
Yahoo! Groups Sponsor
ADVERTISEMENT
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 the Yahoo! Terms of Service.
|