Repaints The PAM High Low Chart Setup For ThinkOrSwim

Repaints
Status
Not open for further replies.
LOL 😁

What I did was convert it to a strategy in order to back test to find the optimal "last N" length for signal candles. Then I painted candles based on squeeze histo colors (typically a 9-length squeeze on most timeframes). Those candle colors really help frame the price action nicely.

Anyhow, thanks again for sharing your strat with us. It's given me additional opportunities at times of day I didn't typically trade. Sorry I cannot share any code but I'm thinkScript-illiterate so have to resort to another language and platform for optimization and tinkering.

Anyhow, thanks again. Best wishes and happy trading!
@OGOptionSlayer can you help script a code to color the last number of the candle? If the candle bars are set at 20, then the 20th candle should be colored to tell the last candle is formed. Also is it possible to have two colors to determine if the last candle is bullish or bearish?
 
Last edited:
@OGOptionSlayer can you help script a code to color the last number of the candle? If the candle bara set is 20, then the 20th candle should be colored to tell the last candle is formed. Also is it possible to have two colors to determine if the last candle is bullish or bearish?
Hi, I can probably code this but I'm not 100% sure what you mean -- would you mind sending a screenshot and describing what you want?


Also, as an aside -- I'm working on a MTF version of this that would allow you to see whether your current trade is in confluence with signals from higher time frames, will be reading up more on @OGOptionSlayer original strat to make sure I understand what is needed for that. I trade on only one screen so it's hard for me sometimes to always check confluence with higher time frames, so I like adding labels
 
Hi, I can probably code this but I'm not 100% sure what you mean -- would you mind sending a screenshot and describing what you want?


Also, as an aside -- I'm working on a MTF version of this that would allow you to see whether your current trade is in confluence with signals from higher time frames, will be reading up more on @OGOptionSlayer original strat to make sure I understand what is needed for that. I trade on only one screen so it's hard for me sometimes to always check confluence with higher time frames, so I like adding labels
Thank you for the reply. The indicator looks for 20 candle bars and signals on the last candle. So I was wondering if the candle which the indicator count as number 20 can be colored to tell the trader that the last candle is formed. Like the red candle circled in yellow.
CVsCvZ7.jpg
[/IMG]
 
Last edited by a moderator:
Hi, I can probably code this but I'm not 100% sure what you mean -- would you mind sending a screenshot and describing what you want?


Also, as an aside -- I'm working on a MTF version of this that would allow you to see whether your current trade is in confluence with signals from higher time frames, will be reading up more on @OGOptionSlayer original strat to make sure I understand what is needed for that. I trade on only one screen so it's hard for me sometimes to always check confluence with higher time frames, so I like addiMTF would be great.

Hi, I can probably code this but I'm not 100% sure what you mean -- would you mind sending a screenshot and describing what you want?


Also, as an aside -- I'm working on a MTF version of this that would allow you to see whether your current trade is in confluence with signals from higher time frames, will be reading up more on @OGOptionSlayer original strat to make sure I understand what is needed for that. I trade on only one screen so it's hard for me sometimes to always check confluence with higher time frames, so I like adding labels
MTF would be great. Q. Would it have 65m? I know it's just 5 minutes added to the 1h chart.
 
MTF would be great. Q. Would it have 65m? I know it's just 5 minutes added to the 1h chart.
Unfortunately no, as far as I'm aware you can't do custom aggregation periods in TOS -- only the preset options like 30min, HOUR, FOUR_HOUR, etc. so I'd probably have to stick with those, unless someone else is aware of a way to code additional periods.


As for your other request, again, sorry I just want to be clear -- first, there is an option you can toggle in the settings for Buy Type, either "completed bar" (the default) or "active bar", which will signal on the 1st/20th candle like you mentioned:

5UHBDoM.png


Does that work for what you wanted? Or did you still want the signal on the completed bar, and another candle color, like below?

4QoNWdM.png

You can see the signal is still the same, but are you saying you also want the green candle colored prior to the signal, where the break happens? Or you want the initial red candle that forms the zone colored? Sorry for all the questions, just want to be sure I'm coding the right thing.
 
Unfortunately no, as far as I'm aware you can't do custom aggregation periods in TOS -- only the preset options like 30min, HOUR, FOUR_HOUR, etc. so I'd probably have to stick with those, unless someone else is aware of a way to code additional periods.


As for your other request, again, sorry I just want to be clear -- first, there is an option you can toggle in the settings for Buy Type, either "completed bar" (the default) or "active bar", which will signal on the 1st/20th candle like you mentioned:

5UHBDoM.png


Does that work for what you wanted? Or did you still want the signal on the completed bar, and another candle color, like below?

4QoNWdM.png

You can see the signal is still the same, but are you saying you also want the green candle colored prior to the signal, where the break happens? Or you want the initial red candle that forms the zone colored? Sorry for all the questions, just want to be sure I'm coding the r
Unfortunately no, as far as I'm aware you can't do custom aggregation periods in TOS -- only the preset options like 30min, HOUR, FOUR_HOUR, etc. so I'd probably have to stick with those, unless someone else is aware of a way to code additional periods.


As for your other request, again, sorry I just want to be clear -- first, there is an option you can toggle in the settings for Buy Type, either "completed bar" (the default) or "active bar", which will signal on the 1st/20th candle like you mentioned:

5UHBDoM.png


Does that work for what you wanted? Or did you still want the signal on the completed bar, and another candle color, like below?

4QoNWdM.png

You can see the signal is still the same, but are you saying you also want the green candle colored prior to the signal, where the break happens? Or you want the initial red candle that forms the zone colored? Sorry for all the questions, just want to be sure I'm coding the right thing.
The green/red candle colored before the signal where the break happens.
 
Unfortunately no, as far as I'm aware you can't do custom aggregation periods in TOS -- only the preset options like 30min, HOUR, FOUR_HOUR, etc. so I'd probably have to stick with those, unless someone else is aware of a way to code additional periods.


As for your other request, again, sorry I just want to be clear -- first, there is an option you can toggle in the settings for Buy Type, either "completed bar" (the default) or "active bar", which will signal on the 1st/20th candle like you mentioned:

5UHBDoM.png


Does that work for what you wanted? Or did you still want the signal on the completed bar, and another candle color, like below?

4QoNWdM.png

You can see the signal is still the same, but are you saying you also want the green candle colored prior to the signal, where the break happens? Or you want the initial red candle that forms the zone colored? Sorry for all the questions, just want to be sure I'm coding the right thing.
Can the indicator be made not to repaint?
 
Can the indicator be made not to repaint?
If you are asking about the MTF component. The answer is No. You can't stop the repainting because you asked for the repainting.

Think about it. You have a 30-min overlay on a five-min chart. There is no way of predicting at what price that 30min candle is going to close.
When the 30min candle finally closes, only then can it repaint the previous 6 bars with the 30min close price that you requested.

Read more:
https://usethinkscript.com/threads/...d.-,Multi-Timeframe,-REPAINTING-type Behavior
 
@OGOptionSlayer was wondering if i can pick your brains on something like this , so you can see in the first 15 minutes that was a very strong sell but the stock recovered (this is set using the 40 candle at 15 minutes)
DMwoMVg.png

How do you handle sudden changes in direction like this, this has been a real problem for me. If you saw this chart, would you just consider this as a no trade since the targets have been hit for the day and the price is just going to chop around ? Also when the price has entered the green zone or the red zone (depending on the sell down or buy up), do you just wait for it to break out of the zone ?


Like life would be lovely if we get something as nice as this all the time but it doesnt happen
ITeDuJQ.png
 
Last edited by a moderator:
@OGOptionSlayer was wondering if i can pick your brains on something like this , so you can see in the first 15 minutes that was a very strong sell but the stock recovered (this is set using the 40 candle at 15 minutes)

DMwoMVg.png

How do you handle sudden changes in direction like this, this has been a real problem for me. If you saw this chart, would you just consider this as a no trade since the targets have been hit for the day and the price is just going to chop around ? Also when the price has entered the green zone or the red zone (depending on the sell down or buy up), do you just wait for it to break out of the zone ?


Like life would be lovely if we get something as nice as this all the time but it doesnt happen


ITeDuJQ.png


Hi @alexsmith3546 , this question is actually exactly what the buffer option is meant to be -- what did you set the buffer to in the first screenshot? That value is meant to suppress any signals within __ candles (whatever the buffer value is) so that you don't get confused by quick changes in direction, so if it was set to 10 there then you shouldn't have gotten the "Buy Call" signal.

For me, I don't like trading whipsaw price action so I don't want to see signals firing in two different directions in rapid succession, I'd rather take the first signal and then wait.
 
@Chemmy So the first screenshot had the number of candles as 40 and buffer 10. Is that too much? I generally trade on a 15 minute chart (and this is an end of day screenshot which might explain why the ranges are so skewed and I was just exploring this indicator after the trading day so my assumptions might be totally off and I need to watch this live - if so, sorry, i'll hold off on questions till monday)

This is what i see when i set the number of candles as 20 and buffer 10
ykdmRQK.png

So When you have overlapping zones (red and green,
 
Last edited by a moderator:
So, I was unable to do the full update on this that i wanted with all the most recent requests, I've had a lot going on outside of trading lately -- here's the most recent update with higher timeframe compatibility though. Unfortunately TOS doesn't allow for custom aggregations so I couldn't do the exact 65min timeframe that @OGOptionSlayer uses, but this uses the 1Hr aggregation as the closest approximation.

Basically it's just a very light update using the 10 and 50 SMAs that were mentioned in his strategy, looking for a cross of the SMAs on the higher time frame within 2 of those HTF bars. Updates are shown below:

First, looking at SPX on the 15min time frame with 30 bars, you can see that the hourly-aggregated 10-50 averages hadn't crossed to the upside yet. As such, even though the signal fires the arrow and label are now colored dark green, indicating that the trend is not yet confirmed in your favor.
nqXLU75.png


In this second picture, using only 20 bars of lookback, you can see that the SMAs had crossed just prior to the signal firing -- so when the signal does fire, it's colored a brighter green -- the same will be true with your puts signals, with dark red (no cross) vs. red (recent hourly cross). You can also see the label at the top, which indicates how many hourly bars it's been since the SMAs crossed and in which direction by the color.
v58uqOQ.png



It's a relatively simple update but it should help anyone who, like me, is only trading with one monitor and can't have tons of timeframes up at once. I didn't actually plot out the SMAs either, those on the chart are just for show -- also keep in mind that with all HTF studies, the cross will not be fully confirmed until the hourly candle actually closes.

http://tos.mx/ZMo0dIv
 
Last edited by a moderator:
Sorry everyone. I was out for personal stuff. I'm back but give me time to review the messages and I will answer each and every one of you. I wasn't getting notifications during this timeframe to tell me there were posts coming in on this or would have been back sooner. Just had a lot on my plate this past week that needed to get done.
A video explaining this indicator is coming very very soon and I think it will clear up any questions that most of you have.
I have never created a video so it will be my first one. I hope that it does you justice. Expect it by the end of next week because I'm OCD and I will probably shoot and reshoot it until it meets my standards, which are horribly high.
 
So, I was unable to do the full update on this that i wanted with all the most recent requests, I've had a lot going on outside of trading lately -- here's the most recent update with higher timeframe compatibility though. Unfortunately TOS doesn't allow for custom aggregations so I couldn't do the exact 65min timeframe that @OGOptionSlayer uses, but this uses the 1Hr aggregation as the closest approximation.

Basically it's just a very light update using the 10 and 50 SMAs that were mentioned in his strategy, looking for a cross of the SMAs on the higher time frame within 2 of those HTF bars. Updates are shown below:

First, looking at SPX on the 15min time frame with 30 bars, you can see that the hourly-aggregated 10-50 averages hadn't crossed to the upside yet. As such, even though the signal fires the arrow and label are now colored dark green, indicating that the trend is not yet confirmed in your favor.
nqXLU75.png


In this second picture, using only 20 bars of lookback, you can see that the SMAs had crossed just prior to the signal firing -- so when the signal does fire, it's colored a brighter green -- the same will be true with your puts signals, with dark red (no cross) vs. red (recent hourly cross). You can also see the label at the top, which indicates how many hourly bars it's been since the SMAs crossed and in which direction by the color.
v58uqOQ.png



It's a relatively simple update but it should help anyone who, like me, is only trading with one monitor and can't have tons of timeframes up at once. I didn't actually plot out the SMAs either, those on the chart are just for show -- also keep in mind that with all HTF studies, the cross will not be fully confirmed until the hourly candle actually closes.

http://tos.mx/ZMo0dIv
You are amazing bro.
 
@Chemmy So the first screenshot had the number of candles as 40 and buffer 10. Is that too much? I generally trade on a 15 minute chart (and this is an end of day screenshot which might explain why the ranges are so skewed and I was just exploring this indicator after the trading day so my assumptions might be totally off and I need to watch this live - if so, sorry, i'll hold off on questions till monday)


This is what i see when i set the number of candles as 20 and buffer 10

ykdmRQK.png


So When you have overlapping zones (red and green,
You should definitely use 20 bars on 15m. It gets the best results in my experience. If you are using 40, you are spreading yourself across multiple sessions/extended hours and should be considering a swing trade but then I would just go up to a HTF instead of setting this indicator to 40. In fact, on HTF's, I set the bar count to 10 once I get into the 1hr. If it's weekly, I usually go to 5 just because this is all about price action and the latest price action. It really doesn't care too much about historical price action. I'm still perfecting it for Swings though.
 
Status
Not open for further replies.

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

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
423 Online
Create Post

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