Are there functions similar as MarketInfo and other very useful function?

Created at 21 Feb 2016, 05:38
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
AL

alibaba

Joined 21.02.2016

Are there functions similar as MarketInfo and other very useful function?
21 Feb 2016, 05:38


for example

In MT4, I can get  market information from MarketInfo, such as ask, bid, thread, digtit length,can I get these data at cAlgo?

MarketInfo(Symbol, MODE_BID);

MarketInfo(Symbol, MODE_ASK);

MarketInfo(Symbol, MODE_DIGITS);

also, AccountBalance, AccountMargin, AccountName, AccountNumber, AccountProfit, TimeLocal, TimeCurrent, TerminalCompany, TerminalName...?

I think cAlgo is the future, is the trend, but need more functions.


@alibaba
Replies

trend_meanreversion
21 Feb 2016, 08:21

RE:

alibaba said:

for example

In MT4, I can get  market information from MarketInfo, such as ask, bid, thread, digtit length,can I get these data at cAlgo?

MarketInfo(Symbol, MODE_BID);

MarketInfo(Symbol, MODE_ASK);

MarketInfo(Symbol, MODE_DIGITS);

also, AccountBalance, AccountMargin, AccountName, AccountNumber, AccountProfit, TimeLocal, TimeCurrent, TerminalCompany, TerminalName...?

I think cAlgo is the future, is the trend, but need more functions.

 

Hi Alibaba, you can get a lot of such information at /api/reference/internals/symbol

 

double bid = Symbol.Bid;
double ask = Symbol.Ask;
string code = Symbol.Code;
int digits = Symbol.Digits;
double pipSize = Symbol.PipSize;
double pointSize = Symbol.PointSize;
double spread = Symbol.Spread;

Also see these /api/reference/internals/iaccount

// Account Properties
// Current Account Balance 
double balance = Account.Balance;   
// Current Account Currency e.g. EUR
string currency = Account.Currency; 
// Current Account Equity 
double equity = Account.Equity;     
// Current Account Free Margin   
double freemargin = Account.FreeMargin; 
// Current Account Margin
double margin = Account.Margin;
//Margin level = Equity / Margin * 100
double? marginlevel = Account.MarginLevel; 

 


@trend_meanreversion