NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


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 03-07-2012, 06:47 AM   #1
tonynt
Senior Member
 
Join Date: Jun 2009
Posts: 740
Thanks: 19
Thanked 14 times in 9 posts
Default script and atm

Hello,

my NT-scripts work well and also I can call an ATM (from charttrader) within a NT-script.

But when I want to combine both in a NT-script-strategey eg entry 2.000 long with NT-script and eg 1.000 from my ATM (of course same ATM that works "alone") then I notice that only the 2.000 script entries are done but not the 1.000 from ATM.

What can be the reason for please? Is there to change for COBC= false and working with FirstTickofBar maybe instead or what else could hindering the ATM entry?

Thanks
Tony
Last edited by tonynt; 03-07-2012 at 06:48 AM. Reason: typing error - my english
tonynt is offline  
Reply With Quote
Old 03-07-2012, 07:17 AM   #2
NinjaTrader_Matthew
NinjaTrader Customer Service
 
NinjaTrader_Matthew's Avatar
 
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,783
Thanks: 160
Thanked 566 times in 557 posts
Default

Hello Tony,

Do you mean that the strategy orders are being entered, but not the ATM Strategy?

Are you calling both methods under the same conditions?

Do you have any clues from the TraceOrders output? (http://www.ninjatrader.com/support/f...ead.php?t=3627)
NinjaTrader_Matthew is offline  
Reply With Quote
Old 03-07-2012, 10:46 AM   #3
tonynt
Senior Member
 
Join Date: Jun 2009
Posts: 740
Thanks: 19
Thanked 14 times in 9 posts
Default

Hello Matthew,

thanks for your reply. Yes the script-strategy orders are entered, but not the order from the ATM. The conditions are the same (the reason why I´m doing this is because I want to be able to move one positions stop-loss)

And additional information is that it works well when I do an immediate entry in another strategy with

if(orderId.Length == 0 && atmStrategyId.Length == 0
&& GetCurrentAsk() > GetCurrentBid())

Both entries are done (script and atm) but what I notice is that ATM-entry always is later (I think it is next tick).

But when I substitute(of course both script entries and ATM) && GetCurrentAsk() > GetCurrentBid()) by

&& CrossAbove(Stochastics(BarsArray[5],7,14,3).K, Stochastics(BarsArray[5],7,14,3).D, 3) && Close[1] < Open[1] && Close[0] > Open[0])

then only the script entries are done but not the ATM.

Thanks
Tony





QUOTE=NinjaTrader_Matthew;278314]Hello Tony,

Do you mean that the strategy orders are being entered, but not the ATM Strategy?

Are you calling both methods under the same conditions?

Do you have any clues from the TraceOrders output? (http://www.ninjatrader.com/support/f...ead.php?t=3627)[/QUOTE]
Last edited by tonynt; 03-07-2012 at 10:48 AM. Reason: clearify
tonynt is offline  
Reply With Quote
Old 03-07-2012, 01:43 PM   #4
NinjaTrader_Matthew
NinjaTrader Customer Service
 
NinjaTrader_Matthew's Avatar
 
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,783
Thanks: 160
Thanked 566 times in 557 posts
Default

Tony,

Do you see these results in real-time, or are you backtesting?

Please keep in mind that ATM Strategy methods will not be called when backtesting on historical data.
NinjaTrader_Matthew is offline  
Reply With Quote
Old 03-07-2012, 01:47 PM   #5
tonynt
Senior Member
 
Join Date: Jun 2009
Posts: 740
Thanks: 19
Thanked 14 times in 9 posts
Default

Matthew,

thank you. I know that the ATM does not work in backtesting. I do on real-time-demo-account . (but this would have been the solution in backtesting of course)


Thanks
Tony

Quote:
Originally Posted by NinjaTrader_Matthew View Post
Tony,

Do you see these results in real-time, or are you backtesting?

Please keep in mind that ATM Strategy methods will not be called when backtesting on historical data.
Last edited by tonynt; 03-07-2012 at 01:49 PM.
tonynt is offline  
Reply With Quote
Old 03-07-2012, 01:52 PM   #6
NinjaTrader_Matthew
NinjaTrader Customer Service
 
NinjaTrader_Matthew's Avatar
 
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,783
Thanks: 160
Thanked 566 times in 557 posts
Default

Would you mind emailing me your script at support[at]ninjatrader[dot]com

You should find this in (My) Documents\NinjaTrader 7\bin\custom\strategies\<your strategy>.cs

Please attach this to an email with Attn: Matthew in the subject line.

Thanks.
NinjaTrader_Matthew 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

Similar Threads
Thread Thread Starter Forum Replies Last Post
ATM: script generated exit SymeBB Automated Trading 1 12-02-2011 06:21 AM
script-atm-exit handling tonynt Automated Trading 7 11-17-2011 08:47 AM
script - atm tonynt Automated Trading 1 07-14-2011 03:20 AM
ATM in ninja script strategy lukaskuta Strategy Development 156 06-28-2011 07:31 AM
ATM from script MelbourneRich Automated Trading 1 09-19-2008 09:38 AM


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