Hi Jian,
This is the code I'm using for EUR/USD:
public abstract class Strategy_FX_EURUSD extends Strategy {
protected Strategy_FX_EURUSD(StrategyParams optimizationParams) throws
JBookTraderException {
super(optimizationParams);
// Specify the contract to trade
Contract contract = ContractFactory.makeCashContract("EUR", "USD");
// Define trading schedule
TradingSchedule tradingSchedule = new TradingSchedule("03:00",
"12:00", "America/New_York");
int multiplier = 1;// contract multiplier
double bidAskSpread = 0.0001; // prevalent spread between best bid
and best ask
Commission commission = CommissionFactory.getForexCommission();
setStrategy(contract, tradingSchedule, multiplier, commission,
bidAskSpread);
}
}
And my forex strategies use position size of 10k minimum ->
setPosition(10000);
Hope it helps!
Victor
On Wed, Dec 1, 2010 at 2:55 PM, Jian <[email protected]> wrote:
> hey jb experts,
> how to handle forex trading in jbooktrader? for example, what symbol I
> can use for getting eur/usd data from ib?
> what's the 'setPosition()' meaning for forex trading?
>
> --
> You received this message because you are subscribed to the Google Groups
> "JBookTrader" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<jbooktrader%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/jbooktrader?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"JBookTrader" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/jbooktrader?hl=en.