Snippet of code to register bollinger band touch
Created at 26 Jul 2024, 16:33
LE
Snippet of code to register bollinger band touch
26 Jul 2024, 16:33
Hello,
Is it possible to get a sample snippet for how to get my algo to recognise with the market touches a bollinger band?
Thanks
firemyst
01 Aug 2024, 07:02 ( Updated at: 01 Aug 2024, 12:15 )
Here's pseudo code to help you with the top band. You can do something similar for the bottom.
If (
(last price ≥ top bollinger band) and (current closing price ≤ top bollinger band)
or
(last price ≤ top bollinger band) and (current closing price ≥ top bollinger band)
)
{
///then you know it either touched or crossed
}
@firemyst