PureBytes Links
Trading Reference Links
|
Unless you are backtesting agains future prices LLV and HHV normally have
positive period lengths for past bars
HHV(H,14) is the highest high in the past 14 periods, including todays.
Cheers,
Graham
http://groups.msn.com/ASXShareTrading
http://groups.msn.com/FMSAustralia
-----Original Message-----
From: kranklys2000 [mailto:miratrix@xxxxxxxx]
Sent: Thursday, 23 October 2003 5:30 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] help! backtesting problems from a newbie :)
hi
I have two problems -
1. cannot program the stop loss correctly.
my idea is to close position when a price is gone 5 pips under/higher
then LLV(L,-14) or HHV(H,-14) from the buyprice or shortprice.
I wrote:
ApplyStop (2,2,(BuyPrice-LLV(L,-14))+5,1,1); but it seems it does not
affect the results of the backtesting report.
2. i want to wrote a code to test the sistem on AFL . the idea is
that if a certain situation X /cross(Myindicator,C)/occurs then I
should buy on a next candle on the certain level Y. I wrote
BuyPrice = Level Y;
Buy = IIf(Cross(C, HiLoH),BuyPrice,0);
and set Buydelay 1
so in a report i see everything is ok but in cases when the price
didnt trigger Level Y AmiBroker still buys on the next candle Low ... thats
a problem number two :))
donse
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/
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs from home.
Over 14,500 titles. Free Shipping
& No Late Fees. Try Netflix for FREE!
http://us.click.yahoo.com/mk9osC/hP.FAA/3jkFAA/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/
|