Symbol
An object with selected symbol properties
Properties:
Symbol.SymbolName |
string |
Symbol name (of a currency pair) |
Symbol.ProfitCurrency |
string |
Profit currency name |
Symbol.Description |
string |
Symbol description |
Symbol.SwapLong |
double |
Payment for transferring an open buy position (Buy) to the next day for 1 lot |
Symbol.SwapShort |
double |
Payment for transferring an open sell position (Sell) to the next day for 1 lot |
Symbol.StopLevel |
int |
Minimum distance in points from the level of the placed order (pending or stop order) to the current market price |
Symbol.Digits |
int |
Number of decimal places (precision) |
Symbol.Point |
double |
Point size of the current instrument |
Symbol.GapLevel |
int |
Gap level. Distance inside the price gap, expressed in points, above which orders of all types are executed at the first quote after the price gap, and not at the order price. |
Symbol.CalculationType |
string |
Calculation type: forex / forex-non-leverage / cfd / index |
Symbol.MarginCurrency |
string |
Collateral currency name |
Symbol.ContractSize |
int |
Contract size (financial instrument parameter) |
Symbol.Percentage |
double |
Collateral Percentage |
Symbol.SymbolGroupId |
int |
Symbol group identifier |
Symbol.Commission |
double |
Size of the deal commission |
Symbol.TradeForbidden |
short |
Parameter whether trading on this symbol is prohibited 0 - false 1 - true |
Symbol.Quote |
Latest bid and ask quotes and their server time |
|
Symbol.MarketState |
int |
Market condition (opened or closed) Opened = 0, Closed = 1 |
Symbol.Spread |
int |
Spread. Difference between the buying (Ask) and selling (Bid) prices in points |
Example:
//-------------------------------------------------
// record information about the symbol to the file
//-------------------------------------------------
string line="";
line = "Symbol: " + Symbol.SymbolName + Environment.NewLine +
" Quote.Time = " + Symbol.Quote.Time.ToString("dd.MM.yyyy HH:mm:ss:fff") + Environment.NewLine +
" Quote.Bid = " + Symbol.Quote.Bid.ToString() + Environment.NewLine +
" Quote.Ask = " + Symbol.Quote.Ask.ToString() + Environment.NewLine +
" CalculationType = " + Symbol.CalculationType.ToString() + Environment.NewLine +
" Commission = " + Symbol.Commission.ToString() + Environment.NewLine +
" ContractSize = " + Symbol.ContractSize.ToString() + Environment.NewLine +
" Digits = " + Symbol.Digits.ToString() + Environment.NewLine +
" GapLevel = " + Symbol.GapLevel.ToString() + Environment.NewLine +
" MarginCurrency = " + Symbol.MarginCurrency.ToString() + Environment.NewLine +
" Percentage = " + Symbol.Percentage.ToString() + Environment.NewLine +
" ProfitCurrency = " + Symbol.ProfitCurrency.ToString() + Environment.NewLine +
" Spread = " + Symbol.Spread.ToString() + Environment.NewLine +
" StopLevel = " + Symbol.StopLevel.ToString() + Environment.NewLine +
" SwapLong = " + Symbol.SwapLong.ToString() + Environment.NewLine +
" SwapShort = " + Symbol.SwapShort.ToString() + Environment.NewLine +
" SymbolGroupId = " + Symbol.SymbolGroupId.ToString() + Environment.NewLine +
" TradeForbidden = " + Symbol.TradeForbidden.ToString() + Environment.NewLine +
" Point = " + Symbol.Point.ToString() + Environment.NewLine;
using (StreamWriter sw = new StreamWriter(mOnStartLog, true))
sw.WriteLine(line);