![]() |
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Senior Member
Join Date: Dec 2007
Posts: 365
Thanks: 36
Thanked 28 times in 24 posts
|
If I attempt to enable the strategy below, and look at the strategy setup window immediately thereafter, it shows as disabled. If I remove the Add() renko bars, it works fine. I've employed multiple timeframes in many other strategies and never had any issues, but this is the first time I'm using Volume bars as primary data series. Am I forgetting to do something here?
Code:
protected override void Initialize()
{
Add(PeriodType.Renko,3);
CalculateOnBarClose = true;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
if (BarsInProgress != 0)return;
// Condition set 1
if (Close[0] > Open[0] )
{
DrawArrowUp("My up arrow" + CurrentBar, false, 0, Low[0] + -2 * TickSize, Color.Lime);
EnterLong(DefaultQuantity, "");
}
}
Never mind, my bad. I see there is a special syntax for this: AddRenko()
Last edited by coolmoss; 07-13-2012 at 04:24 PM.
|
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
|
coolmoss,
I am happy you have resolved your issue. Please feel free to contact us any time.
Adam P.
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| DataSeries on a secondary data series | JoshDance | Indicator Development | 4 | 05-30-2012 11:29 AM |
| Secondary Series and Data, Int, Bool Series | TAJTrades | General Programming | 1 | 03-24-2012 08:13 AM |
| Secondary data series in Indicator | mokodo | General Programming | 2 | 03-22-2012 04:35 AM |
| Referencing secondary data series for a strategy | daven | Strategy Development | 4 | 06-26-2011 08:46 PM |
| Weekend data not triggering on secondary time series | gert74 | Strategy Development | 12 | 08-28-2007 08:12 PM |