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

[amibroker] Re: Stop issue



PureBytes Links

Trading Reference Links

 
Chris, thanks for the suggestion, but that does not change the 
results. Anyone else have ideas?
Thanks
Larry
--- In amibroker@xxxxxxxxxxxxxxx, ChrisB <kris45mar@xxx> 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

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