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.

OrderCommand cannot be resolved
 Post subject: OrderCommand cannot be resolved Post rating: 0   New post Posted: Mon 15 Nov, 2010, 11:39 

User rating: -
I get the following error message when I try to compile the java script:



"OrderCommand cannot be resolved"



The lines causing the error message are:



engine.submitOrder("Order label", Instrument.EURUSD, OrderCommand.BUY, dTradeAmount);

engine.submitOrder("order", Instrument.EURUSD, OrderCommand.BUY, 0.001, 0, 20, 1.2222, 0);

engine.submitOrder("myTrade_SELL", Instrument.EURUSD, OrderCommand.SELL, dTradeAmount, tick.getBid(), dSlippageAtOpen, dStopLoss, 0);



The first two are copied from your web page, since my one (the third line) threw the error. But all lines throw an error.



Why do I get this error? How do I submit the order correctly?



Many thanks,


 
 Post subject: Re: OrderCommand cannot be resolved Post rating: 0   New post Posted: Mon 15 Nov, 2010, 14:19 

User rating: 0
Joined: Tue 27 Jul, 2010, 20:57
Posts: 49
Try "IEngine.OrderCommand" instead of "OrderCommand". And always look at the api (to get things right).


 

Jump to:  

  © 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