anchor.diff:      function GetResToTrade(aWare: TKMWareType): Word;
       procedure SetResToTrade(aWare: TKMWareType; aCnt: Word);
       property ResToTrade[aWare: TKMWareType]: Word read GetResToTrade write SetResToTrade;
  +
  +    function GetResRequired: Integer;
  +
  +    procedure MoveResIn2Out(aWare: TKMWareType; aCnt: Integer);
  +    function MoveResOut2In(aWare: TKMWareType; aCnt: Integer): Integer;
     protected
       function GetResOrder(aId: Byte): Integer; override;
       procedure SetResOrder(aId: Byte; aValue: Integer); override;
  
positive.code:   begin
      SetResInCnt(aResource, fMarketResIn[aResource] + aCount); //Place the new resource in the IN list
      //As we only order 10 resources at one time, we might need to order another now to fill the gap made by the one delivered
      ResRequired := fTradeAmount*RatioFrom - (fMarketResIn[aResource]+fMarketDeliveryCount[aResource]);
      if ResRequired > 0 then
      begin
        OrdersToDo := Min(aCount, ResRequired);
  
negative.code:   //Maximum number of Demands we can place at once (stops the delivery queue from becoming clogged with 1500 items)
    MAX_RES_ORDERED = 10;
  var
    ResRequired, OrdersAllowed, OrdersRemoved, OrderToDo, movedOut2In: Integer;
  begin
    if (fResFrom = wtNone) or (fResTo = wtNone) or (fResFrom = fResTo) then Exit;
  
  