How to use IB Controller with PositionScore?

Hi,
I run strategy that use PositionScore to filter only the best order and MaxOpenPositions to limit even further. However when i run backtest IB controller transmit all the orders that match Buy criteria regardless of PositionScore and MaxOpenPositions.

I use code from IB Controller website to transfer the orders:

if( LastValue( Buy ) )
{
   ibc = GetTradingInterface("IB");

   // check if we are connected OK
   if( ibc.IsConnected() )
    {
       // place orders only if we do not have already open position on this symbol
      if( ibc.GetPositionSize( Name() ) == 0 )
       {
         // retrieve orderID from previous run, will be empty if no order was placed before  
          OrderID = StaticVarGetText("OrderID"+Name());
      
          // place or modify the order - don't transmit yet
          OrderID = ibc.ModifyOrder( OrderID, Name(), "BUY", 100,
                                 "MKT", LastValue( C ) + 0.10, 0, "Day", False );

         // store orderID for next run so we know which order to modify
         StaticVarSetText("OrderID"+Name(), OrderID);
       }
    }
}