qstrader icon indicating copy to clipboard operation
qstrader copied to clipboard

TickSize, LotsMin, LotsStep

Open lordillusions opened this issue 8 years ago • 2 comments

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.

lordillusions avatar Aug 01 '16 20:08 lordillusions

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

femtotrader avatar Aug 02 '16 07:08 femtotrader

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.

alexispetit avatar Aug 03 '16 01:08 alexispetit