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 05-07-2010, 02:31 PM   #1
bourbonnais
Junior Member
 
Join Date: May 2010
Posts: 9
Thanks: 0
Thanked 0 times in 0 posts
Default Can NinjaTrader execute strategy code regularly without trade happening?

I have never used NinjaTrader before, but I am considering to switch from Tradestation.

From my experience using Tradestation, when applying strategy to a chart, they execute strategy code when:
a. trade happens to the main datastream (tick based) or
b. an interval bar closes and there is trade happen to the main datastream during the bar.

If data #1 of the chart does not have trade happen during the bar interval, then strategy code is not run at all.

For example, if I apply my strategy to 1-minute chart and no trade happens for 10 minutes, then the strategy code is not executed at all during the 10 minutes.

I am looking for some trading software that can execute strategy code regularly(like every 15 seconds) regardless whether there is trade happen.

Another 2 alternative solutions are:
1. Software can execute strategy code when data#2 ticks.
2. Software can generate order for data#2
then I can use another actively-traded instrument as second datastream to solve this issue.

Can NinjaTrade achieve this?

Thanks for help.
bourbonnais is offline  
Reply With Quote
Old 05-07-2010, 03:18 PM   #2
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

Hello bourbonnais,

Welcome to the NinjaTrader forums!

Yes, we function similarly. The equivalent NinjaTrader setting is CalculateOnBarClose to determine whether orders are submitted tick by tick or the next bar following a condition.


Running a Strategy at the Close of a Bar or Tick by Tick
  • During backtest, strategies can ONLY be processed at the close of each bar
  • During real-time operation, you have a choice to run a strategy tick by tick (CalculateOnBarClose set to false) which can produce different results. This is because you can have a signal that executes an order at the close of a bar but when running tick by tick, while in a bar a signal condition can be true although its false at the close of the same bar.
However, you do not have to tie conditions for entry to bar objects. You're free to use C# language to specify other conditions. The following reference sample discusses creating custom events to create a level II book, but the same principles can be used for trade entry:
http://www.ninjatrader-support2.com/...ead.php?t=5965

Your other approach should work for you as well. You can monitor for conditions on one series and submit orders on another. This help guide article can help with implementing a multseries strategy.
NinjaTrader_RyanM 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
Execute Trade X number of ticks from outter Boilnger band TD-Trader747 Automated Trading 14 02-15-2010 11:29 AM
What happening? Baruch Strategy Development 13 12-02-2009 12:40 PM
Doubel Emails Happening Widgetman Indicator Development 2 07-12-2009 07:18 AM
MACD Crossover - wont execute any trade aidan545 General Programming 3 01-30-2009 09:22 AM
Exits not happening DarrylT Strategy Development 3 01-11-2007 03:06 AM


All times are GMT -6. The time now is 09:05 PM.