OPEN-SOURCE SCRIPT

Center of Gravity BF 🚀

8484
Thanks to HPotter for the code I based this strategy on.

Center of Gravity calculation is based here on a linear regression function using the least squares method.

We use this to calculate a channel consisting of 2 lines, green and red on the chart

This strategy employs a dynamic stop loss function that measures stop loss placement based on recent ATR.

How signals are generated:
  • Price closes above green line = Go Long
  • Price closes below red line = Go Short
  • Yellow dotted line = stop loss based on long entry
  • Orange dotted line = stop loss based on short entry


INSTRUCTIONS
Green background = Go Long, put your stop loss at the yellow dotted line
Red background = Go Short, put your stop loss at the orange dotted line

NB: The stop losses printed on the chart are calculated from the point of entry on a trade, if you make a different entry to what is indicated, the corresponding stop loss will be different to what the indicator displays.

āļ„āļģāļˆāļģāļāļąāļ”āļŠāļīāļ—āļ˜āļīāđŒāļ„āļ§āļēāļĄāļĢāļąāļšāļœāļīāļ”āļŠāļ­āļš

āļ‚āđ‰āļ­āļĄāļđāļĨāđāļĨāļ°āļšāļ—āļ„āļ§āļēāļĄāđ„āļĄāđˆāđ„āļ”āđ‰āļĄāļĩāļ§āļąāļ•āļ–āļļāļ›āļĢāļ°āļŠāļ‡āļ„āđŒāđ€āļžāļ·āđˆāļ­āļāđˆāļ­āđƒāļŦāđ‰āđ€āļāļīāļ”āļāļīāļˆāļāļĢāļĢāļĄāļ—āļēāļ‡āļāļēāļĢāđ€āļ‡āļīāļ™, āļāļēāļĢāļĨāļ‡āļ—āļļāļ™, āļāļēāļĢāļ‹āļ·āđ‰āļ­āļ‚āļēāļĒ, āļ‚āđ‰āļ­āđ€āļŠāļ™āļ­āđāļ™āļ° āļŦāļĢāļ·āļ­āļ„āļģāđāļ™āļ°āļ™āļģāļ›āļĢāļ°āđ€āļ āļ—āļ­āļ·āđˆāļ™ āđ† āļ—āļĩāđˆāđƒāļŦāđ‰āļŦāļĢāļ·āļ­āļĢāļąāļšāļĢāļ­āļ‡āđ‚āļ”āļĒ TradingView āļ­āđˆāļēāļ™āđ€āļžāļīāđˆāļĄāđ€āļ•āļīāļĄāļ—āļĩāđˆ āļ‚āđ‰āļ­āļāļģāļŦāļ™āļ”āļāļēāļĢāđƒāļŠāđ‰āļ‡āļēāļ™