TSLab API Docs  1
TSLab.Script.ISecurity Interface Reference

Paper functions. More...

Inheritance diagram for TSLab.Script.ISecurity:
TSLab.Script.Realtime.ISecurityRt

Public Member Functions

IReadOnlyList< IQueueDataGetBuyQueue (int barNum)
 Get list of orders queue for selected candle or null. The candle number returns orders queue for buy part
 
IReadOnlyList< IQueueDataGetSellQueue (int barNum)
 Get list of orders queue for selected candle or null. The candle number returns orders queue for sell part
 
IReadOnlyList< ITrade > GetTrades (int barNum)
 Get list of trades for selected candle. The candle number returns list of trades
 
IReadOnlyList< ITrade > GetTrades (int firstBarIndex, int lastBarIndex)
 Get list of trades for selected candles. First bar index Last bar index returns list of trades
 
int GetTradesCount (int firstBarIndex, int lastBarIndex)
 
IReadOnlyList< IReadOnlyList< ITrade > > GetTradesPerBar (int firstBarIndex, int lastBarIndex)
 
ISecurity CompressTo (int interval)
 Compress paper candles to new interval and get compressed candles list New interval in the minutes. Returns the compressed security.
 
ISecurity CompressTo (Interval interval)
 Compress paper candles to new interval and get compressed candles list. New interval. Returns the compressed security.
 
ISecurity CompressTo (Interval interval, int shift)
 Compress paper candles to new interval and get compressed candles list. New interval. Time shift. Returns the compressed security.
 
ISecurity CompressTo (Interval interval, int shift, int adjustment, int adjShift)
 Compress paper candles to new interval and get compressed candles list. New interval. Time shift. Time adjustment. Time adjustment shift. Returns the compressed security.
 
ISecurity CompressToVolume (Interval interval)
 
ISecurity CompressToPriceRange (Interval interval)
 
IList< double > Decompress (IList< double > candles)
 Decompress double values list from custom interval and make new double values list with the paper interval. double values list new double values list in the paper interval
 
IList< TK > Decompress< TK > (IList< TK > candles, DecompressMethodWithDef method)
 Decompress TK values list from custom interval and make new TK values list with the paper interval. TK values list the decompression method new TK values list in the paper interval
 
void ConnectSecurityList (IGraphListBase list)
 Connect graph to security for realtime updating. The chart list.
 
void ConnectDoubleList (IGraphListBase list, IDoubleHandlerWithUpdate handler)
 Connect graph to security for realtime updating The chart list. Update handler
 
double RoundPrice (double price)
 Round incoming price to minimal tick. The incoming price. The rounded price.
 
double RoundShares (double shares)
 Round incoming shares to minimal lot tick. The incoming shares. The rounded shares.
 
ISecurity CloneAndReplaceBars (IEnumerable< IDataBar > newCandles)
 Clone Security with new candles. ATTENTION: Can impact to optimization performance because data shouldn't shared beetween optimization step. New candles list The security with replaced candles
 
void UpdateQueueData ()
 Update cached queue data.
 

Properties

string Symbol [get]
 Paper symbol (EESR, EURUSD etc).
 
IDataSourceSecurity SecurityDescription [get]
 The security description from data provider.
 
FinInfo FinInfo [get]
 Current finance information.
 
IReadOnlyList< IDataBarBars [get]
 Paper candles list.
 
bool IsBarsLoaded [get]
 Is security bars loaded or not More...
 
IList< double > OpenPrices [get]
 Paper Open prices list.
 
IList< double > ClosePrices [get]
 Paper Close prices list.
 
IList< double > HighPrices [get]
 Paper High prices list.
 
IList< double > LowPrices [get]
 Paper Low prices list.
 
IList< double > Volumes [get]
 Paper Volumes list.
 
Interval IntervalInstance [get]
 Paper interval.
 
int Interval [get]
 Paper interval in base units.
 
DataIntervals IntervalBase [get]
 Paper interval base.
 
int LotSize [get]
 The lot size for the security.
 
double LotTick [get]
 The lot increment for the security.
 
double Margin [get]
 The margin for the security.
 
double Tick [get]
 Paper tick (minimum increment value).
 
int Decimals [get]
 Get security decimals
 
IPositionsList Positions [get]
 Positions list.
 
CommissionDelegate Commission [get, set]
 Get/set commission delegate for script.
 
string CacheName [get]
 Get unique secuirty name for cache.
 
double InitDeposit [get, set]
 Initial deposit.
 
bool IsRealtime [get]
 Is realtime (IAgent) mode now? More...
 
bool IsPortfolioReady [get]
 Is realtime (IAgent) portfolio ready to trade? More...
 
bool SimulatePositionOrdering [get]
 Simulate postion ordering option enabled More...
 
bool IsAligned [get]
 

Detailed Description

Paper functions.

Property Documentation

bool TSLab.Script.ISecurity.IsBarsLoaded
get

Is security bars loaded or not

bool TSLab.Script.ISecurity.IsPortfolioReady
get

Is realtime (IAgent) portfolio ready to trade?

bool TSLab.Script.ISecurity.IsRealtime
get

Is realtime (IAgent) mode now?

bool TSLab.Script.ISecurity.SimulatePositionOrdering
get

Simulate postion ordering option enabled