|
|
#1
|
|||
|
|||
|
US Dollar Index
Good evening ,
I think The US Dollar Index is based on a 6 currencies basket. Is it a way with some calculation/formula to get it in NeoTicker in Real Time, once we have the "base" Currencies in real time. I saw once a formula with some ^;I have no idea how to transfert ^ in an indicator. Many thanks Charles Cygler |
|
#2
|
||||
|
||||
|
If you mean how do you do ^ (the mathematical concept of exponent / power) in formula language, it's just ^ - for instance "5 * 3 ^ 2" -> "5 * 9" -> "45". If you're trying to translate a formula, you might want to post it in your example, or let us know where you're getting stuck.
To do this sort of thing, you could easily make a formula indicator with for instance 6 links, link it to 6 major currency pairs, and then refer to them as "data1", "data2" etc.
__________________
Bruce DeVault bdevault@quantevo.com www.quantevo.com |
|
#3
|
|||
|
|||
|
In formula language, use power function.
e.g. 5^3 = power (5, 3) = 125 |
|
#4
|
||||
|
||||
|
Lawrence, I am confused why you suggest using the power function here. The following code shows they're completely identical:
Code:
Both plots always output 125. Is there some advantage to using the function instead of the operator that you're aware of?
__________________
Bruce DeVault bdevault@quantevo.com www.quantevo.com |
|
#5
|
|||
|
|||
|
If you use brackets, then the priority of ^ is clear.
If you do not, then it is easier for beginners in writing formula to use power function for debugging purpose. |
|
#6
|
||||
|
||||
|
Alright, thanks for clarifying. It's important to remember that power takes precedence over things like multiplication or addition - that's something I take for granted but may not be obvious to everyone, whereas, as you point out, the function makes it completely obvious the order in which it's considered.
__________________
Bruce DeVault bdevault@quantevo.com www.quantevo.com |
|
#7
|
|||
|
|||
|
Thank you
Many thanks for your answers,
I was a little bit absent seen my parents are ill; I tried in formula 5^3 and it's fine; Then 5^3^2 And it doesn't work; Please could you tell me what to do? My level in formulas is at the floor; When I will replace those number by currencies to reach the index, could you please explain me precisely what I should do. Many thanks Charles Cygler |
|
#8
|
||||
|
||||
|
Well, if you think about it, the order of precedence (the order you evaluate those two power operations) is unclear in what you wrote.
Specifically, there is a difference between (5^3)^2 and 5^(3^2). If you change it to either of those, it should work fine (see attached screenshot). precedence.PNG
__________________
Bruce DeVault bdevault@quantevo.com www.quantevo.com |
|
#9
|
|||
|
|||
|
and let's not miss the obvious. Depending on your datafeed, the index you are trying to recreate may be available directly.
__________________
cxk |
|
#10
|
|||
|
|||
|
Hi, I was wondering similarily. Actually the USDX "formulae" is as follows :
USDX = 50.14348112 × EURUSD^(-0.576) × USDJPY^(0.136) × GBPUSD^(-0.119) × USDCAD^(0.091) × USDSEK^(0.042) × USDCHF^(0.036) So I first thought of using the Weighted Index, but then I face two issues: - apparently we can put numbers only as arguments in the parameter fields (so, no (power(5,3) nor (5^3)) - how do I multiply the whole thing with the first operand (50.14348112) ? Thanks in advance. I'm currently reading through the manual, but I'm not done yet. Please feel free to redirect me to the right section if I missed it. |
|
#11
|
||||
|
||||
|
You can't do it just with weighted index, but it would be trivial to write in formula language as an indicator with 7 links and using the power function. The formula language tutorials teach how to make formula language indicators, and would be a great place to start.
__________________
Bruce DeVault bdevault@quantevo.com www.quantevo.com |
|
#12
|
|||
|
|||
|
Help file section Formula Topic and Tutorials provide detail information on NeoTicker formula.
Additional formula examples and tutorials can be find on NeoTicker blog site: http://blog.neoticker.com
__________________
TickQuest Support |
|
#13
|
|||
|
|||
|
Thanks ! That worked perfectly, although I'm sure what I've done so far could use a little bit of optimization
And sorry for the double posting. |
|
#14
|
||||
|
||||
|
Not to worry - good luck to you.
__________________
Bruce DeVault bdevault@quantevo.com www.quantevo.com |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|