SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Sun Oct 06, 2024 4:54 am

All times are UTC + 3 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Mon Nov 12, 2018 6:32 am 
Offline

Joined: Thu Feb 05, 2015 11:15 am
Posts: 39
Hi,

I have a strategy trading multiple instruments with different base currencies. I would like to deposit money before paper trading. However, the result of following codes:

Code:
        protected override void OnStrategyStart()
        {
            if (StrategyManager.Mode == StrategyMode.Paper)
            {
                Portfolio.Account.Deposit(Clock.DateTime, AllocationPerInstrument, CurrencyId.USD, "Initial allocation");
                Portfolio.Account.Deposit(Clock.DateTime, AllocationPerInstrument, CurrencyId.CNY, "Initial allocation");
                Portfolio.Account.Deposit(Clock.DateTime, AllocationPerInstrument, CurrencyId.CNH, "Initial allocation");
            }


I got 3x USD money in my portfolio and USD only.


Attachments:
3x usd porfolio.JPG
3x usd porfolio.JPG [ 25.06 KiB | Viewed 25477 times ]
Top
 Profile  
 
PostPosted: Mon Nov 12, 2018 9:26 am 
Offline

Joined: Wed May 05, 2010 9:49 pm
Posts: 583
Hello.
1)Do you use CurrencyConverter?
2)I suppose that you prepared all instruments for working with currencies.
3)I think that at moment OnStrategyStart(), framework not have the necessary data for currency conversion.
For test this suggestion you can programmatically send quotes to framework or wait market data. And next, check the portfolios.


Top
 Profile  
 
PostPosted: Mon Nov 12, 2018 12:38 pm 
Offline

Joined: Thu Feb 05, 2015 11:15 am
Posts: 39
Thank you for your reply.

skuvv wrote:
Hello.
1)Do you use CurrencyConverter?
2)I suppose that you prepared all instruments for working with currencies.
3)I think that at moment OnStrategyStart(), framework not have the necessary data for currency conversion.
For test this suggestion you can programmatically send quotes to framework or wait market data. And next, check the portfolios.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 3 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group