How to add custom charts as second dataseries in indicators and strateges?
I identified the type of custom bars - it is PeriodType.Final2
I use the following code:
protected override void Initialize()
{
Overlay = true;
Add(PeriodType.Final2, 1);
}
protected override void OnBarUpdate()
{
if(BarsInProgress == 0)
{
Print("BarsInProgress == 0 Close[0] = " + Close[0]);
}
if(BarsInProgress == 1)
{
Print("BarsInProgress == 1 Close[0] = " + Close[0]);
}
}
In Output window i get this:
BarsInProgress == 1 Close[0] = 51,1
BarsInProgress == 1 Close[0] = 51,11
BarsInProgress == 0 Close[0] = 51,08
BarsInProgress == 0 Close[0] = 51,09
BarsInProgress == 0 Close[0] = 51,1
BarsInProgress == 0 Close[0] = 51,11
BarsInProgress == 0 Close[0] = 51,12
BarsInProgress == 1 Close[0] = 51,12
BarsInProgress == 1 Close[0] = 51,11
BarsInProgress == 1 Close[0] = 51,1
BarsInProgress == 1 Close[0] = 51,09
BarsInProgress == 1 Close[0] = 51,1
BarsInProgress == 1 Close[0] = 51,11
BarsInProgress == 1 Close[0] = 51,12
BarsInProgress == 0 Close[0] = 51,13
BarsInProgress == 1 Close[0] = 51,13
That is the second dataseries added and doing something.
How to set properties of DTBRenko chart?
Obviously, NinjaTrader that creates an instance of the class NinjaTrader.Data.DTBRenko.
How to get acsess to properties?

Comment