Return value of the Upper Bollinger band technical indicator.
Syntax:
1 |
BollingerUp[N](price) |
Example:
1 2 3 4 5 6 7 8 9 10 |
//last bar piercing the upper Bollinger Bands bollU = BollingerUp[20](close) if(Open[1]<bollU[1] AND Close[1]>bollU[1]) THEN VAR = -1 ELSE VAR = 0 ENDIF RETURN VAR as "UPPER PIERCING SIGNAL" |
Can someone tell me how to get the 1 standard deviation of BollingerUp? I think this indicator is using default 2 SD. Cheers
This instruction use the default parameter of a Bollinger band = 2 deviations from the mean. If you want to find the bollinger up band with only 1 deviation, you have to re-code it yourself:
dev = 1 //quantity of deviation
avg = average[20](close) //mean
BollUp = avg+std[20](close)*dev //Bollinger Up value
hello everybody,
its concerning bollinger bands, sometimes prices went out of the bollinger band. for example relavant upperbollband is 12734 , price jumped out of the band level lets say 12740.
if thats happening , i would like to generate an automatic trading idea…. the system should do a sellshort , what could be the wording for the code , thx
Something like this:
dev = 2 //quantity of deviation
avg = average[20](close) //mean
BollUp = avg+std[20](close)*dev //Bollinger Up value
if close crosses over BollUp then
SELLSHORT 1 CONTRACT AT MARKET
endif