Mobius (Demarks Pivot and Demarks MA) for ThinkorSwim

mc01439

Well-known member
2019 Donor
VIP
Mobius posted these on "thinkScript Lounge" this morning.

10:17 Mobius: Here are two studies by DeMark I find still useful.
This one I find useful as boundaries for intraday likely moves:

https://tos.mx/pGukThm
https://tos.mx/vBx2ibC
Code:
#Start Code
# Demark's Pivots
# Ported to TOS by Mobius
#

declare hide_on_daily;

def o = open(period = AggregationPeriod.Day)[1];

def h = high(period = AggregationPeriod.Day)[1];

def l = low(period = AggregationPeriod.Day)[1];

def c = close(period = AggregationPeriod.Day)[1];

def x = if c < o

        then h + (2 * l) + c

        else if c > o

             then (2 * h) + l + c

             else if c == o

                  then h + l + (2 * c)

                  else x[1];

plot Pivot_Point = X/4;

     Pivot_Point.SetPaintingStrategy(PaintingStrategy.Horizontal);

plot Support = X/2 - h;

     Support.SetPaintingStrategy(PaintingStrategy.Horizontal);

plot Resistance = X/2 - l;

     Resistance.SetPaintingStrategy(PaintingStrategy.Horizontal);

# End Code

This is still a very good Moving Average

Code:
#Start Code

# Demarks MA

# Mobius

# V01.2.2011

# What makes this MA unique is that it can be run at very low period lengths and still be a smooth indicator. Which makes it very responsive.

script Range{

    input d = close;

    input Min = 0;

    input Max = 10000;

    def hh = HighestAll(d);

    def ll = LowestAll(d);

    plot nr = (((Max - Min) * (d - ll)) /

                (hh - ll)) + Min;

}



input n = 5;

input V = 0.682;





   def newMax = Highest(high, n);

   def newMin = Lowest(low, n);



script BP {

   def bp = (((close - open) / (high - low)) * volume);

  plot data = bp;

}



   def newBP = Range(BP().data, newMin, newMax);

   def StDev = StDev(newBP, n);

   def GDEMA = (ExpAverage(newBP, n)* (1 + V)) -

               (ExpAverage((ExpAverage(newBP, n)), n)* V);



  plot PlotData = if IsNaN(newBP)

                  then Inertia(GDEMA[1], n)

                  else Inertia(GDEMA, n);

       PlotData.SetStyle(Curve.Firm);

       PlotData.SetLineWeight(1);

       plotData.AssignValueColor(if PlotData > PlotData[2]

                                 then Color.Green

                                 else Color.Red);

# End Code

10:18 Mobius: There 2 different studies in the post above.
 
Last edited by a moderator:

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

@mc01439 Thanks for grabbing these gems. Mobius said he was on 2 minute charts for /ES.
What are the Ticks you used today for the pic above?
 
Interesting indicators, thx for sharing @mc01439. Looks like you have created some cool studies and ways to track signals with those labels too. Are any of those already on this site?
 
Does anyone know how to adjust this DeMARK pivot to calculate the first 15 minutes of trading rather than previous day?
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
441 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

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?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top