PDA

View Full Version : Esignal integration problems


silvermotion
04-26-2007, 07:40 AM
Greetings. I am having difficulties setting up esignal 8.0 build 779 with Ninja Trader 5.2.1000.7.

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

NinjaTrader_Ray
04-26-2007, 07:52 AM
Hi,

Based on the code you provided, the output is correct. That is what I would expect to see. You may consider taking a look at NT6 just released which has full end to end indicator/system development and backtesting tools. Its basedon C# which has a very similar syntax to EFS which uses JavaScript.

Ray