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 > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 10-26-2012, 02:48 PM   #46
NinjaTrader_JC
NinjaTrader Customer Service
 
NinjaTrader_JC's Avatar
 
Join Date: Mar 2012
Location: Denver, CO
Posts: 1,200
Thanks: 137
Thanked 183 times in 182 posts
Default

Hello RushToHP,

Welcome to the NinjaTrader Support Forums!

So that I may further assist you could you answer the following questions.

Who are you connected to? This is displayed by green on lower left corner of the Control Center window.

What instrument do you have selected? (Example: ES 12-12, CL 12-12)

Do you receive an error on screen? Are there errors on the Log tab of the Control Center? If so, what do these errors report?
NinjaTrader_JC is offline  
Reply With Quote
Old 10-27-2012, 02:20 AM   #47
Sylvestro
Member
 
Join Date: May 2011
Location: Belgium
Posts: 56
Thanks: 6
Thanked 2 times in 2 posts
Default

RusToHP,
Do you have a real time data connection?
Renko and Range charts need tick data.
Best, Sylvestro
Sylvestro is offline  
Reply With Quote
Old 10-27-2012, 02:28 AM   #48
Sylvestro
Member
 
Join Date: May 2011
Location: Belgium
Posts: 56
Thanks: 6
Thanked 2 times in 2 posts
Default

JC,
You will have to find a better explanation...
A session break is visible in a Renko chart with a bar with the open and close at the same level. This is not the case here. And it is normal because I am using a session template of a whole week.
Please believe me, set it up and let it run for some time I am sure you will note the same problem...
Sylvestro is offline  
Reply With Quote
Old 10-29-2012, 03:20 PM   #49
NinjaTrader_JC
NinjaTrader Customer Service
 
NinjaTrader_JC's Avatar
 
Join Date: Mar 2012
Location: Denver, CO
Posts: 1,200
Thanks: 137
Thanked 183 times in 182 posts
Default

Hello Sylvestro,

If you right click inside the chart and select Reload All Historical Data does it chart look normal?

I had a Renko chart opened up all day today and have not ran into that issue, but I could not do it on an ES chart as the US Equities Market was closed for today. Is there a reproducible scenario that you could provide me? Including what data provider that you are using, and what settings the Data Series is set to (include how you setup your custom session template).
NinjaTrader_JC is offline  
Reply With Quote
Old 10-30-2012, 02:20 AM   #50
Sylvestro
Member
 
Join Date: May 2011
Location: Belgium
Posts: 56
Thanks: 6
Thanked 2 times in 2 posts
Default

If I reload or change settings it is gone. Last time it took 2 days before it appeared. I had the problem both with eSignal and Kinetick as data providers. The data series is set to Renko, box size 8 and I had the problem both with the ES mini and with the forex EUR.USD. I also have it with different PCs and different NinjaTrader installations. I do not know anything that would provoke it....
The only thing is that if I uses a fixed custom range of data, I never had it. Only if I use a number of bars or a number of days...
Sylvestro
Last edited by Sylvestro; 10-30-2012 at 02:24 AM.
Sylvestro is offline  
Reply With Quote
Old 10-30-2012, 04:33 PM   #51
NinjaTrader_JC
NinjaTrader Customer Service
 
NinjaTrader_JC's Avatar
 
Join Date: Mar 2012
Location: Denver, CO
Posts: 1,200
Thanks: 137
Thanked 183 times in 182 posts
Default

Hello Sylvestro,

I have not been able to reproduce it thus far, but I will keep trying over the next few day. Let me know if you are able to find a reproducible scenario when this happens.
NinjaTrader_JC is offline  
Reply With Quote
Old 11-20-2012, 12:11 PM   #52
Sylvestro
Member
 
Join Date: May 2011
Location: Belgium
Posts: 56
Thanks: 6
Thanked 2 times in 2 posts
Default Modified Renko for session breaks

In a normal chart using a fixed time reference (minutes, hours, days) there is no problem with session breaks, because they do not display an extra bar on the chart. This is however different with all non fixed time reference charts like Renko and Range bars. Here session breaks show an additional bar in the chart. For me there are a number of reasons why these extra bars should not be shown, the chart should be drawn as if there were no sessions breaks. I have modified the original @BarssTypes.cs to adapt the Renko chart. The modification in the public class RenkoBarsType is shown below. This seems to work fine now without bars in the session break. I try to do the same thing for Range bars. However I do not manage to do the same thing for Range bars. Any help will be much appreciated...
Sylvestro

public class RenkoBarsType : BarsType
{
.........................................
public override void Add(Bars bars, double open, double high, double low, double close, DateTime time,
long volume, bool isRealtime)
{
offset = bars.Period.Value * bars.Instrument.MasterInstrument.TickSize;
if (bars.Count < tmpCount && bars.Count > 0) // reset cache when bars are trimmed
{
renkoHigh = bars.GetClose(bars.Count - 1) + offset;
renkoLow = bars.GetClose(bars.Count - 1) - offset;
}
// MODIFICATION
if ((bars.Count == 0)) // || (bars.IsNewSession(time, isRealtime)))
{
// MODIFICATION
/*if (bars.Count != 0)
{
// close out last bar in session and set open == close
Bar lastBar = (Bar)bars.Get(bars.Count - 1);
bars.RemoveLastBar(isRealtime); // Note: bar is now just a local var and not in series!
AddBar(bars, lastBar.Close, lastBar.Close, lastBar.Close, lastBar.Close, lastBar.Time,
lastBar.Volume, isRealtime);
}*/
renkoHigh = close + offset;
renkoLow = close - offset;
AddBar(bars, close, close, close, close, time, volume, isRealtime);
bars.LastPrice = close;
return;
}
Sylvestro 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
Renko bars for entries, time-based bars for exits arbuthnot Strategy Development 4 07-20-2012 03:34 PM
Renko Bars roonius General Programming 112 01-23-2012 03:52 AM
Renko Bars volpiemanuele Strategy Analyzer 3 11-15-2010 05:28 AM
Bars.FirstBarOfSession doesn't work with Renko bars gregid Version 7 Beta General Questions & Bug Reports 20 05-24-2010 08:17 AM
Renko bars offered? kenz987 Version 7 Beta General Questions & Bug Reports 3 02-18-2010 11:53 AM


All times are GMT -6. The time now is 12:11 AM.