Re-added the getStockPurchaseCost() and getStockSaleGain() functions so we don't break user scripts

This commit is contained in:
danielyxie
2019-06-02 20:28:02 -07:00
parent e5e3fec1a9
commit 0b4968d148
6 changed files with 81 additions and 2 deletions

View File

@@ -0,0 +1,14 @@
getStockSaleGain() Netscript Function
=====================================
.. js:function:: getStockSaleGain(sym, shares, posType)
:param string sym: Stock symbol
:param number shares: Number of shares to sell
:param string posType: Specifies whether the order is a "Long" or "Short" position.
The values "L" or "S" can also be used.
:RAM cost: 2 GB
Calculates and returns how much you would gain from selling a given number of
shares of a stock. This takes into account :ref:`spread <gameplay_stock_market_spread>`
and commission fees.