Symbol.TickValue/Symbol.TickSize remains static
Symbol.TickValue/Symbol.TickSize remains static
11 Feb 2022, 16:57
Hi All,
When running cBot in real time (not backtesting) I've noticed that Symbol.TickValue/Symbol.TickSize calculation always returns the same value.
EUR/USD are the only currencies involved ( account:EUR, symbol: USD) and I was, in fact, expecting Symbol.TickValue/Symbol.TickSize to match the current EURUSD ask price, which is not the case.
What can be a reason for this?
Thanks!
Replies
ncel01
14 Feb 2022, 14:23
RE:
amusleh said:
Hi,
The symbol tick value property gives you the monetary value of one single tick of the symbol.
The symbol tick size property gives you the numeric size of a symbol tick.
For getting the symbol bid/ask price you can use Symbol.Bid or Symbol.Ask.
amusleh,
Thanks for your reply.
The purpose is not to get symbol bid/ask price but to get the current currency conversion ratio and, EURUSD is not the applicable instrument here involved.
Symbol.TickValue/Symbol.TickSize is called OnTick() and matching the current EURUSD price when running cBot. However, I have noticed that this value remains constant and not matching EURUSD price afterwards.
Thank you!
@ncel01
amusleh
15 Feb 2022, 08:33
RE: RE:
ncel01 said:
amusleh said:
Hi,
The symbol tick value property gives you the monetary value of one single tick of the symbol.
The symbol tick size property gives you the numeric size of a symbol tick.
For getting the symbol bid/ask price you can use Symbol.Bid or Symbol.Ask.
amusleh,
Thanks for your reply.
The purpose is not to get symbol bid/ask price but to get the current currency conversion ratio and, EURUSD is not the applicable instrument here involved.
Symbol.TickValue/Symbol.TickSize is called OnTick() and matching the current EURUSD price when running cBot. However, I have noticed that this value remains constant and not matching EURUSD price afterwards.
Thank you!
Hi,
If the quote currency of a symbol is same as your account deposit currency then the tick value will not change.
For conversion you should use tick value not tick size, tick size is always constant and it's the numeric value of a symbol tick.
@amusleh
ncel01
15 Feb 2022, 23:29
RE: RE: RE:
amusleh said:
ncel01 said:
amusleh said:
Hi,
The symbol tick value property gives you the monetary value of one single tick of the symbol.
The symbol tick size property gives you the numeric size of a symbol tick.
For getting the symbol bid/ask price you can use Symbol.Bid or Symbol.Ask.
amusleh,
Thanks for your reply.
The purpose is not to get symbol bid/ask price but to get the current currency conversion ratio and, EURUSD is not the applicable instrument here involved.
Symbol.TickValue/Symbol.TickSize is called OnTick() and matching the current EURUSD price when running cBot. However, I have noticed that this value remains constant and not matching EURUSD price afterwards.
Thank you!
Hi,
If the quote currency of a symbol is same as your account deposit currency then the tick value will not change.
For conversion you should use tick value not tick size, tick size is always constant and it's the numeric value of a symbol tick.
Hi amusleh,
No, symbol and account currencies are not the same.
In fact, I use ( Symbol.TickValue / Symbol.TickSize ) to get to the monetary value (in the account currency) of one monetary unit of the symbol currency.
Please consider the following:
- Account: USD
- Symbol: GER30 (EUR)
When running the code below (real-time), the first execution Symbol.TickValue / Symbol.TickSize will match the current EURUSD Bid Price, as expected. Nothing wrong here.
The problem is that the remaining "printed" values are all equal to the first, meaning that, Symbol.TickValue / Symbol.TickSize remains static and no longer matches the current EURUSD Bid Price.
protected override void OnTick()
{
Print("EURUSD current Bid Price: ", Symbol.TickValue / Symbol.TickSize);
}
What can be a reason for this?
Thank you once again!
@ncel01
ncel01
16 Feb 2022, 14:36
RE:
amusleh said:
Hi,
The tick/pip value is constant and it represents the latest tick/Pip value of a symbol when you start the cBot for both real time and back test environments.
Hi amusleh,
Yes, indeed. But why doesn't this value keep synchronised with the current forex rate, since it is called OnTick?
When backtesting I can understand but not when running a cBot it in real time, which is a huge limitation.
How to get this value updated in real time for currency conversion purposes, as brokers are able to, when symbol and account currencies don't match?
Thank you once again!
@ncel01
amusleh
17 Feb 2022, 08:57
RE: RE:
ncel01 said:
amusleh said:
Hi,
The tick/pip value is constant and it represents the latest tick/Pip value of a symbol when you start the cBot for both real time and back test environments.
Hi amusleh,
Yes, indeed. But why doesn't this value keep synchronised with the current forex rate, since it is called OnTick?
When backtesting I can understand but not when running a cBot it in real time, which is a huge limitation.
How to get this value updated in real time for currency conversion purposes, as brokers are able to, when symbol and account currencies don't match?
Thank you once again!
Hi,
Right now you can't do currency conversion with the amount of data that is available in Automate API.
We don't have any plan to change the current design of Symbol Pip/tick value but you can open a thread on suggestions section for this.
The data you need to convert currency values for now is only available on Open API.
@amusleh
ncel01
17 Feb 2022, 14:24
RE: RE: RE:
amusleh said:
ncel01 said:
amusleh said:
Hi,
The tick/pip value is constant and it represents the latest tick/Pip value of a symbol when you start the cBot for both real time and back test environments.
Hi amusleh,
Yes, indeed. But why doesn't this value keep synchronised with the current forex rate, since it is called OnTick?
When backtesting I can understand but not when running a cBot it in real time, which is a huge limitation.
How to get this value updated in real time for currency conversion purposes, as brokers are able to, when symbol and account currencies don't match?
Thank you once again!
Hi,
Right now you can't do currency conversion with the amount of data that is available in Automate API.
We don't have any plan to change the current design of Symbol Pip/tick value but you can open a thread on suggestions section for this.
The data you need to convert currency values for now is only available on Open API.
Hi amusleh,
Thanks for your reply.
It's a pity that pip/value is only taken when cBot starts. This makes it not so effective as it should be, as I consider an accurate (real time) currency conversion of high importance.
@ncel01
ncel01
18 Feb 2022, 12:13
RE: RE: RE: RE:
ncel01 said:
amusleh said:
ncel01 said:
amusleh said:
Hi,
The tick/pip value is constant and it represents the latest tick/Pip value of a symbol when you start the cBot for both real time and back test environments.
Hi amusleh,
Yes, indeed. But why doesn't this value keep synchronised with the current forex rate, since it is called OnTick?
When backtesting I can understand but not when running a cBot it in real time, which is a huge limitation.
How to get this value updated in real time for currency conversion purposes, as brokers are able to, when symbol and account currencies don't match?
Thank you once again!
Hi,
Right now you can't do currency conversion with the amount of data that is available in Automate API.
We don't have any plan to change the current design of Symbol Pip/tick value but you can open a thread on suggestions section for this.
The data you need to convert currency values for now is only available on Open API.
Hi amusleh,
Thanks for your reply.
It's a pity that pip/value is only taken when cBot starts. This makes it not so effective as it should be, as I consider an accurate (real time) currency conversion of high importance.
amusleh,
I'll try to do something different here, by declaring e.g.: Symbol eur_usd = Symbols.GetSymbol("EURUSD") for the applicable currency pair, and then refer to eur_usd.Ask or eur_usd.Bid, as these seem to work in real time.
Still, I would need to get the info on the applicable symbol currency. Is there a way to get this for a symbol, as it is available for the account (account.Asset.Name)?
Thank you once again!
@ncel01
amusleh
21 Feb 2022, 08:50
( Updated at: 21 Feb 2022, 08:51 )
Hi,
For symbols you can't get their conversion chain with automate API, this data is not available right now on automate API.
The only API that you can use to get symbols conversion chain is Open API.
If you want to you can create a thread on suggestions section for adding this data to automate API.
@amusleh
amusleh
14 Feb 2022, 09:02
Hi,
The symbol tick value property gives you the monetary value of one single tick of the symbol.
The symbol tick size property gives you the numeric size of a symbol tick.
For getting the symbol bid/ask price you can use Symbol.Bid or Symbol.Ask.
@amusleh