#### DivideSeries & UserSeries vs. per bar computations

Posted By DTrader 7 Years Ago

## DivideSeries & UserSeries vs. per bar computations

 Message Posted Thursday July 08 2010 Just getting my feet wet here, reading through the api and doing some experiments. I'm looking to do some relatively complex computations on multiple symbols on each bar of a strategy. I'm trying to figure out the advantage of using userSeries and/or the series utility functions as opposed to performing the calculations on each bar. I get UserSeries, very useful; I'm thinking I can create userSeries for various partial results -- I love the fact that I can create multiple series and then plot them on multiple chart panes (right?); very useful for visualizing the internal dynamics of my strategies. Can you explain the advantage of instantiating a series class (eg. divideseries) in the startup as opposed to performing the calculation in the NewBar() method? Is there a performance advantage?eg. public override void NewBar() { float result = Close.Current/OtherSymbols["GOOG"].Close.Current; } Posted Friday July 09 2010 There is no advantage. The divideseries is merely a convenience function and is mostly there to facilitate basic arithmetic in drag and drop operations.DTrader (7/8/2010)Just getting my feet wet here, reading through the api and doing some experiments. I'm looking to do some relatively complex computations on multiple symbols on each bar of a strategy. I'm trying to figure out the advantage of using userSeries and/or the series utility functions as opposed to performing the calculations on each bar. I get UserSeries, very useful; I'm thinking I can create userSeries for various partial results -- I love the fact that I can create multiple series and then plot them on multiple chart panes (right?); very useful for visualizing the internal dynamics of my strategies. Can you explain the advantage of instantiating a series class (eg. divideseries) in the startup as opposed to performing the calculation in the NewBar() method? Is there a performance advantage?eg. public override void NewBar() { float result = Close.Current/OtherSymbols["GOOG"].Close.Current; } Posted Saturday July 10 2010 thanks. got it.