Back tester executing trades the same day signal is generated problem

Dear Forum Members,

I am new to Amibroker, have a created a simple system Long only with ATR based stop loss. we can call it trailing.

The system is EOD based, idea is to run the scan every evening and put the trades for next day open be it buy or sell.
When I backtest the trades registered are on the same day when the signal is generated. I have set trade delay as
SetTradeDelays( 1, 1, 1, 1 );
SetBacktestMode( backtestRegular );
Buyprice = Open;
Sellprice = Open;

Was expecting the trades to be executed on next day open even for back tested trades. But when i manually checked for some old trades. Sell signal gets generated lets say on 23rd June 2020 (run scan by selecting the dates 23rd June 2020 - 23rd June 2020) and trade exit has also happened at 23rd June. Ideally the sell arrow should be on 24th June Open.

I have searched a lot couldn't find answer to this. Would appreciate if some can help.



You need to post your full code (once you are "Verified").

Only users with "Verified Badge" are allowed to post on this forum.

Search "Verified Badge" for more information on how to get verified.

Also, see

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.