Signals filtered out in CBT still appear on chart as Actual Trades:
SetOption ("AllowSameBarExit" , False ) ;
Sell = Short = Cover = 0 ;
buy = 1;
ApplyStop( stopTypeNBar, stopModeBars, 10, True );
PositionSize = 10000;
SetCustomBacktestProc( "" );
if( Status( "action" ) == actionPortfolio )
{
bo = GetBacktesterObject();
bo.PreProcess(); // Do pre-processing (always required)
for ( i = 0; i < BarCount; i++) // Loop through all bars
{
for (sig = bo.GetFirstSignal( i ); sig; sig = bo.GetNextSignal( i ) )
{
pos = bo.FindOpenPos ( sig.Symbol ) ;
if ( pos )
sig.Price = -1;
}
bo.ProcessTradeSignals( i ); // Process trades at bar (always required)
}
bo.PostProcess(); // Do post-processing (always required)
}