![]() |
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
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Jul 2008
Posts: 24
Thanks: 0
Thanked 0 times in 0 posts
|
I would like some advice regarding a design approach for a complex strategy. (I'm ok with programming, I don't anticipate running into problems I can't handel -- famous last words.)
Q1. Is it necessary to open a chart to run a strategy? Q2. The strategy I am planning involves an single indicator/oscillator derived from from three instruments and trading three other instruments together as a basket. Each of the first three instruments needs two timeframes. There is no obvious bar series (either from the indicator or the basket) that stands out as a preferred default. Do I just pick any one instrument as a default, open a chart and specify one of the time frames? What are the possible/likely unanticipated consequences of this undesired asymmetry between instruments? Q3. Do I have to open a separate chart for every instrument I wish to trade? If so, does each chart have to recalculate the oscillator separately? How do I keep the basket in synch? Q4. Is it possible to put the complete traded basket on a single chart, together with the oscillator from the non-traded instruments? |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
1) No, see "strategies" tab and related docs
2) Multi series indicators are not supported at this time. Strategies are though. Does not matter which series is the first 3) see (1) 4) No, see (1)
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#3 | |
|
Junior Member
Join Date: Jul 2008
Posts: 24
Thanks: 0
Thanked 0 times in 0 posts
|
Quote:
So this raises a question. In my strategy code, how do I know which of the 6 currency pairs I have chosen (from the strategy dialog) as the default first series? Alternatively, how can I make the data series specified in the strategy dialog always be a default choice that the strategy code knows and the user can't change? I'm guessing that the answer to both questions is that I can't. And I can live with that answer (uncomfortably). But this irks me as I don't like to sacrifice generality, particularly when it requires me remembering unimportant stuff that I have put into the code (like which indicator pair I must always use for the first series).
Last edited by mikeyork; 07-07-2008 at 04:00 PM.
|
|
|
|
|
|
|
#4 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
1) You don't, you need to just pick one pair to always run on the chart.
2) Unfortunately this is not supported. 3) I see your point and will consider if we could support this in the future.
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Jul 2008
Posts: 24
Thanks: 0
Thanked 0 times in 0 posts
|
Thanks again.
Now I have some different questions concerning the order of event handling. 1. I have three instruments each with two Added bar series. The first is a multi-minute bar and the second is an indicator built on the first, but with an OnBarUpdate method called per tick. The OnBarUpdate method for the complete strategy also functions per tick. For any given instrument, which OnBarUpdate method gets called first? (In other words, how do I know if the indicator has already been updated when the strategy method is called?) 2. If a tick coincides with a bar close, which event triggers OnBarUpdate first, the bar close or the tick? 3. Are my questions materially irrelevant? |
|
|
|
|
|
#6 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
Indicators will always be current as your strategy calls them. A tick is the source for determining when a bar is closed. Your questions are irrelevant.
Ray
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Multi TimeFrame Setting | Edgar V. | Strategy Development | 11 | 03-19-2008 10:02 PM |
| Volume for Multi-Timeframe | GuyFB | General Programming | 8 | 02-01-2008 03:01 PM |
| Multi Time Frame/Multi Instrument? | GreenTrade | Strategy Development | 3 | 01-14-2008 02:24 PM |
| Multi Timeframe error | Learning1 | Strategy Development | 2 | 09-14-2007 07:53 AM |
| Multi-Timeframe use in a Strategy | Freddie | Strategy Analyzer | 25 | 05-30-2007 07:02 AM |