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 Irukandji, Today, 04:58 AM
|
0 responses
2 views
0 likes
|
Last Post
by Irukandji
Today, 04:58 AM
|
||
Started by fitspressoburnfat, Today, 04:25 AM
|
0 responses
2 views
0 likes
|
Last Post Today, 04:25 AM | ||
Started by Skifree, Today, 03:41 AM
|
1 response
4 views
0 likes
|
Last Post
by Skifree
Today, 03:42 AM
|
||
Started by usazencort, Today, 01:16 AM
|
0 responses
1 view
0 likes
|
Last Post
by usazencort
Today, 01:16 AM
|
||
Started by kaywai, 09-01-2023, 08:44 PM
|
5 responses
604 views
0 likes
|
Last Post Today, 12:32 AM |
Comment