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

[amibroker] Re: Trailing Stop Execution in Backtesting



PureBytes Links

Trading Reference Links

--- In amibroker@xxxxxxxxxxxxxxx, "joelamibroker" 
<joelamibroker@xxxx> wrote:
>
> HI,
> 
> if you post some of your code, we may be able to answer the 
question.
> I personally have no trouble using manually coded stops or the
> applystop function,
> 
> Joel
> 
Hi Joel,

The code is pretty simple, MACD crossovers. Here it goes, I even 
tried applystop (2,2,1,0). It only reads the daily high and ignores 
intraday activity.

Thanks for your help!

//Daily

MACD_Daily = MACD(12,26);
Signal_Daily = Signal(12,26,9);

Filter= Cross(MACD_Daily,Signal_Daily) AND
(TimeFrameExpand(MACD_Weekly,inWeekly)>TimeFrameExpand
(Signal_Weekly,inWeekly));

Buy = Cross(MACD_Daily,Signal_Daily) AND
(TimeFrameExpand(MACD_Weekly,inWeekly)>TimeFrameExpand
(Signal_Weekly,inWeekly));

Sell = 0;

PositionScore=RSI();//Rank
PositionSize=-100;

> 
> --- In amibroker@xxxxxxxxxxxxxxx, "sandeepbanga04"
> <sandeepbanga04@xxxx> wrote:
> >
> > I noticed that even though I have the "exit at stop" intraday 
option 
> > selected in backtester, the stop gets executed based on the DAILY 
HIGH, 
> > and not when it should actually happen when the stock price 
passes 
> > through the stop level. Does anyone know why this is happening, 
and how 
> > to correct it?
> > 
> > Thanks!
> >
>






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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

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