For example:
Code: Select all
protected override void Create()
{
// create variable objects and function objec
values = new VariableSeries<int>(this);
}
protected override void CalcBar()
{
values.Set(barsBack, newValue);
}
Code: Select all
protected override void Create()
{
// create variable objects and function objec
values = new VariableSeries<int>(this);
}
protected override void CalcBar()
{
values.Set(barsBack, newValue);
}
Yes. As soon as the count hits a certain number it will be considered complete and locked in and only then will it be used. But if the count fails to reach the desired level, then the whole series of counts will be disregarded.The logic sounds a bit odd...using your example, you say "lock in", does that mean only once the value is locked in, then you want to do some sort of calculation with this bar counting part of the code?
Or do you want to alter past historical values to get the holy grail (sic) of trading?
In historical mode this is fine, but in real time during the course of trading the user wants to watch the charts and see the counts forming. So the user can see that we are approaching a count of 7 etc...OK, so why not only plot when the count reaches your threshold and is locked in? You don't have to plot every bar, only the ones that matter (to you).