MicroPullBacks For ThinkOrSwim

gstq54

New member
VIP
Hello, this is Richard Wilkinson: a.k.a pingPa.
I am 71 and a widower who has just discovered the wonderful World of thinkscript.
Recently, I was watching an interview with Bill Gates on PBS, where he describes how he uses Co-Pilot, and I thought I would try it for the first time.
Wow, Bloody Norah! As we Brits say when something takes us by surprise.
I asked Co-Pilot to create a script based on Ross Cameron's micro-pullback study.
Here's the reply:

Code:
# Micro Pullback Chart Study by Copilot
input emaLength = 9;
input volumeMultiplier = 1.5;

def ema = ExpAverage(close, emaLength);
def bullishCandle = close > open;
def prevHigh = high[1];
def prevLow = low[1];

def pullback = close[1] < ema[1] and low[1] > ema[2];
def breakout = close > prevHigh and close > ema;
def avgVol = Average(volume, 20);
def volSpike = volume > avgVol * volumeMultiplier;

def signal = breakout and pullback and bullishCandle and volSpike;

plot MicroPullback = signal;
MicroPullback.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
MicroPullback.SetDefaultColor(Color.GREEN);
MicroPullback.SetLineWeight(3);

I haven't tried this yet, but will this week. Makes me think that artificial intelligence is about to make life very interesting.

Cheers, pingPa
 
Last edited by a moderator:
Solution
Hello, this is Richard Wilkinson: a.k.a pingPa.
I am 71 and a widower who has just discovered the wonderful World of thinkscript.
Recently, I was watching an interview with Bill Gates on PBS, where he describes how he uses Co-Pilot, and I thought I would try it for the first time.
Wow, Bloody Norah! As we Brits say when something takes us by surprise.
I asked Co-Pilot to create a script based on Ross Cameron's micro-pullback study.
Here's the reply:

Code:
# Micro Pullback Chart Study by Copilot
input emaLength = 9;
input volumeMultiplier = 1.5;

def ema = ExpAverage(close, emaLength);
def bullishCandle = close > open;
def prevHigh = high[1];
def prevLow = low[1];

def pullback = close[1] < ema[1] and low[1] > ema[2];
def breakout =...
Hello, this is Richard Wilkinson: a.k.a pingPa.
I am 71 and a widower who has just discovered the wonderful World of thinkscript.
Recently, I was watching an interview with Bill Gates on PBS, where he describes how he uses Co-Pilot, and I thought I would try it for the first time.
Wow, Bloody Norah! As we Brits say when something takes us by surprise.
I asked Co-Pilot to create a script based on Ross Cameron's micro-pullback study.
Here's the reply:

Code:
# Micro Pullback Chart Study by Copilot
input emaLength = 9;
input volumeMultiplier = 1.5;

def ema = ExpAverage(close, emaLength);
def bullishCandle = close > open;
def prevHigh = high[1];
def prevLow = low[1];

def pullback = close[1] < ema[1] and low[1] > ema[2];
def breakout = close > prevHigh and close > ema;
def avgVol = Average(volume, 20);
def volSpike = volume > avgVol * volumeMultiplier;

def signal = breakout and pullback and bullishCandle and volSpike;

plot MicroPullback = signal;
MicroPullback.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
MicroPullback.SetDefaultColor(Color.GREEN);
MicroPullback.SetLineWeight(3);

I haven't tried this yet, but will this week. Makes me think that artificial intelligence is about to make life very interesting.

Cheers, pingPa

hello richard and welcome

good on you for trying it out.

i'm probably the only one, but i will never use ai.
my 2 cents is, it will be years before ai can create anything useful in thinkscript. every ai script i have seen is wrong . your script has an average in it , that doesn't even belong in the calculations. ( based on looking at a video of him talking about the pullback)
, 25 seconds in


the first step in writing a program is to write out a set of rules that the program should follow
here is my interpretation of rules , from that picture
bar1 - green bar, big
bar2 - green bar, body bottom is near bar1 body top
bar3 - red bar, about same size as bar2 or smaller, might be inside bar
bar4 - green bar, big, body bottom is near bar3 bottom


you would be better off forgetting about ai and just learn thinkscript.
look at functions and examples online.
https://toslc.thinkorswim.com/center/reference/thinkScript/Functions/Tech-Analysis/Highest
i am a slow learner, but after a couple months and looking at 100s of code examples , it started making sense.


here is something similar
3 bar play
https://usethinkscript.com/threads/...-is-a-three-candle-pattern.15299/#post-124322
https://usethinkscript.com/threads/...scanner-for-thinkorswim.239/page-5#post-73393
 
Last edited:
Solution

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
416 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