Cosmic Gravity

Cosmic Gravity draws dynamic non-repainting trendlines and helps

⭐ know when to scalp
⭐ predict the position and timing of the next major reversal
⭐ predict sudden changes in volatility
⭐ recognize if the trend is bearish or bullish


Cosmic Gravity draws a dynamic channel consisting of a basis line and several support and resistance levels for low/medium/high volatility situations, as defined by the Inner Channel and 2 Outer Channel plots respectively. The script achieves this by reducing a large number of select moving averages, their multiples, and other trend levels into a single basis line and deriving the remaining plots off of it using ATR and probability-constant multiples. The basis line color is determined by its smoothed vector similar to how our Cosmic Vector indicator paints its plot. The aim of this indicator is to provide a consistent and generic price context that works out-of-the-box; accordingly a single static average period is used throughout and the settings have been stripped to the bare minimum with no need to ever update them.


Cosmic Gravity's channel levels are meant to be used as a guide for entering and exiting positions and setting stop-loss and take profit levels. The indicator is deemed effective for any particular timeframe as long as the price stays within the maximum bounds of the indicator's plots. For this reason it is recommended to use Cosmic Gravity in a multi-chart layout where each chart has a different timeframe. The 5 primary strategies are:

  • long when the price reverses off of an Outer Channel support level and short when the price reverses off of an Outer Channel resistance level
  • long when the price crosses above the basis line after being below it for a prolonged period and vice-versa (short when the price trend moves below the basis line)
  • long when the basis line color turns blue after being pink for a prolonged period and visa-versa (short when the basis line color turns pink)
  • long/short in the direction the price takes when it goes outside the Magnetic Gravity channel when this channel is in a tight squeeze
  • scalp as the price bounces between the Inner Channel levels (do this only while the price is contained inside the Inner Channel)


Get notified at the most critical times with a single alert. Simply select Cosmic Gravity - Any alert() function call as the condition when creating an alert and you will be tipped-off on bar-close as follows:

  • RR↘ (price close crossed below Outer Channel R6 plot)
  • RR↗ (price high crossed above Outer Channel R6 plot)
  • R└ (price low entered R channel from above)
  • R┘ (price high exited R channel from above)
  • R┐ (price high exited R channel from below)
  • R┌ (price high entered R channel from below)

  • B↘ (price high crossed below Basis plot)
  • B↗ (price low crossed above Basis plot)
  • B╮ (Basis vector turned negative)
  • B╯ (Basis vector turned positive)

  • S└ (price low entered S channel from above)
  • S┘ (price low exited S channel from above)
  • S┐ (price low exited S channel from below)
  • S┌ (price high entered S channel from below)
  • SS↘ (price low crossed below Outer Channel S6 plot)
  • SS↗ (price close crossed above Outer Channel S6 plot)

For example, an alert such as Cosmic Gravity 6H R┐ B↘ means that during the last 6-hour bar the price exited the R channel from below and also crossed below the basis line.


The information we create and publish here is not prohibited, doesn't constitute investment advice, and isn't created solely for qualified investors.

📣 Ask on Reddit:
👀 Watch on TikTok:

🚩 Disclaimer: the information created and published here is not prohibited, doesn't constitute investment advice, and isn't created solely for qualified investors
Protected script
This script is published closed-source and you may use it freely. You can favorite it to use it on a chart. You cannot view or modify its source code.

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?

Related Ideas