public override void Stop(double price, IWallet wallet, IBroker broker) { double fee = broker.GetBuyFee(wallet.StockId, CurrentShare); wallet.Buy(CurrentShare, price); wallet.Pay(fee); }
public override void Start(double price, IWallet wallet, IBroker broker) { double share = Share(wallet, price); double fee = broker.GetBuyFee(wallet.StockId, share); CurrentShare = Math.Max(0, share - fee); wallet.Buy(CurrentShare, price); wallet.Pay(fee); }