Code For Bollinger Squeeze

To add comments, please log in or register
jay
84
jay  

Hi, Im trying to make an indicator that will identify conditions when the market is ranging. I want to use the squeeze of the bollinger bands to tell me when the market is ranging.

Can anybody help me with a peice of code to do that?

I can finish the rest of the indicator myself I just need the code for the squeeze.

Thanks !

whocares
84
whocares  
8284 wrote >>

Hi, Im trying to make an indicator that will identify conditions when the market is ranging. I want to use the squeeze of the bollinger bands to tell me when the market is ranging.

Can anybody help me with a peice of code to do that?

I can finish the rest of the indicator myself I just need the code for the squeeze.

Thanks !

Hi 8284

Find attached a Bollinger Squeeze indicator that I often use. YOu can have a look to see if it helps.

Let me know how you get on.

whocares

jay
84
jay  
whocares wrote >>

Hi 8284

Find attached a Bollinger Squeeze indicator that I often use. YOu can have a look to see if it helps.

Let me know how you get on.

whocares

Thanks a lot, Im looking at it now. Ill get back to you asap.

Oje!

jay
84
jay  

Hi whocares,

your idea had occured to me before but I thought there could be another way to do it.

Thanks for the help though.

whocares
84
whocares  
8284 wrote >>

Hi whocares,

your idea had occured to me before but I thought there could be another way to do it.

Thanks for the help though.

You can try calculting the avarage of bandDifference (BandHigh - BandLow) for a set number of Bars. (make the number of Bars a variable so you can test at diffirent values). Then you can assume (and test this assumption) that when your bandDifference is less than the avarage (or a ratio of it) you are experiencing a squeeze. Then when your candle closes outside the bands you have your breakout.

What do you think?

whocares

whocares
84
whocares  
8284 wrote >>

Hi whocares,

your idea had occured to me before but I thought there could be another way to do it.

Thanks for the help though.

I found this indictor in the box. I must dmit I have never used it so I can not say if it is any good.

jay
84
jay  
whocares wrote >>

I found this indictor in the box. I must dmit I have never used it so I can not say if it is any good.

Thanks Ill look into this one as well

jay
84
jay  
8284 wrote >>

Thanks Ill look into this one as well

Nope, this is a combination of systems. Its going to be a difficult task unless we can have a fixed minimum wherebye if the difference between the upper and lower bands fall below this number we can say the market is ranging.

My aim is to make an indicator that doesnt draw lines, just displays certain data about the market, price, etc. I would use the bands as a measure of whether the market is ranging or trending.

This is a noodle scratcher for me.

whocares
84
whocares  
8284 wrote >>

Nope, this is a combination of systems. Its going to be a difficult task unless we can have a fixed minimum wherebye if the difference between the upper and lower bands fall below this number we can say the market is ranging.

My aim is to make an indicator that doesnt draw lines, just displays certain data about the market, price, etc. I would use the bands as a measure of whether the market is ranging or trending.

This is a noodle scratcher for me.

Sorry I was a bit trigger happy and posted 2 notes before. Did you see this note?

You can try calculting the avarage of bandDifference (BandHigh - BandLow) for a set number of Bars. (make the number of Bars a variable so you can test at diffirent values). Then you can assume (and test this assumption) that when your bandDifference is less than the avarage (or a ratio of it) you are experiencing a squeeze. Then when your candle closes outside the bands you have your breakout.

What do you think?

whocares

whocares
84
whocares  
8284 wrote >>

Nope, this is a combination of systems. Its going to be a difficult task unless we can have a fixed minimum wherebye if the difference between the upper and lower bands fall below this number we can say the market is ranging.

My aim is to make an indicator that doesnt draw lines, just displays certain data about the market, price, etc. I would use the bands as a measure of whether the market is ranging or trending.

This is a noodle scratcher for me.

Sorry I was a bit trigger happy and posted 2 notes before. Did you see this note?

You can try calculting the avarage of bandDifference (BandHigh - BandLow) for a set number of Bars. (make the number of Bars a variable so you can test at diffirent values). Then you can assume (and test this assumption) that when your bandDifference is less than the avarage (or a ratio of it) you are experiencing a squeeze. Then when your candle closes outside the bands you have your breakout.

What do you think?

whocares

jay
84
jay  
whocares wrote >>

Sorry I was a bit trigger happy and posted 2 notes before. Did you see this note?

You can try calculting the avarage of bandDifference (BandHigh - BandLow) for a set number of Bars. (make the number of Bars a variable so you can test at diffirent values). Then you can assume (and test this assumption) that when your bandDifference is less than the avarage (or a ratio of it) you are experiencing a squeeze. Then when your candle closes outside the bands you have your breakout.

What do you think?

whocares

Hey thats a really good idea. A really good one. Thanks,Ill try it out.

12
To add comments, please log in or register