PureBytes Links
Trading Reference Links
|
Hi again
Run this AA on a chart of Caterpiller (NYSE - CAT).
Note the trade signal obtained on 7/14/1998. On this date, Cat prints a
long bullish-looking candlestick. The Analysis, however, enters me at
the high of the day and gets me out the same day at the low. So I am
entered at the close price and stopped out just above the opening price!
This is all on EOD data, of course, so there is no chance that my
conditions were met intra-day and then the price subsequently fell all
the way back to the open, triggering a stop, then shot back up to the
days highs again.
Any reason for this in my code?
BTW... for some reason, position size limiting seems to be working on
this Analysis. I changed the TrailStopAmount value back to a +ve 2 from
a -ve 2, but I could have sworn that the the AA was getting me into huge
positions with this same filter before I changed to -ve 2!! :(
(See my last email to this board for a full explanation of this last issue)
Thanks, Nik
ALen = 14;
AroonUp = 100 * (ALen - (HHVBars(H, ALen + 1))) / Alen;
AroonDn = 100 * (ALen - (LLVBars(L, ALen + 1))) / ALen;
Condition=(AroonUp>AroonDn) AND
Ref(AroonUp,-1)<Ref(AroonDn,-1) AND
Ref(AroonDn,-1)>68 AND
C>MA(C,50) AND
AroonUp=100;
Buy= Condition;
Sell=0;//
TrailStopAmount = 2 * ATR( 20 );
Capital = 100000;
Risk = 0.01*Capital;
PositionSize = (Risk/TrailStopAmount)*BuyPrice;
ApplyStop( 2, 2, TrailStopAmount, 1 );
--
The majority meet with failure because of their lack of persistence in creating new plans to take the place of those which fail.
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|