Repaints TTM_ScalperAlert for ThinkorSwim

Repaints
Is there any mention of why the Mobius candle count horizontal pivot script seems to have issues loading on the larger timeframes like a 15m? I'll be viewing it a certain way and then hours later realize it hasn't loaded like 3-4 of the latest lines on the count.

5Exb7Se.png


A gif showing how the pivots only update on a refresh of the chart would better explain this but just wondering why nobody nobody else seems to have to issue. Maybe its due to having the count too short.

Code:
# Mobius
# Mobius on My Trade
# TTM Scalper Replica or High_Low_Pivots
# V001.06.2012
# jpwel added alerts 06/26/2015

input n = 8;
input ShowLines = yes;
input SoundAlerts = yes;

def h = high;
def l = low;
def Firstbar = BarNumber();
def Highest = fold i = 1
             to n + 1
             with p = 1
             while p
             do h > GetValue(h, -i);
def A = if (Firstbar > n
            and h == Highest(h, n)
            and Highest)
            then h
            else Double.NaN;
def Lowest = fold j = 1
            to n + 1
            with q = 1
            while q
            do l < GetValue(l, -j);
def B = if (Firstbar > n
            and l == Lowest(l, n)
            and Lowest)
            then l
            else Double.NaN;
rec Al = if !IsNaN(A)
             then A
             else Al[1];
rec Bl = if !IsNaN(B)
             then B
             else Bl[1];

plot ph = Round(A, 2);
ph.SetPaintingStrategy(PaintingStrategy.VALUES_ABOVE);

plot hL = if Al > 0
                       then Al
                       else Double.NaN;
hL.SetHiding(!ShowLines);
hL.SetPaintingStrategy(PaintingStrategy.DASHES);
hL.SetDefaultColor(Color.GREEN);

plot pl = Round(B, 2);
pl.SetPaintingStrategy(PaintingStrategy.VALUES_BELOW);

plot ll = if Bl > 0
                      then Bl
                      else Double.NaN;
ll.SetHiding(!ShowLines);
ll.SetPaintingStrategy(PaintingStrategy.DASHES);
ll.SetDefaultColor(Color.RED);
 
Last edited by a moderator:
Is there any mention of why the Mobius candle count horizontal pivot script seems to have issues loading on the larger timeframes like a 15m? I'll be viewing it a certain way and then hours later realize it hasn't loaded like 3-4 of the latest lines on the count.

5Exb7Se.png


A gif showing how the pivots only update on a refresh of the chart would better explain this but just wondering why nobody nobody else seems to have to issue. Maybe its due to having the count too short.

Code:
# Mobius
# Mobius on My Trade
# TTM Scalper Replica or High_Low_Pivots
# V001.06.2012
# jpwel added alerts 06/26/2015

input n = 8;
input ShowLines = yes;
input SoundAlerts = yes;

def h = high;
def l = low;
def Firstbar = BarNumber();
def Highest = fold i = 1
             to n + 1
             with p = 1
             while p
             do h > GetValue(h, -i);
def A = if (Firstbar > n
            and h == Highest(h, n)
            and Highest)
            then h
            else Double.NaN;
def Lowest = fold j = 1
            to n + 1
            with q = 1
            while q
            do l < GetValue(l, -j);
def B = if (Firstbar > n
            and l == Lowest(l, n)
            and Lowest)
            then l
            else Double.NaN;
rec Al = if !IsNaN(A)
             then A
             else Al[1];
rec Bl = if !IsNaN(B)
             then B
             else Bl[1];

plot ph = Round(A, 2);
ph.SetPaintingStrategy(PaintingStrategy.VALUES_ABOVE);

plot hL = if Al > 0
                       then Al
                       else Double.NaN;
hL.SetHiding(!ShowLines);
hL.SetPaintingStrategy(PaintingStrategy.DASHES);
hL.SetDefaultColor(Color.GREEN);

plot pl = Round(B, 2);
pl.SetPaintingStrategy(PaintingStrategy.VALUES_BELOW);

plot ll = if Bl > 0
                      then Bl
                      else Double.NaN;
ll.SetHiding(!ShowLines);
ll.SetPaintingStrategy(PaintingStrategy.DASHES);
ll.SetDefaultColor(Color.RED);
You probably want to read through the whole thread to understand the myriad of problems associated with this indicator.
In answer to your question, yes other members have documented the problem of not updating in real time.
https://usethinkscript.com/threads/ttm_scalperalert-for-thinkorswim.914/#post-47967
 
Last edited:
You probably want to read through the whole thread to understand the myriad of problems associated with this indicator.
In answer to your question, yes other members have documented the problem of not updating in real time.
https://usethinkscript.com/threads/ttm_scalperalert-for-thinkorswim.914/#post-47967
draw9300 said:
Is there any mention of why the Mobius candle count horizontal pivot script seems to have issues loading on the larger timeframes like a 15m? I'll be viewing it a certain way and then hours later realize it hasn't loaded like 3-4 of the latest lines on the count.

This adds a portion of Mobius' Projection Pivots to this Scalper script to activate the realtime updating of the pivots. This has been used on other indicators using Mobius' Pivot code as a basis.

Remember that this Scalper Replica will not create a pivot until the pivot is formed by the input n (length) on both sides of the pivot. So if you set the length to the default length of 8, then the pivot will plot at the earliest when 8 bars past the pivot have closed.

The image and the link https://tos.mx/oPNNH5K show both the Replica and actual ScalperAlert indicators, which usually plots an arrow before the Replica plots the pivot.

Screenshot-2023-02-11-095627.png
Code:
# Mobius
# Mobius on My Trade
# TTM Scalper Replica or High_Low_Pivots
# V001.06.2012
# jpwel added alerts 06/26/2015
# Sleepyz: added highpivots/lowpivots code from Mobius Projection
#   Pivots to activate realtime plotting of pivots

input n = 8;
input ShowLines = yes;
input SoundAlerts = yes;

def h = high;
def l = low;
def Firstbar = BarNumber();
def Highest = fold i = 1
             to n + 1
             with p = 1
             while p
             do h > GetValue(h, -i);
def A = if (Firstbar > n
            and h == Highest(h, n)
            and Highest)
            then h
            else Double.NaN;
def Lowest = fold j = 1
            to n + 1
            with q = 1
            while q
            do l < GetValue(l, -j);
def B = if (Firstbar > n
            and l == Lowest(l, n)
            and Lowest)
            then l
            else Double.NaN;
rec Al = if !IsNaN(A)
             then A
             else Al[1];
rec Bl = if !IsNaN(B)
             then B
             else Bl[1];

#### Code added to activate realtime updating pf Pivots

def PHBar    = if !IsNaN(A)
               then Firstbar
               else PHBar[1];

def PLBar    = if !IsNaN(B)
               then Firstbar
               else PLBar[1];

def priorPHBar = if Al != Al[1]
                 then PHBar[1]
                 else priorPHBar[1];

def priorPLBar = if Bl != Bl[1]
                 then PLBar[1]
                 else priorPLBar[1];

def HighPivots = Firstbar >= HighestAll(priorPHBar);
def LowPivots  = Firstbar >= HighestAll(priorPLBar);


#################


plot ph = Round(A, 2);
ph.SetPaintingStrategy(PaintingStrategy.VALUES_ABOVE);

plot hL = if Al > 0 or HighPivots
                       then Al
                       else Double.NaN;
hL.SetHiding(!ShowLines);
hL.SetPaintingStrategy(PaintingStrategy.DASHES);
hL.SetDefaultColor(Color.GREEN);

plot pl = Round(B, 2);
pl.SetPaintingStrategy(PaintingStrategy.VALUES_BELOW);

plot ll = if Bl > 0 or LowPivots
                      then Bl
                      else Double.NaN;
ll.SetHiding(!ShowLines);
ll.SetPaintingStrategy(PaintingStrategy.DASHES);
ll.SetDefaultColor(Color.RED);
 
Last edited:
I wanted to post and update about the Mobius TTM Scalper code.
So, I understand that this indicator repaints by looking at the future bars. My question is how many bars in the future does it look (or rather wait to form) until it repaints the pivot in the past?
It looks like the line:
input n = 8;
controls the amount of future bars that the indicator looks at.
Is this correct?
The input n is the deciding factor on how many bars will be looked at. If you use this to look at historical data, it will provide very promising results that cannot be matched in real time (because it repaints).

The code is still useful for determining trends, but I do not use this for an entry/exit point.
 
In short, the TTM_Scalper is an extremely lagging/ super repainter. Adding alerts to it or trying to scan is useless.
 
Last edited by a moderator:
TTM scalper signals are delayed by a few bars. I think that is the culprit.

In short, the TTM_Scalper is an extremely lagging/repainting indicator. Adding alerts to it is useless.
I understand that it is lagging, and cant ask for anything that predicts the furure. Id be rich if i could do that :) i only want to be notified on my phone when the arrow is painted. So far, myself and 4 TOS support guys have not accomplished this. I cant follow the chart all day, and if i am alerted on my phone or watch, i can then take a look and decide wheather or not to take action. this is all on the 1 and 4 hr chart. I so hope someone can tell me correct parameters to use
 
How can I use this in a scan

input n = 8;
input ShowLines = yes;
input SoundAlerts = yes;

def h = high;
def l = low;
def Firstbar = BarNumber();
def Highest = fold i = 1
to n + 1
with p = 1
while p
do h > GetValue(h, -i);
def A = if (Firstbar > n
and h == Highest(h, n)
and Highest)
then h
else Double.NaN;
def Lowest = fold j = 1
to n + 1
with q = 1
while q
do l < GetValue(l, -j);
def B = if (Firstbar > n
and l == Lowest(l, n)
and Lowest)
then l
else Double.NaN;
rec Al = if !IsNaN(A)
then A
else Al[1];
rec Bl = if !IsNaN(B)
then B
else Bl[1];

plot ph = Round(A, 2);
ph.SetPaintingStrategy(PaintingStrategy.VALUES_ABOVE);

plot hL = if Al > 0
then Al
else Double.NaN;
hL.SetHiding(!ShowLines);
hL.SetPaintingStrategy(PaintingStrategy.DASHES);
hL.SetDefaultColor(Color.cyan);

plot pl = Round(B, 2);
pl.SetPaintingStrategy(PaintingStrategy.VALUES_BELOW);

plot ll = if Bl > 0
then Bl
else Double.NaN;
ll.SetHiding(!ShowLines);
ll.SetPaintingStrategy(PaintingStrategy.DASHES);
ll.SetDefaultColor(Color.RED);
 
Last edited by a moderator:
I am using the TTM Scalper Alert on my charts along with the 21 EMA and 2 sets of Keltner Channels.
Is it possible to be alerted when a TTM Scalper Alert Arrow prints up or down. Not knowing anything about programming it seems that if this could be possible through a scan on the Daily time frame in my meager paper testing it has some potential good buy and sell signals.
Thank you to anyone who may be able to help.
Richard Lamkin
 
This indicator is a super repainter / super lagger
The signals do not happen in real time.

Scans and alerts do work in real time.
So this indicator can not be used in alerts or scans.
Read through this thread to understand the host of other issues related to this study.

@QUIKTDR1 @Richard Lamkin
 
Last edited:
Unfortunately my coding experience is pretty limited so I can't help in that respect. As a caveat though please beware that the TTM does need a certain amount of candles to confirm a signal so it is a repainter. @MerryDay may be able to shed further light on your issue.
 
Hello...

Was curious if anyone could tell me how to turn this alert into a scan for my watchlist?
I do not want the TTM Squeeze scan, but specifically a scan for the signals that the "TTM_ScalperAlert" throws off.

I am somewhat familiar with the scan tab, and figured out how to find the study , I'm just not sure of the other value to input.
Any help would be appreciated!
 

Attachments

  • Screenshot 2024-07-22 at 12.43.48 AM.png
    Screenshot 2024-07-22 at 12.43.48 AM.png
    303 KB · Views: 80
Given that this indicator is significantly laggy and is a prolific repainter.
Neither alerts nor scans serve any value.
Read through the whole thread to understand why a scanner cannot be created.
And for the discussion of the myriad of issues with this indicator.



@Ommni007 @Splinter @twistedchuck
 
Last edited:

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

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
321 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