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 habeebft, Today, 07:27 AM
|
1 response
11 views
0 likes
|
Last Post Today, 08:08 AM | ||
Hi
by AveryFlynn
Started by AveryFlynn, Today, 04:57 AM
|
1 response
12 views
0 likes
|
Last Post Today, 07:57 AM | ||
Started by Max238, Today, 01:28 AM
|
4 responses
37 views
0 likes
|
Last Post
by Max238
Today, 07:49 AM
|
||
Started by r68cervera, Today, 05:29 AM
|
1 response
10 views
0 likes
|
Last Post Today, 07:47 AM | ||
Started by geddyisodin, Today, 05:20 AM
|
1 response
14 views
0 likes
|
Last Post Today, 07:38 AM |
Comment