1) I have placed the NtDirect.dll in the esignal directory
2) I have enabled Automated trading in NT.
I use the following script to perform my tests (which is a lighter version of the NTsample.efs provided
test:
var dll = new DLL("NtDirect.dll");
function preMain() {
setPriceStudy(true); setStudyTitle("NT Sample");
dll.addFunction("Connected", DLL.INT, DLL.STDCALL, "Connected", DLL.INT);
dll.addFunction("AvgEntryPrice", DLL.DOUBLE, DLL.STDCALL, "AvgEntryPrice", DLL.STRING, DLL.STRING);
}
function main() {
debugPrintln(NTConnected(1));
debugPrintln("Position size: " + dll.call("AvgEntryPrice", getSymbol(),"") + "\r\n");
}
function NTConnected(showMessage) { return (dll.call("Connected", showMessage) == 0)}
The formula output window looks like:
true
Position size : 0
which suggests that whereas the connection with NT is detected from esignal, NT is not receving esignal
commands. I am of course in simulation in NT, and have linked NT through the esignal connection. I have
looked through help files on NT website and did not find any help. Can somebody tell me what i am missing?
Best Regards, Tao and gabriel
Comment