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

[amibroker] help! backtesting problems from a newbie :)



PureBytes Links

Trading Reference Links

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




------------------------ 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/