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

[amibroker] Re: ApplyStop-Trailing Stop and Profit Target exit system



PureBytes Links

Trading Reference Links

Hi,

Thank you for the info. Actually, the problem I outlined below is not 
that simple. I have alredy read everything but could not find the 
answer.

The problem is that Profit Target is hit AFTER (or instead of) the 
Trailing Stop hit in the Open.

I have no idea how to solve this with built in functions.

Anything else?

Br,
Zozu

--- In amibroker@xxxxxxxxxxxxxxx, "Howard B" <howardbandy@xxx> wrote:
>
> Greetings --
> 
> Look in the AmiBroker User's Guide under ApplyStop.  There is a 
detailed
> description of what settings you need to get various responses.
> 
> In AmiBroker, Use the Analysis pulldown menu, select Formula 
Editor, then
> click Help, search for ApplyStop.
> 
> Thanks,
> Howard
> 
> 
> On Mon, Oct 6, 2008 at 6:14 AM, zozuzoza <zozuka@xxx> wrote:
> 
> >   Hi,
> >
> > How do you set the parameters in order to have Trailing Stop and
> > Profit Target working together? I want to trade with 1 bar delay 
and
> > trade on next bar Open.
> >
> > The settings I use is as follows.
> > SetOption("AllowSameBarExit",1);
> > SetOption( "ActivateStopsImmediately", 1);
> > SetTradeDelays( 1, 1, 1, 1 );
> > BuyPrice=Open;
> > SellPrice=Open;
> > ApplyStop(stopTypeProfit,stopModePercent,ProfitTarget,1,True,0 );
> > ApplyStop(stopTypeTrailing,stopModePercent,TrailingStop,2,True);
> >
> > This does not work as the Profit Target has higher priority than 
the
> > Trailing Stop so if a Trailing Stop is hit because of the previous
> > bar H-L range then it should exit on next day Open instead of 
hitting
> > the Profit Target on the same day. If I could change the priority
> > order, then it would probably be OK.
> >
> > Do you have an idea how to solve this?
> >
> > Thank you.
> >
> > Br,
> > Zozu
> >
> >  
> >
>



------------------------------------

**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

*********************
TO GET TECHNICAL SUPPORT from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com
*********************

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html

*********************************
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

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