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

Re: [amibroker] calling all AFL masters PART 2



PureBytes Links

Trading Reference Links

This one is in your ApplyStop. You have to choose the mode of stop that only
uses EOD and ignores high and low of the day. I forget what number it is.
Just click somewhere in the middle of ApplyStop and hit F1.
-- 
Terry


From: nikku <nikku@xxxxxxxxxxxx>
Reply-To: amibroker@xxxxxxxxxxxxxxx
Date: Tue, 28 Sep 2004 22:36:02 -0400
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] calling all AFL masters PART 2

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.




Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html


Yahoo! Groups Sponsor
 
 ADVERTISEMENT
 <http://us.ard.yahoo.com/SIG=129joancg/M=295196.4901138.6071305.3001176/D=g
roups/S=1705632198:HM/EXP=1096511670/A=2128215/R=0/SIG=10se96mf6/*http://com
panion.yahoo.com>  


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
<mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe>
*  
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .




[Non-text portions of this message have been removed]



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