qstrader
qstrader copied to clipboard
TickSize, LotsMin, LotsStep
Hi folks,
This supposed to be flagged as enhancement.
Need a way to describe the TickSize (Minimal change of Price), LotsMin(Minimal Volume to close a deal), LotsStep(minimal step of volume change to close a deal), LotsMax, etc...
Maybe this is the first step to support other types of stocks, as derivatives, forex, etc.
I like this project very much, hope to help more here.
Hi @lordillusions ,
I think the concept of Contract
is missing currently in QSTrader.
Each ticker, should be linked to a Contract
This contract will have properties such as TickSize
, LotsMin
, LotsStep
, LotsMax
...
but also a ContractSize
(a FOREX contract size being typically 100'000)
In MT, this is called contract specification
- MT4 http://www.metatrader4.com/en/trading-platform/help/service/symbol_spec
- MT5 http://www.metatrader5.com/en/terminal/help/market_watch
How about having a class Asset as a base class, then Stock, Future, Forex, Option, etc. inherit from it? Similar to what Quantopian/Zipline does. P&L and slippage calculations are based on the multiplier/currency/tick_size values provided to each asset, whether it is a stock, a future, etc.