What is the best way to create price Series (like Open & Close) such that they are universally accessible (like Open[0] and Close[0])? They should be accessible in multiple Indicators and Strategies.
I am attempting to create price Series for Upper (the higher of Open & Close) and Lower (the lower of Open & Close). Please find below the basic formula. Please find attached the concept as an Indicator which falls short on the universal accessibility. Any insight is welcome.
protected override void OnBarUpdate() { if (Close[0] > Open[0]) { Upper[0] = Close[0]; Lower[0] = Open[0]; } else { Upper[0] = Open[0]; Lower[0] = Close[0]; } }
Shannon
Comment