Posted 1/18/2008 16:49:40
|
|
|
|
Any thoughts?
I think it would help me tremendously if you could describe:
How exactly do you look up an exchange rate?
What "Exchange" do you use for this?
www.finantic.de Sponsor of Trading Wiki
Our Trading Systems at C2: Ruby and Topaz
|
|
Posted 1/18/2008 17:25:57
|
|
|
|
| The exchange doesn't affect which symbol it chooses. My guess is it affected you because when you changed the exchange it meant the symbol was now pointing at different data. When you start a backtest with symbols that need an exchange rate, RightEdge looks through the symbols in your watchlist to find one that can provide the needed exchange rate. It looks at all the symbols you have set up, not just the ones you have checked. It doesn't look at the exchange, it just looks that the asset type is forex and that the base and counter currency combined will give you the exchange rate you need. Now, you may have multiple symbols set up that match. If it finds more than one match, it will try to select the "best" one based on the frequency. The current logic to decide whether a frequency is better is this code: bool bBetter = false; if (newFreq == BarFrequency && curFreq != BarFrequency) { bBetter = true; } else if (newFreq > BarFrequency && curFreq < BarFrequency) { bBetter = true; } else if (newFreq < BarFrequency && curFreq < BarFrequency) { int newDiff = BarFrequency - newFreq; int curDiff = BarFrequency - curFreq; if (newDiff < curDiff) { bBetter = true; } } BarFrequency is the frequency of the symbols used in your system. If bBetter is set to true, that means it considered newFreq a better match than curFreq. Hopefully this makes some sense and helps. Thanks, Daniel
|
|
Posted 1/21/2008 16:18:41
|
|
|
|
Alright!
I got it , that's probably why I'm having MAJOR MAJOR performance hangs , lags etc...
I'm setting up symbols as follows :
EURUSD :
I just enter EUR , and place USD as currency..It then looks like EUR/USD ..If i just enter EUR/USD , and i put currency is USD , it will make EUR/USD/USD..
Is there a fix for this?
Should i just enter symbols as EURUSD , or EUR (and put USD as currency) and symbol will become EURUSD..
Then for EURCHF : Enter EUR , and currency is CHF ..Which makes EUR/CHF..
Is that why it hangs , etc?
FXMC
|
|
Posted 1/22/2008 01:25:46
|
|
|
|
No, thats why it works. You did it correctly.
RE *displays* a FOREX Pair as EUR/USD when internally it is EUR traded in USD.
When it comes to sending an order to a broker or realtime data feed this symbol description is translated into the correct contract description, for example EUR.USD for IB which is Underlying=EUR, Currency=USD.
www.finantic.de Sponsor of Trading Wiki
Our Trading Systems at C2: Ruby and Topaz
|
|
Posted 1/22/2008 04:56:37
|
|
|
|
For simplicities sake lets assume no margin and an exchange rate of
1 GBP for 2 USD and
1 CAD for 1 USD.
I selected a position size of $100k. (Which means for me that each single position should have a worth of $100k, similar rules for "percentage of available equity")
If I open an USD.CAD position I get Canadian Dollars and my position is worth about $100k.
But if I open an GPB.USD Position, I get 100,000 GBP with a net worth of $200k. 
This is not what I intended!
Does RE urge me to do the exchange rate calculation inside my strategy and open a position of 50,000 Shares if I want a GBP position of $100k?
And if so, what is the best way to get exchange rates form within a script?
Any ideas?
www.finantic.de Sponsor of Trading Wiki
Our Trading Systems at C2: Ruby and Topaz
|
|
Posted 1/28/2008 03:46:50
|
|
|
|
|
|
Posted 1/28/2008 20:03:38
|
|
|
|
| Looking at our position sizing code, it does not account for forex or foreign currency symbols. I have added bug 1207 for this. In the meantime, you can use the SystemData.AccountInfo object to get the current exchange rate, and size the position manually. The following line gets the (Ask) conversion rate from GBP to USB (which should be close to 2): double exchangeRate = SystemData.AccountInfo.GetConversionRate(CurrencyType.GBP, CurrencyType.USD, QuoteType.Ask);Thanks, Daniel
|
|
Posted 2/11/2008 13:00:21
|
|
|
|
I have some more trouble with a forex system.
In the graphic attached you see RE's position list for a forex 5-Min sytem.
First, the number of decimal places does not match the info set in a system's properties.
Second, the trade highlighted (EUR/JPY) clearly made some profit. (0.04 per "share" on 822842 shares) but the P/L column and Running Profits column are 0.0 for all trades of this system.
???
Let me know if you need data and/or the script to reproduce this.
www.finantic.de Sponsor of Trading Wiki
Our Trading Systems at C2: Ruby and Topaz
|
|
Posted 2/11/2008 14:55:20
|
|
|
|
| > First, the number of decimal places does not match the info set in a system's properties. Do you mean the symbol's properties? I don't think there is a system-level decimal places setting. The P&L columns currently always use 2 decimal places, because they are in the account currency, not the symbol currency. I don't know why the profit is showing as zero. What does your symbol setup look like? It also wouldn't hurt if you want to send us your system and data. Thanks, Daniel
|
|
Posted 2/12/2008 04:07:53
|
|
|
| | |