What are some possible ways for ExRem to affect backtest results?

When I include the 2 Exrem lines below in my backtest, I noticed that the backtest results becomes poorer.

buy = ExRem( buy, sell );
sell = ExRem( sell, buy );

When I look into the individual trades, I notice that when Exrem is included, some valid trades are missed. I am at a loss why this is so. I thought Exrem only removes repetitive, excessive signals and not valid signal?

What are some possible ways for ExRem to affect backtest results?

ExRem removes ALL extra signals FROM THE BEGINNING of available data and NOT from your "range". Generally speaking ExRem should NOT be used. Backtester removes extra signals on its own http://www.amibroker.com/guide/h_portfolio.html

Always I mean ALWAYS use this advice if you don't understand how your code works: How do I debug my formula?
No one is going to fix your codes unless you understand what you are doing yourself.

2 Likes

So @Tomasz, to use ExRem for Explorer (but also be Backtester safe) would best practice be as below?

Buy = RSI(2) < 10;
Sell = RSI(2) > 80;

if (Status("ActionEx") == actionExplore)
{
	Buy = ExRem(Buy, Sell);
	Sell = ExRem(Sell, Buy);
}
1 Like

No, you should create signals properly in first place. Instead of > and < you should use Cross function

Buy = Cross( 10, RSI(2) );
Sell = Cross( RSI(2), 80 );

This way you don't need to worry about excess signals at all.

Yes sorry, bad example.