Hi,
Could someone help me construct this price band indicator that uses the Upper and Lower Standard Error Bands. The following is the logic for the price bands. I hope it is clear. If it is not don’t hesitate to ask me for more clarification. I use a 5 length look back, a 2 deviant, and 3 smooth for the Standard Error Bands.
Thank you in advance for your help.
Logic for upper price band.
For Bar = Len to BarCount –1 do
Begin
MaxHigh = max( High( Bar ), High( Bar –1) );
If (Upper Standard Error Band ( Bar ) >= High( Bar ) then
If (Upper Standard Error Band ( Bar ) <= MaxHigh then
MaxHigh = min( Upper Standard Error Band ( Bar ), UpPriceBand_float );
UpPriceBand_float = MaxHigh;
Upper Price Band = SetSeriesValue( Bar, MaxHigh );
End;
Logic for lower price band.
For Bar = Len to BarCount –1 do
Begin
MinLow = min( Low( Bar ), Low( Bar – 1) );
If Lower Standard Error Band( Bar ) <= Low( Bar ) then
If Lower Standard Error Band >= MinLow then
MinLow = max(Lower Standard Error Band( Bar ), LoPriceBand_float );
LoPriceBand_float = MinLow;
Lower Price Band = SetSeriesValue( Bar, MinLow );
End;
Could someone help me construct this price band indicator that uses the Upper and Lower Standard Error Bands. The following is the logic for the price bands. I hope it is clear. If it is not don’t hesitate to ask me for more clarification. I use a 5 length look back, a 2 deviant, and 3 smooth for the Standard Error Bands.
Thank you in advance for your help.
Logic for upper price band.
For Bar = Len to BarCount –1 do
Begin
MaxHigh = max( High( Bar ), High( Bar –1) );
If (Upper Standard Error Band ( Bar ) >= High( Bar ) then
If (Upper Standard Error Band ( Bar ) <= MaxHigh then
MaxHigh = min( Upper Standard Error Band ( Bar ), UpPriceBand_float );
UpPriceBand_float = MaxHigh;
Upper Price Band = SetSeriesValue( Bar, MaxHigh );
End;
Logic for lower price band.
For Bar = Len to BarCount –1 do
Begin
MinLow = min( Low( Bar ), Low( Bar – 1) );
If Lower Standard Error Band( Bar ) <= Low( Bar ) then
If Lower Standard Error Band >= MinLow then
MinLow = max(Lower Standard Error Band( Bar ), LoPriceBand_float );
LoPriceBand_float = MinLow;
Lower Price Band = SetSeriesValue( Bar, MinLow );
End;
Comment