PureBytes Links
Trading Reference Links
|
Hi Phsst,
Friday, November 28, 2003, 1:50:20 AM, you wrote:
>> P> // define the BuyPrice
>> P> BuyPrice = ValueWhen( Buy, Open);
>> P> Sell = BarsSince(Buy) == 1;
>>
>> P> SellPrice = IIf(Open >= BuyPrice,Open,C);
>>
>> Okay . . . *this* line just above looks right to me. It's an exit
>> that exits on the open if the open is > buyprice. I can write the
>> opposite for the short I'm sure, using coverprice.
P> Sounds like the *light bulb* just went on and that you understand
the P> concept. Just let your system establish its' own BuyPrice and
P> ShortPrice, then *force* the desired SellPrice or CoverPrice using
an P> appropriate IIF statement.
Kind of . . . sort of . . . maybe. What I would really like to do is
isolate these cases (trades that are losers on the next open) from
the rest of the trades. I want to see some profitability statistics
that would relate to only the losers if I hang on to the losers just
a little bit longer (either to the close, or intraday on a break even
basis). For example, if I found that 75 percent of all losers on the
open traded through the entry price sometime intraday that same day,
I think I would have to very carefully think about holding and
looking for that exit. It would depend of course on what happened to
the other 25 percent; they might bury the whole idea under a mountain
of red ink. But right now I have no idea, and I'd like to research
this.
I guess this would involve modifying the present code so that it
"looks forward" one bar, and "takes" (for purposes of this testing)
only the trades that will be losers at the open on the next bar. If
I can just make that one modification (actually two, because I would
modify the short side as well), I think I'm home free in beginning to
analyze the best way to treat the losers. Of course, I have to
modify the exits as you have suggested.
Maybe this might be easier than I think? Certainly this "thinking
out loud" process helps me.
For example, if I append 'AND ref(Open, 1) < BStopLevel' to the Buy
statement, would that be enough to turn the trick? (The rest of the
code would remain the same, but I think this would for purposes of
back testing remove every winning or break even trade, leaving only
the losers (at the normal exit point) for further exit manipulation?)
Another question would be the trade delay statement. Right now I'm
using:
SetTradeDelays(0,0,0,0);
The exit is on the open, ref(buy,1). So I guess I would need to set
that to either BStopLevel (intraday) or on the close ref(buy,2). Does
that seem right?
>> I wish I wish I wish I was better at this.
P> I believe you picked up on the relevent portions of the sample code
P> that will meet your needs. You did not convey all of your requirements
P> in your original request, so the sample was generic.
P> You are obviously an active, profitable discretionary trader, so any
P> weakness with AFL coding is not the end of the world... just a little
P> aggrevation.
Not the end of the world at all. But frustrating that I have so many
ideas, and so little talent for coding them. ^_^
P> I have not looked at William Peters Powertool since his first beta,
P> but I wonder if you might benefit from using it. If you haven't done
P> so yet, take a look at it.
Thanks, and let me know if you think I'm on the right track here.
Once again, the goal is to take a very profitable system, kick out
all the winning trades, and play with potentially finding a better
exit for the losers. It may be a supreme waste of time ^_^ but it
also might make the system even better than it seems to be.
Yuki
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->
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/
|