PureBytes Links
Trading Reference Links
|
Graham
Your definition of the trail stop is what should be happening imo.
But ... what is happening is, the "high" of the bar on the day the
trade day is made is used to calculate the stop price. In my example,
I am buying at the close. Shouldn't the buy price (close) be used to
calculate the stop price instead of the high?? Can't this be done
without writing specialized code by just using applystop?
Larry
--- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxx> wrote:
>
> for long trade
> : trail stop is based on the highest high from entry, less the
value
> of trail amount at the buy signal for non-volatile applystop. Action
> on low <= the trail price
> : stop loss is based on the entry price at entry less the loss
> amount at signal
>
> Should you want different then you will need to alter the write the
> code for the exits.
>
> --
> Cheers
> Graham Kav
> AFL Writing Service
> http://www.aflwriting.com
>
>
>
> On 26/03/2008, onelkm <LKMCD1@xxx> wrote:
> >
> > Chris - The stop is not using the highest high "after" the buy
> > signal. Instead, the high price of the buy bar is used as the
value
> > the trail stop is calculated from, but the trail stop should use
the
> > buy price instead. In my example, the buyprice is the close.
What I
> > don't understand is how to get the trail stop to be based on the
> > buyprice.
> > Larry
> >
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, ChrisB <kris45mar@> wrote:
> > >
> > > onelkm
> > >
> > > Could you look at the highest high after the buy signal and
then
> > see if
> > > your exit relates to that?
> > >
> > > Regards
> > >
> > > ChrisB
> > >
> > >
> > >
> > >
> > >
> > >
> > > onelkm wrote:
> > > >
> > > >
> > > > Chris, thanks for the suggestion, but that does not change
the
> > > > results. Anyone else have ideas?
> > > > Thanks
> > > > Larry
> > > > --- In amibroker@xxxxxxxxx ps.com
> > > > <mailto:amibroker%40yahoogroups.com>, ChrisB <kris45mar@ ..>
> > wrote:
> > > > >
> > > > > onelkm
> > > > >
> > > > > Does changing the fifth parameter (volatile) alter your
results?
> > > > >
> > > > > Regards
> > > > >
> > > > > ChrisB
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > onelkm wrote:
> > > > > >
> > > > > > I can't figure out why the stop in the following example
> > doesn't
> > > > work
> > > > > > right Could someone help me understand why?
> > > > > > under applystop in the users guide it says the following:
> > > > > > Scenario 2:
> > > > > > you trade on today's close and want to exit intraday on
stop
> > price
> > > > > > Correct settings:
> > > > > > ActivateStopsImmedi ately turned OFF
> > > > > > ExitAtStop = 1
> > > > > > Trade delays set to zero
> > > > > > Trade price set to close
> > > > > >
> > > > > > OK, that's what I want to do. What happens is the system
buys
> > at
> > > > the
> > > > > > close as it should. On the day following the trade, the
system
> > > > > > sometimes stops out based on the high of the buy bar
instead
> > of
> > > > > > calculating the stop based on the buy price. Why does
this
> > happen?
> > > > > > Here's an example of the code:
> > > > > > //Set Parameters
> > > > > >
> > > > > > SetOption("NoDefaul tColumns" ,0);
> > > > > >
> > > > > > SetOption("InitialE quity",25000) ;
> > > > > >
> > > > > > SetOption("AllowSam eBarExit" ,0);
> > > > > >
> > > > > > SetOption("Activate StopsImmediately ",0);
> > > > > >
> > > > > > SetOption("AllowPos itionShrinking" ,1);
> > > > > >
> > > > > > SetOption("FuturesM ode",0);
> > > > > >
> > > > > > SetOption("Interest Rate",0);
> > > > > >
> > > > > > SetOption("MaxOpenP ositions" ,1000);
> > > > > >
> > > > > > SetOption("MinShare s",.001);
> > > > > >
> > > > > > SetOption("Commissi onMode",2) ; //$ per trade
> > > > > >
> > > > > > SetOption("Commissi onAmount" ,10);
> > > > > >
> > > > > > SetOption("MarginRe quirement" ,100); //No margin
> > > > > >
> > > > > > SetOption("ReverseS ignalForcesExit" ,0);
> > > > > >
> > > > > > SetOption("UsePrevB arEquityForPosSi zing",1);
> > > > > >
> > > > > > SetTradeDelays( 0,0,0,0);
> > > > > >
> > > > > > BuyPrice = SellPrice = C;
> > > > > >
> > > > > > BuyPrice = C;
> > > > > >
> > > > > > SellPrice = C;
> > > > > >
> > > > > > Buy = C>MA(C,20) ;
> > > > > >
> > > > > > Sell = 0;
> > > > > >
> > > > > > ApplyStop( stopTypeTrailing, stopModePercent, 5,1);
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > >
> >
> >
> >
> > ------------------------------------
> >
> > Please note that this group is for discussion between users only.
> >
> > To get 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
> >
> >
> >
> >
>
------------------------------------
Please note that this group is for discussion between users only.
To get 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/
|