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.

How to detect Historical Tester is running?
 Post subject: How to detect Historical Tester is running? Post rating: 0   New post Posted: Thu 17 Feb, 2011, 00:35 
User avatar

User rating: 2
Joined: Mon 30 May, 2011, 15:41
Posts: 86
Location: Czech Republic, Prague
Hello, how can I detect that strategy runs over Hsitorical Tester and not real-time? Thank you.


 
 Post subject: Re: How to detect Historical Tester is running? Post rating: 0   New post Posted: Mon 07 Mar, 2011, 15:14 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hi,
IEngine interface has 3 engine types:
1. LIVE - For live trading.
2. DEMO - For demo trading.
3. TEST - For a backtesting.
Please consider the following code:
if (IEngine.getType().equals(IEngine.Type.TEST)) {
    // Your code here
}


 

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