Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Bars.Period.Value
Collapse
X
-
Hello rwbil,
Are you referring to the BarsPeriod.Value?
Below is a link to the help guide on BarsPeriod.
http://www.ninjatrader.com/support/h...barsperiod.htm
Let me know if this is not what you are looking for.Chelsea B.NinjaTrader Customer Service
-
I see it also in the Unirenko bar type from your website shown below. Plus other bar. parameters
public UniRenkoBarsType() : base(PeriodType.Custom5) { }
static bool registered = Register(new UniRenkoBarsType());
double barOpen;
double barMax;
double barMin;
double fakeOpen=0;
int barDirection=0;
double openOffset=0;
double trendOffset=0;
double reversalOffset=0;
bool maxExceeded=false;
bool minExceeded=false;
double tickSize=0.01;
public override void Add(Bars bars, double open, double high, double low, double close, DateTime time, long volume, bool isRealtime)
{
//### First Bar
if ((bars.Count == 0) || bars.IsNewSession(time, isRealtime))
{
tickSize = bars.Instrument.MasterInstrument.TickSize;
trendOffset = bars.Period.Value * bars.Instrument.MasterInstrument.TickSize;
reversalOffset = bars.Period.Value2 * bars.Instrument.MasterInstrument.TickSize;
//bars.Period.BasePeriodValue = bars.Period.Value; //### Remove to customize OpenOffset
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by naanku, Today, 07:25 PM
|
0 responses
6 views
0 likes
|
Last Post
by naanku
Today, 07:25 PM
|
||
Started by milfocs, Today, 07:23 PM
|
0 responses
4 views
0 likes
|
Last Post
by milfocs
Today, 07:23 PM
|
||
Started by PaulMohn, Today, 06:59 PM
|
0 responses
7 views
0 likes
|
Last Post
by PaulMohn
Today, 06:59 PM
|
||
Started by bortz, 11-06-2023, 08:04 AM
|
48 responses
1,753 views
0 likes
|
Last Post
by carnitron
Today, 06:57 PM
|
||
Started by Jonker, 04-27-2024, 01:19 PM
|
3 responses
24 views
0 likes
|
Last Post Today, 05:45 PM |
Comment