Hi Joe --
If the built-in exits do not allow the flexibility you want, you can compute the exit price and set another rule to exit when that price level has been reached or exceeded. If you will be trading US markets, keep in mind that Stop orders and Good 'Til Canceled orders are being restricted. Check with the broker, exchange, and clearing house where your trades will be executed to learn what orders they accept and how they are handled.
When developing systems that use Stop exits, build in an allowance for slippage. Stop orders always pay the bid-ask spread, or higher, in frictional costs. When trading highly liquid issues, such as SPY, the bid-ask spread will be $0.01 almost all of the time. As liquidity decreases, and as trading anxiety increases, the spread increases. During periods of crisis and when trading illiquid issues, just when that exit is needed to protect equity, the bad fill of a Stop order can be wealth-destroying.
Best,
Howard
On Tue, Apr 5, 2016 at 1:09 AM, joe_zerafa@optusnet.com.au [amibroker] <amibroker@yahoogroups.com> wrote:
Hi all, I am new to amibroker, Is there an easy way to adjust a stop based on holding time?
I tried doing it with an iif command but it didn't seem to work...
For example, purchase a stock with a 15% stop loss:
ApplyStop( stopTypeLoss, stopModePercent, 15, 2, 0, 0 );
Then after 30 days reduce it to:
ApplyStop( stopTypeLoss, stopModePercent, 10, 2, 0, 0 );
Thanks
Joe
__._,_.___
Posted by: Howard B <howardbandy@gmail.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (2) |
Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? The Yahoo Mail app is fast, beautiful and intuitive. Try it today!
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
.
__,_._,___
EmoticonEmoticon