[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

Tom,

You may want to try using the bar replay feature to test your system.
It is possible to pause the replay and step thru the data one bar at a
time to observe when the signals change. If you want to try it, the
process goes like this:

1. Start the bar replay
2. Pause the replay
3. Backtest and note the signals (or export the trade list)
4. Play one bar
5. Backtest and look for changed signals (or compare exported trade lists)
6. Go to step 4 and repeat

When you see a signal change on a previous bar, you can examine the
data and your system rules to see exactly why it is happening.

As I recall, your system uses hourly data, so you can simulate
real-time data arrival with bar replay at a shorter time interval.

-Steve

--- In amibroker@xxxxxxxxxxxxxxx, "professor77747" <professor@xxx> wrote:
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <groups@> 
> wrote:
> >
> > Hello,
> > 
> > In real-time trading you need to use not the LAST bar (incomplete 
> bar, which is dynamically updated
> > as new data arrive) but from the one bar BEFORE the last bar - the 
> one that is COMPLETE.
> > 
> > Buy = Ref( Buy1 AND Buy2 AND Buy3, -1 ); // use PREVIOUS bar 
> > 
> > That way guarantees that you only use close price from COMPLETED 
> bar.
> > 
> > This is similar to using 1-bar delay in AA settings.
> > 
> > Best regards,
> > Tomasz Janeczko
> > amibroker.com
> 
> Tomasz,
> 
> Here is my procedure. I run my autotrading on my paper account to 
> test it. When it trades, I then wait until the next bar appears and 
> if the signal is still there, I run the backtester. If the backtester 
> shows a trade, I make a trade on my actual account. 
> 
> What has happened is that I am missing some profitable trades because 
> the signal changes after the bar has closed. Sometimes it appears 2 
> bars later which is one closed bar later and one incomplete bar.
> 
> I will try your suggestion, but I don't understand why I need a 1 bar 
> delay in the AA settings. I know that it will change until the bar 
> closes so I just wait until the bar closes. When I run the backtest, 
> I just ignore the incomplete bar. If it shows a trade, I just wait 
> until the bar closes and the next bar opens to make sure the trade is 
> still there. 
> 
> Thanks,
> 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/