![]() |
|
|||||||
| 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. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Senior Member
Join Date: Jun 2009
Posts: 747
Thanks: 23
Thanked 14 times in 9 posts
|
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
|
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,858
Thanks: 162
Thanked 579 times in 570 posts
|
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)
Matthew
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Jun 2009
Posts: 747
Thanks: 23
Thanked 14 times in 9 posts
|
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
|
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,858
Thanks: 162
Thanked 579 times in 570 posts
|
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.
Matthew
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Jun 2009
Posts: 747
Thanks: 23
Thanked 14 times in 9 posts
|
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
Last edited by tonynt; 03-07-2012 at 01:49 PM.
|
|
|
|
|
|
#6 |
|
NinjaTrader Customer Service
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,858
Thanks: 162
Thanked 579 times in 570 posts
|
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.
Matthew
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |