PDA

View Full Version : Automated Order doesn't execute


laocoon
04-03-2006, 08:31 PM
Hi

I'm implementing an automated system with eSignal, Ninja & IB but whenever a trade is triggered and sent to Ninja, it is received by Ninja but not executed. (The strategy references a Strategy Template in Ninja called "FDAX"). The Ninja Log file says "processing" and stops there....

Here's an excerpt of the relevant code:

if ( NTConnected() && NTMarketPosition("") == 0 && isLastBarOnChart() && !orderPlaced)
{
orderID = NTNewOrderId();
NTStrategies("Sim101");
orderPlaced=True;
NTCommand("Place","","FDAX 06-06", "Buy",3,"Market",0 ,0 ,"","",orderID,"FDAX","");

Thanks for pointing me in the right direction

NinjaTrader_Ray
04-04-2006, 12:20 AM
Laocoon,

Did you follow my instructions in the private email I sent you yesterday? Step by step debug?

Ray

NinjaTrader_Ray
04-04-2006, 12:21 AM
Also, NTConnected() needs to be set to a parameter, see the sample provided in the Help Guide.

laocoon
04-04-2006, 12:26 AM
Ray,

I spent the whole evening debugging and I managed to make it work using the NTSample.efs file but it still isn't working in my own code.

For the FDAX, the correct way to do it is (as you hinted) to insert "FDAX 06-06" into the NTCommand function.

I'm still working on my own code trying to make it work.

Thanks

NinjaTrader_Ray
04-04-2006, 12:56 AM
Great.

Ammened the NTSample step by step, add one piece at a time and see where it breaks.

Ray