Yes, the version was confirmed.
Below is the code which surely brings the problem in any release of the O2GO
Code:
import org.codehaus.groovy.scriptom.*;
import com.jacob.com.Variant;
Scriptom.inApartment
{
def core = new ActiveXObject('Order2Go.Core')
def td = core.CreateTradeDesk('trader')
println("Connecting...")
td.Login("user", "password", "http://www.fxcorporate.com/Hosts.jsp", "Demo")
println("Connected.")
println(td.IsLoggedIn())
def offer = td.FindMainTable("offers").Rows.Item(1)
def account = td.FindMainTable("accounts").Rows.Item(1)
def accountID = account.CellValue("AccountID")
def amount = account.CellValue("BaseUnitSize")
def instrument = offer.CellValue("Instrument")
def bid = offer.CellValue("Bid")
def ptsize = offer.CellValue("PointSize")
def rate = bid - ptsize * 100
def buy = true
VariantByref order_id = new VariantByref("")
VariantByref di = new VariantByref(false)
println("Create an entry order...")
td.CreateEntryOrder(accountID, instrument, buy, amount, rate, 0, 0, 0, order_id, di)
println("Order is created")
println(order_id.value)
println(di.value)
}
CreateEntryOrder shall receive parameters order_id and di as VARIANT*. Scriptom sends it as BSTR* and VARIANT_BOOL* datatypes. As far as I can see from their code, they do not support VARIANT* parameters via VariantByref at all. You have to:
- ask Scriptom developers to provide the correct handling of the COM parameter
- choose other language or COM interop tool
- develop a simple COM-based workaround which provides the interface as Scriptom can call (really, this is a couple of hours of work).
BTW, I can develop such workaround for you if you aren't familiar with C++. Please, contact me to discuss this variant if you're interested.
Unfortunately, we cannot adopt the API for the whole heap of the products which has only limited support of the COM interface, so this fix can't be done directly in the API.