--- In [email protected], "Tomasz Janeczko" <[EMAIL PROTECTED]> 
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


Reply via email to