Dukascopy
 
 
Wiki JStore Search Login

Small help needed
 Post subject: Small help needed Post rating: 0   New post Posted: Thu 25 Nov, 2010, 17:14 

User rating: -
Hello Dukas Support.

because, a RizHedge strategy gets data for all subscribed instruments.

How do I run a strategy on only one currency pair then ?
I just want to have one currency active (EUR/USD), to run a strategy on that currency
The RizHedge strategy Open positions for All currency on the lower left Workspace area.
Can it be modified to work With ( @Configurable("Instrument") public Instrument instrument = Instrument.GBPUSD; ) ?

Best Regards


 
 Post subject: Re: Small help needed Post rating: 0   New post Posted: Tue 30 Nov, 2010, 16:54 
User avatar

User rating: 8
Joined: Wed 21 Apr, 2010, 10:42
Posts: 1167
You either need to subscribe to one currency only in the platform or change the script of the strategy.

For example, you can add the following line to exit from the onBar or OnTick method (depends on which one is used to trade):

if (instrument != Instrument.EURUSD) return;

This line says, if the instrument is not EURUSD, please exit the method. You need to place this snippet as the first line in the OnBar or OnTick method.


 

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