public ApiPortfolio getTotalPorto(decimal price) { ApiPortfolio ret = new ApiPortfolio(); ret.eur = this.eur + (this.btc * price); ret.btc = (this.eur / price) + this.btc; return ret; }
public ApiPortfolio clone() { ApiPortfolio ret = new ApiPortfolio(); ret.eur = this.eur; ret.btc = this.btc; return ret; }
public override ApiPortfolio getBalance() { ApiPortfolio ret = new ApiPortfolio(); ret.eur = 100; ret.btc = 10; return ret; }
public virtual void Initiale() { tickcount = 0; _startPortfolio = _api.Portfolio.clone(); }
private void bSetSimPorto_Click(object sender, EventArgs e) { if (tr != null) { ApiPortfolio sim = new ApiPortfolio(); sim.btc = Lib.Converter.toDecimal(tbSimPortoBTC.Text); sim.eur = Lib.Converter.toDecimal(tbSimPortoEUR.Text); tr.SimulatePortfolio = sim; refreshPortfolio(); } }
public void refreshPortfolio() { _curPortfolio = getBalance(); }