Currency conversion / GetSymbol in backtesting

Created at 12 Aug 2016, 23:28
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!
jaredthirsk's avatar

jaredthirsk

Joined 18.12.2015

Currency conversion / GetSymbol in backtesting
12 Aug 2016, 23:28


I am trying to open a position with a size based on the risk.  However, I am stymied in backtesting when I try to do currency conversion because "GetSymbol is temporarily not supported in backtesting".

How temporary is this limitation?

I would think this is a pretty common strategy to use.  E.g. If my bot is trading XAUEUR and my Account.Currency is USD and the stop loss for my bot's trade is 0.5% and my account balance is $10000 and I want to risk 1% per trade, then I want to risk $100 on the trade.  So I want that 0.5% stop loss to be no more than $100.  I could calculate this if I had GetSymbol for EURUSD but I don't have that in backtesting.  Does anyone have ideas what I can do?

 

(I have been wondering if I will need to write my own backtesting / bot software (or find alternatives) and missing features like GetSymbol for backtesting force me in that direction.  I want to see cAlgo/cTrader succeed so I hope it fleshed out.  I found this feature request on the vote page.  Apparently many others believe this is a critical feature going back more than 2 years.  Not having a critical feature available makes me question my future with cTrader and makes me pay more attention to alternatives.)

 

http://vote.spotware.com/forums/229166-ideas-and-suggestions-for-ctrader-and-calgo/suggestions/5435043-multi-currency-backtesting

 


@jaredthirsk
Replies

galafrin
13 Aug 2016, 00:38

RE:

jaredthirsk said:

I am trying to open a position with a size based on the risk.  However, I am stymied in backtesting when I try to do currency conversion because "GetSymbol is temporarily not supported in backtesting".

How temporary is this limitation?

I would think this is a pretty common strategy to use.  E.g. If my bot is trading XAUEUR and my Account.Currency is USD and the stop loss for my bot's trade is 0.5% and my account balance is $10000 and I want to risk 1% per trade, then I want to risk $100 on the trade.  So I want that 0.5% stop loss to be no more than $100.  I could calculate this if I had GetSymbol for EURUSD but I don't have that in backtesting.  Does anyone have ideas what I can do?

 

(I have been wondering if I will need to write my own backtesting / bot software (or find alternatives) and missing features like GetSymbol for backtesting force me in that direction.  I want to see cAlgo/cTrader succeed so I hope it fleshed out.  I found this feature request on the vote page.  Apparently many others believe this is a critical feature going back more than 2 years.  Not having a critical feature available makes me question my future with cTrader and makes me pay more attention to alternatives.)

 

http://vote.spotware.com/forums/229166-ideas-and-suggestions-for-ctrader-and-calgo/suggestions/5435043-multi-currency-backtesting

 

Symbol.TickValue hold the conversion of current Bid to Account currency , I doubt it is synced like Symbol.Bid in backtesting , if not it might aproximately do the trick in backtesting.


@galafrin