NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > Application Technical Support > Automated Trading

Automated Trading Support for automated trading systems using NinjaScript. Support for our ATI (Automated Trading Interface) used to link an external application such as TradeStation and eSignal to NinjaTrader.

Reply
 
Thread Tools Display Modes
Old 12-28-2005, 06:11 AM   #1
BCA
 
Join Date: Dec 2005
Location: , ,
Posts: 31
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

Hello,

I'm trying to code my trading plan with Esignal and I've got the following problem.

Here is a part of my code:

if ( NTConnected() && NTMarketPosition("Sim101") == 0 && isLastBarOnChart())
{
orderID = NTNewOrderId();

NTCommand("Place","Sim101","Sell",size,"STOPLIMIT" , low()-0.0001, low()-0.0001,"","",orderID, "EUROFUTURES","");
}

orderID is a global variable.

Later I'm trying to change this order:

if ( NTConnected() && NTMarketPosition("Sim101") == 0 && isLastBarOnChart()) {
NTChange(orderID,size,low()-0.0001, low()-0.0001);
}

However, I've got an error in my log:

PM,AutoTrade,OIF, 'Change;;6E 03-06;;1;;1.1888;1.1888;;;08B9117857A54E9DB357DDFB8EB 9DA67;;' order with ID/Name'08B9117857A54E9DB357DDFB8EB9DA67' does not exist,

I think it was change from 08B9117857A54E9DB357DDFB8EB9DA67 to something like '84670cf7aea247b5abc167491221a8af/Sim101'

PM,Order,Order='84670cf7aea247b5abc167491221a8af/Sim101' Name='Entry' New State=PendingSubmit Instrument='6E 03-06' Action=Sell Limit price=1.1887 Stop price=1.1887 Quantity=1 Type=StopLimit Filled=0 Fill price=0 Error=NoError Native error='',

Where am I wrong?

Thanks!

BCA is offline  
Reply With Quote
Old 12-28-2005, 06:39 AM   #2
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,164
Thanks: 6
Thanked 46 times in 32 posts
Post imported post

This is a bug that will be fixed in the next update due out tomorrow. Just to eloborate, this only happens when placing an order and referencing a strategy template to execute.
NinjaTrader_Ray is offline  
Reply With Quote
Old 12-28-2005, 08:37 AM   #3
BCA
 
Join Date: Dec 2005
Location: , ,
Posts: 31
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

Howcan activate\change a strategy not using the NTCommand? In other words, how can I solve the problem below under current NT version.

Thank you!
BCA is offline  
Reply With Quote
Old 12-28-2005, 08:53 AM   #4
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,164
Thanks: 6
Thanked 46 times in 32 posts
Post imported post

You can't. Tomorrow we will release an update that will resolve the issue.
NinjaTrader_Ray is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 01:35 AM.