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

[amibroker] Intraday Intensity Indicator



PureBytes Links

Trading Reference Links

Recently there was some discussion on pyramiding when doing 
backtests.  I'm interested in exploring the opposite kind of exposure 
control: taking some profit 'off the table' mid-trade (i.e., reducing 
position-size) when a certain condition is met, while leaving the 
rest to be closed out upon a final exit condition.

Here's a possible scenario:

1) A protective stop that 'triggers' would exit and close the entire 
position.  (This is pretty straightforward and readily doable in 
AFL, and is NOT what I need help on here.) 

2) For the profit-taking scenario, the first condition would be that 
the open trade has evolved 'in the money' after the entry bar and has 
reached, say, a profit target of 5% (or perhaps a trailing stop of 
the close crossing an n-day short-term moving average).  This 
condition would REMOVE half (or a third, or whatever fraction) of the 
initial position size (assuming the size is greater than 1 unit, 
obviously).  What's left would remain as an open position, but 
reduced in size.  Then,......

3) The second condition would 'trigger' at a different (from first 
condition) trailing stop OR at a 'specified' (adaptive or fixed) 
retracement from the first partial-position's exit price, and the 
remaining-sized open position would then be exited and closed.
 
Coding for scenario steps 2) and 3) are not obvious to me.  Have 
there been any past posts dealing with taking partial profits, ALONG 
WITH CODING EXAMPLES, when doing backtesting?  I did some searching 
on 'purebytes', but was unable to find anything.  (If there are posts 
there regarding this, perhaps I didn't search correctly.)

If anyone can provide some example AFL coding or specific references 
to past posts dealing with this, I'd be grateful.  Thanks!!

Buzz 



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/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/