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

[amibroker] Re: Why so signals change after the bar closes?



PureBytes Links

Trading Reference Links

--- In amibroker@xxxxxxxxxxxxxxx, Aron <apforex@xxx> wrote:
>
> professor77747 wrote:
> >
> > It is just a simple test code, but the buy changes as explained.
> > Buy1 =  MACD(5,26) > Ref(MACD(5,26), -1);     // macd 1 is going 
up.
> > Buy2 = MACD(12,26) > Ref(MACD(12,26), -1);   // macd 2 is going up
> > Buy3 = StochK(14,3) > Ref(StochK(14.3), -1); 	
> > // Buy and Sell orders
> > Buy		= Buy1 AND Buy2 AND Buy3;
> >
> > I just don't understand why 2 bars later that the buy signal 
changes. 
> > I get a buy arrow on my chart and the backtest will also change 2 
> > bars later and show a buy when it didn't show it before.
> >
> > Tom
> >
> >   
> With this code the signals do not change, maybe maybe there is 
smth. 
> else you are doing wrong.
>

I do have a trading time set to trade 1 minute before the end of the 
bar for my autotrading, but that doesn't affect the buy signals. I 
sometimes get the buy arrow before the bar closes and before my 
trading time is in effect. Then before the bar closes the arrow 
disappears because things have changed.

What happens is that the bar closes and then a couple of bars later 
the buy arrow appears on my chart. When I backtest on the bar, it 
doesn't show a trade. Then 2 bars later when I backtest after the 
arrow appears, the backtest shows the trade was made 2 bars earlier.

I don't understand how that happens.

Tom



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

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