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

[amibroker] Ideas with Time stops...



PureBytes Links

Trading Reference Links

Filtering "slow" profitable trades in a trading system

Nowadays I am developing a trading system. As most developers of this board
know exit signals are very important.
In my system I have several exit signals and I thought would be good to
share them....(also beware too much conditions might reduce your degrees of
freedom...if any has any comments on this would be great)
A week ago I came with an idea of an exit signal but I am not as good for
coding as other people of the board.

Sometimes there are trades that are profitable for quite a while but they do
not move very fast...they move in a slow trend....
If you use a very strict exit signal you might leave profits aside
...because trend might accelerate any moment but also you don;t want to stay
too much with a small profitable trade.

The idea is the following:

With IB would be nice to build an indicator that calculates the average
profit per bar during a trade starting from entry signal (cero average
profit). For each bar an average trade profit (close basis) is calculated
and compared to a benchmark. For example:

For the first 5 bars the is no restriction to average trade profit per
bar...there we allow negative trade profit.
from#5 to # 10 bar the average trade profit per bar must be positive
...let;s say 1%.
from #10 to 15 bar the average trade profit per bar must be positive
...let;s say 1.5%.
If in the 11th bar the average trade profit per bar is less than 1.5% the
system should trigger a stop.

So we need the indicator to increase 0.5% average per bar profit for each 5
bars....
If someone has better idea on how to increase the threshold...share it :)

After each trade is closed the average trade profit per bar is reset to
cero.

I tried for a week to code this but i couldn;t... :(
If any can help with this I would apprecite very much. Comments appreciated
too...

THXS

J



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/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/