Dukascopy
 
 
Wiki JStore Search Login

November contest, remote server
 Post subject: November contest, remote server Post rating: 0   New post Posted: Mon 01 Nov, 2010, 22:02 

User rating: 0
Joined: Fri 10 Sep, 2010, 09:23
Posts: 8
Hi support,

I started my strategy for the contest this morning in remote server. Just to take a look, I also started it for a while in a demo account in local and I realized that in the demo account it opens an order and not in the remote server. It seems as not all instrument where properly suscribed in remote server.
The strategy uses the console to trace some actions, but I can´t see nothing. I tryed in Portfolio-Trader action log, but I get the error, I have no permission to open that report.

I have several questions:
- Does remote server works exactly as local one, or do I have to perfom any other action to properly initialize?? Unfortunately for me I haven´t tested before the contest with remote server.
- How can I see the messages I send to the console or do I have to use another class. I understand I couldn´t see it in real time, but do you store it in a database and I can see it with a report from jforex platform.
- How can I know which instrumets do I have suscribed now??
- I have stopped the strategy in remote server, can I start it in local without compile it again ???
- As I haven´t performed any operation can I compile and start it again in remote server, just If I have to change something depending on your answers.


Thanks, Juan.


 
 Post subject: Re: November contest, remote server Post rating: 0   New post Posted: Tue 02 Nov, 2010, 09:41 
User avatar

User rating: 8
Joined: Wed 21 Apr, 2010, 10:42
Posts: 1167
juanc wrote:

I have several questions:
- Does remote server works exactly as local one, or do I have to perfom any other action to properly initialize?? Unfortunately for me I haven´t tested before the contest with remote server.


Yes, it works in the same manner.

juanc wrote:
- How can I see the messages I send to the console or do I have to use another class. I understand I couldn´t see it in real time, but do you store it in a database and I can see it with a report from jforex platform.


Currently, the logging is not available but will be providing in the future.

juanc wrote:
- How can I know which instrumets do I have suscribed now??


By requesting this command - context.getSubscribedInstruments();
But the Remote Server will automatically use the same instruments to which you've subscribed in the platform..


juanc wrote:
- I have stopped the strategy in remote server, can I start it in local without compile it again ???


Yes, you can. It's your choice where to run the strategy. During the say you can use local run but when you turn the computer off you can use the remote run.

juanc wrote:
- As I haven´t performed any operation can I compile and start it again in remote server, just If I have to change something depending on your answers.


If you don't make any changes in the code, the result of the compilation will be exactly the same as before. Anyway, you don't really need to re-compile it again if you have already did it once.

In general, we should admit that the Remote Server is a new service which we have just launched on DEMO. We will keep working and improving this service for our clients.


 
 Post subject: Re: November contest, remote server Post rating: 0   New post Posted: Tue 02 Nov, 2010, 09:51 
User avatar

User rating: 8
Joined: Wed 21 Apr, 2010, 10:42
Posts: 1167
Yesterday you've tried to launch the strategy 2 on the remote server. Here are the subscribed instruments.

INFO 2010-11-01 07:53:08,450 [main] StrategyProcessLoader - Instruments : ["USD/CHF","USD/JPY"]


INFO 2010-11-01 07:59:10,991 [main] StrategyProcessLoader - Instruments : ["CAD/CHF","CAD/JPY","EUR/GBP","EUR/NOK","NZD/CHF","USD/CHF","USD/JPY","USD/NOK"]


 
 Post subject: Re: November contest, remote server Post rating: 0   New post Posted: Tue 02 Nov, 2010, 10:07 

User rating: 0
Joined: Fri 10 Sep, 2010, 09:23
Posts: 8
That is, I thouhgt not all instrument were suscribed.
Please could you take a look at the code below and tell me if I´m doing something wrong. Its more or less the code I´m using.

//
Properties propiedades = new Properties();
Set<Instrument> susinst = context.getSubscribedInstruments();
strategys = new Vector<Stg_Base>();
Log("Initializing instruments/strategys/signalers");
susinst.removeAll(context.getSubscribedInstruments());
susinst.add(instrument.USDJPY);
susinst.add(instrument.CADCHF);
susinst.add(instrument.CADJPY);
susinst.add(instrument.NZDCHF);
susinst.add(instrument.EURNOK);
susinst.add(instrument.EURGBP);
context.setSubscribedInstruments(susinst);
//

In local server works fine. Do you think It works better to suscribe manually the instrumens in the jforex platform, remove this initialization code, and start the stratey in the remote server ??

Thanks, Juan.


 
 Post subject: Re: November contest, remote server Post rating: 0   New post Posted: Tue 02 Nov, 2010, 10:19 

User rating: 0
Joined: Fri 10 Sep, 2010, 09:23
Posts: 8
I have started the stratey right now in remote server.
I have opened all the instrument I want to suscribe in the jforex platform, and start it.
Could you please take a look at the suscribed instruments ? I haven´t modify the code so I have also done the context.setSubscribedInstruments(susinst).

Thanks, Juan.


 
 Post subject: Re: November contest, remote server Post rating: 0   New post Posted: Tue 02 Nov, 2010, 10:29 
User avatar

User rating: 8
Joined: Wed 21 Apr, 2010, 10:42
Posts: 1167
No, for the remote server the strategy will use the instruments which are currently subscribed in the platform.

Your code snippet would be recommended for running the JForexAPI without GUI in Eclipse or as a single executable jar. Not on a remote server.


 
 Post subject: Re: November contest, remote server Post rating: 0   New post Posted: Tue 02 Nov, 2010, 10:32 
User avatar

User rating: 8
Joined: Wed 21 Apr, 2010, 10:42
Posts: 1167
juanc wrote:
I have started the stratey right now in remote server.
I have opened all the instrument I want to suscribe in the jforex platform, and start it.
Could you please take a look at the suscribed instruments ? I haven´t modify the code so I have also done the context.setSubscribedInstruments(susinst).

Thanks, Juan.


INFO 2010-11-02 09:15:39,197 [main] StrategyProcessLoader - Instruments : ["CAD/CHF","CAD/JPY","EUR/GBP","EUR/NOK","EUR/USD","GBP/USD","NZD/CHF","NZD/USD","USD/CAD","USD/CHF","USD/JPY","USD/NOK"]


 
 Post subject: Re: November contest, remote server Post rating: 0   New post Posted: Tue 02 Nov, 2010, 10:37 
User avatar

User rating: 8
Joined: Wed 21 Apr, 2010, 10:42
Posts: 1167
Sorry, I was a bit wrong. You can also subscribe to required instruments dynamically on the Remote Server too. So, it's up to you to decide how you're going to do that!


 
 Post subject: Re: November contest, remote server Post rating: 0   New post Posted: Tue 02 Nov, 2010, 10:43 

User rating: 0
Joined: Fri 10 Sep, 2010, 09:23
Posts: 8
I was testing using eclipse.
Now all the instruments are suscribed.

Thank you very much.


 

Jump to:  

  © 1998-2024 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