I wanted to attribute a new series to the bars. Which acts almost like a bool flag.
If condition 1 is met, I will assign the value of 1 to the series, and if condition 2 is met, I will assign the value -1 to the series, and if none of them are met, I will set the value of the series to 0.
And in my strategy when bars are loaded. I want that series to be calculated for historical bars. To continue to use it.
For example, suppose each bar has 5 parameters: open, high, low, close, and volume, and we want to add a sixth parameter called the bool flag to it.
Do you have an idea?
Comment