I'mhavethe following in preMain():
dll.addFunction("MarketPosition", DLL.INT, DLL.STDCALL, "MarketPosition", DLL.STRING, DLL.STRING);
I have the the following function defined prior to main():
function getMySymbol()
{
symbol = getSymbol();
if (symbol == "AB #F")
symbol = "ER2 03-06";
return symbol;
}
// Get the market position of the current instrument. "account" is optional (set to "" it not applicable).
function NTMarketPosition(Sim101)
{
return dll.call("MarketPosition", getMySymbol(), "Sim101");
To see the value returned by NTMarketPosition(), I amwriting to my formula output window:
debugClear()
debugPrintln(" NTMarketPosition(): " + NTMarketPosition());
The value returned is 0, even though my SuperDOM shows I am in a Long position for instrument ER2 03-06 for account Sim101.
Can anyone tell me what the problem is?
Regards,
Warren
Comment