Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

Strategy Stopped by Engine
 Post subject: Strategy Stopped by Engine Post rating: 0   New post Posted: Wed 10 Oct, 2012, 08:33 

User rating: 0
Joined: Tue 25 Sep, 2012, 07:52
Posts: 3
Hi,

my code is :

JForexGridStrategy strategy = SystemManager.getInstance().getStrategy();
double dEquity = strategy.getAccount().getEquity();
int nOrdersCount = strategy.getEngine().getOrders().size();


today, they got error. dEquity can get data,but nOrdersCount is 0. Then, Strategy is stopped.

Attachment:
bug.png [17.64 KiB]
Downloaded 343 times


what can i do?


 
 Post subject: Re: Strategy Stopped by Engine Post rating: 0   New post Posted: Fri 12 Oct, 2012, 13:00 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
You should handle your exceptions, such that the strategy does not get stopped when one occurs, see:
https://docs.oracle.com/javase/tutorial/ ... xceptions/


 

Jump to:  

cron
  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com