# Mobius Chart Reader For ThinkOrSwim

#### rip78

##### Member
Ruby:
``````# Chart Reader
# Mobius
# V01.06.2021
#Hint: Chart Reader gives an overall view of where price is in the current cycle.
# Combine this study with Trend Pivots, Pivot Array or Wolfe Pivots. Best signals are those there this indicator and a Pivot indicator both agree.
# PaintBars option added by ZupDog

input paintBars = no;
input Label = yes;
input n1 = 21;
input n2 = 13;
input n3 = 200;

def h = high;
def l = low;
def c = close;
def x = barNumber();
def nan = double.nan;
def x0 = if isNaN(c[-1]) and !isNaN(c) then x else x0;
def sR = Max(h, c) - Min(l, c);
def lR = highest(h, 21) - lowest(l, 21);

def energy = Round(Log(sum( sR, 21) / lR) / log(21), 1);
def K =  inertia(c - ((Highest(h, n1) + Lowest(l, n1)) /
2 + ExpAverage(c, n1)) /2, n1);
def D =  ExpAverage(K, n2);
def sT = InertiaAll(c);
def diff = (K - D);
def compress = if Average(c, 20) + (2 * stDev(c, 20)) <
Average(c, 20) + (1.5 * Average(TrueRange(h, c, l), 20))
then 0
else nan;
def zero =  0;
def he = if energy >= .6 then highestAll(K) else nan;
def le = if energy <= .35 then lowestAll(K) else nan;

def countup = if Diff crosses above Zero then 1 else countup + 1;
def countdn = if Diff crosses below Zero then -1 else countdn - 1;

AddLabel(label, Concat("Chart_Reader ", if Diff > 0 then  countup else countdn), if Diff > 0 then Color.CYAN else if Diff < 0 then Color.YELLOW else Color.WHITE );

# Changes color of bars
DefineGlobalColor("Positive", Color.BLUE);
DefineGlobalColor("Negative", Color.DARK_RED);
AssignPriceColor(if !paintBars
then Color.CURRENT
else if Diff >= 0
then GlobalColor("Positive")
else GlobalColor("Negative"));

# End Code``````

Last edited by a moderator:
Could you show it on a chart and how to trade it?

Could you show it on a chart and how to trade it?
1. To understand this indicator, click on the link provided.
For a member to give assistance:
Unsure of how to upload screenshots to the forum, Here are directions.
And here are some Cool Tips For Creating The Perfect Post.

Last edited:
• markos

### Not the exact question you're looking for?

87k+ Posts
317 Online ## The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
• Exclusive indicators
• Proven strategies & setups
• Private Discord community
• Exclusive members-only content
• 1 full year of unlimited support

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?