Hi All,

Im currently having trouble figuring out how Im to achieve the following. Basically I want to have 2 bollinger bands. The first set being 1 deviation away and the 2nd set being 2 deviations away.

var *BBand1 = series(BBands(Close,19,1,1,MAType_SMA));
var *BBand2 = series(BBands(Close,19,2,2,MAType_SMA));

Quote:

BBands(var* Data, int TimePeriod, var NbDevUp, var NbDevDn, int MAType): var
Bollinger Bands. Consist of three lines; the middle band is a simple moving average (generally 20 periods) of the typical price (TP). The upper and lower bands are n standard deviations (generally 2) above and below the middle band. The bands widen and narrow when the volatility of the price is higher or lower, respectively. Bollinger Bands indicate when the price has become relatively high or low, which is signaled through the touch or minor penetration of the upper or lower line. Returns: rRealUpperBand, rRealMiddleBand, rRealLowerBand. Parameters: NbDevUp (Deviation multiplier for upper band), NbDevDn (Deviation multiplier for lower band), MAType (Type of Moving Average).


Now as it says above the BBands function returns 3 variables: "rRealUpperBand, rRealMiddleBand & rRealLowerBand". My question is if I use two bollinger deviations how do I call both the variables for BBands. I can get it to work easily if I just use one set of bollinger bands but when I use two does the 2nd BBands function return different names than "rRealUpperBand, rRealMiddleBand & rRealLowerBand"?

Hope this makes sense...