Repaints The PAM High Low Chart Setup For ThinkOrSwim

Repaints
Status
Not open for further replies.
Because the pivot ribbon colors the background. I just want to specifically see the 13 and 48.5. I used to use it but didn't like how much it took up of space on the screen.
I plot the pivot ribbon on my chart today. I don't have much to say about it since today is my first time watching it in a live trade. I'm screen-recording the trade.
 
Hopefully this image of a 5 min chart shows how I back tested. A magenta signal candle forms when the rules posted by the OP for a short entry are met. Once the signal candle closes, it doesn't repaint. During the 5 minutes it is forming, it certainly can repaint, which is why I tested based on the closure of the signal candle. For testing purposes, a successful trade was defined as meeting a specific dollar amount profit target. A failed trade was stopped out for a specific dollar amount loss.

On this chart, you can see numerous magenta short signal candles. None were successful signals according to rules of the back test. Maybe they meet your definition for "fake-out signals?"

The good news is that trading in confluence with the 30 min chart would have prevented you from taking those short signals. On this chart, the 30 min levels (the low of the HH and high of the LL on the 30 min chart) are plotted in dotted lines. Only the first magenta signal candle on the 5 min chart had any follow through below the 30 min level. And that follow through was rather weak.

This chart shows why I find the 30 min levels so helpful. Sometimes the lower timeframe signals work out great. But as this chart shows, often they don't, which is why they need to be assessed through the lens of a filter (OP likes the squeeze) or higher time frame levels such as the 30 min shown here.

Short term options contracts might make some profit with slight downward price movement as seen on this chart, but for me as a futures trader, the money is in the price action related to the 30 min levels more than the signals per se. On this chart, there was no real follow through below the 30 min levels that would justify entering a short position based on the 5 min signals.

None of this is intended to be critical of the OP. The dynamic S/R created by the strategy playing out on a higher timeframe is extremely valuable!

How did you get to make the color of the short “magenta” candles stay on your chart?
 
How did you get to make the color of the short “magenta” candles stay on your chart?
Did a separate indicator just for coloring signal candles. After the candle closes, the color is set. There's probably a way to do that in ThinkScript but I can't code for TOS and have to do everything on a different platform. Sorry I can't be more helpful. FWIW, I didn't find that candle color study very useful except to check the backtesting to be certain it was entering trades when it was supposed to. The reason is that there were too many false signals on the lower timeframe. That being the case, I just look at the 30 min levels as one factor to consider in entering a trade.

I am NOT knocking the OP's strategy, just want to be clear that I am not trading it but do find the 30 min levels very useful information for the instruments and timeframes that I trade.

Best wishes and happy trading.
 
This is a modification of an earlier post here on usethinkscript modified to show only Buy/Sell Bubbles. I don't like a lot of clouds as it interferes with my ORB's. Here is the modified code which is to my liking and helpful to my trading (I use it on a 1 min and 5 min chart for entries/exits):

# High_Low_range_carter_00e

#https://usethinkscript.com/threads/looking-to-setup-a-high-low-range.13750/
#Looking to Setup A High-Low Range
#OGOptionSlayer 12/19
#Modified by C. Ricks 1/10/23 to show only Buy/Sell Bubbles



input show_stop = no;
input buffer = 10;
input show_min = yes;
input show_five_min = yes;
input show_15min = yes;
input show_30min = yes;
input show_hour = yes;

def bn = BarNumber();
def na = Double.NaN;

input buy_bubbles_on = yes;

input buy_type = { default completed_bar , active_bar };
def buyoff;
switch (buy_type) {
case completed_bar:
buyoff = 1;
case active_bar:
buyoff = 0;
}

input bars = 20;
def period = (!IsNaN(close) and IsNaN(close[-bars]));


# define group of x bars
def first = (!IsNaN(close[-(bars - 1)]) and IsNaN(close[-bars]));


# price level of the highest high
def hihi = if bn == 1 or IsNaN(close) then 0
# else if first then Highest(high[-(bars - 1)], (bars - 1))
else if first then Highest(high[-(bars - 1)], (bars - 0))
else hihi[1];

# find bn of just the first occurance of hihi
def hihifirstbn =
if hihi == 0 then 0
else if hihifirstbn[1] > 0 then hihifirstbn[1]
else if (hihi == high) then bn
else hihifirstbn[1];

# bars after the hihi
def hi_bars = (hihifirstbn > 0 and bn >= hihifirstbn);

# hihi price level from 1st highest bar
def hihi_level = if bn == 1 or IsNaN(close) then na
# else if hihifirstbn > 0 and bn >= hihifirstbn then hihi
else if hi_bars then hihi
else na;

# true on the hihi bar
def ishi = if bn == 1 then 0
else if hihifirstbn == bn then 1
else 0;

# find lowest low
# price level of the lowest low
def lolo = if bn == 1 or IsNaN(close) then 0
# else if first then lowest(low[-(bars - 1)], (bars - 1))
else if first then Lowest(low[-(bars - 1)], (bars - 0))
else lolo[1];

# find bn of the first occurance of lolo
def lolofirstbn =
if lolo == 0 then 0
else if lolofirstbn[1] > 0 then lolofirstbn[1]
else if (lolo == low) then bn
else lolofirstbn[1];

# bars on and after the lolo
def lo_bars = (lolofirstbn > 0 and bn >= lolofirstbn);

# lolo price level from 1st lowest bar
def lolo_level = if bn == 1 or IsNaN(close) then na
# else if lolofirstbn > 0 and bn >= lolofirstbn then lolo
else if lo_bars then lolo
else na;

# true on the lolo bar
def islo = if bn == 1 then 0
else if lolofirstbn == bn then 1
else 0;



input hilo_arrows = no;

# buy put
def put_buy_hilo = if bn == 1 or IsNaN(close) then 0 else if ishi then low else put_buy_hilo[1];

# bp = buyput
def bp1 = if period and (!first) then (close[buyoff] crosses below put_buy_hilo) else 0;
def bp2 =
if bn == 1 then 0
else if bp2[1] then bp2[1]
else if bp1 then 1
else bp2[1];
def bp3 = if !bp2[1] and bp2 then 1 else 0;

# buy call
def call_buy_lohi = if bn == 1 or IsNaN(close) then 0 else if islo then high else call_buy_lohi[1];


def bc1 = if period and !first then (close[buyoff] crosses above call_buy_lohi) else 0;
def bc2 =
if bn == 1 then 0
else if bc2[1] then bc2[1]
else if bc1 then 1
else bc2[1];
def bc3 = if !bc2[1] and bc2 then 1 else 0;

input gain_stop_percent = 20;

def offx = 2;
def ref_bubble_x = (!IsNaN(close[offx]) and IsNaN(close[(offx - 1)]));

# puts
def putreflevel = put_buy_hilo - (put_buy_hilo * (gain_stop_percent / 100));


# calls
def callreflevel = call_buy_lohi + (call_buy_lohi * (gain_stop_percent / 100));

def h = hihi;
def l = lolo;
def range = h - l;

input show_labels = yes;
input show1HOUR = yes;
input avg_type = AverageType.Exponential;
input fastlen = 10;
input slowlen = 50;
input htf_lookback = 2;
input src = close;

def currentTimeFrame = GetAggregationPeriod();

## One Hour
def aH1 = if currentTimeFrame <= AggregationPeriod.HOUR then AggregationPeriod.HOUR else currentTimeFrame;
def availableH1 = currentTimeFrame <= AggregationPeriod.HOUR;
def fast1hr = MovingAverage(avg_type, close(period = aH1), fastlen);
def slow1hr = MovingAverage(avg_type, close(period = aH1), slowlen);

def crossup = fast1hr crosses above slow1hr;
def crossdn = fast1hr crosses below slow1hr;

## Signals
input show_arrows = yes;

AddChartBubble(buy_bubbles_on and bc3 and Sum(bp3, buffer) == 0, low * 0.9995, "Buy Call", if Sum(crossup, htf_lookback) > 0 then Color.GREEN else Color.GREEN, no);
AddChartBubble(buy_bubbles_on and bp3 and Sum(bc3, buffer) == 0, high * 1.0005, "Buy Put", if Sum(crossdn, htf_lookback) > 0 then Color.RED else Color.RED, yes);
how do i convert the below commands into Signals and use for Scanning
AddChartBubble(buy_bubbles_on and bc3 and Sum(bp3, buffer) == 0, low * 0.9995, "Buy Call", if Sum(crossup, htf_lookback) > 0 then Color.GREEN else Color.GREEN, no);
AddChartBubble(buy_bubbles_on and bp3 and Sum(bc3, buffer) == 0, high * 1.0005, "Buy Put", if Sum(crossdn, htf_lookback) > 0 then Color.RED else Color.RED, yes);

Thanks in advance
 
Could addorder be added in order to coincide with Buy Put or Call Label in order to generate a backtesting report ?

AddOrder(OrderType.BUY_TO_OPEN, PutYourBuyTriggerHere) ;
AddOrder(OrderType.SELL_TO_CLOSE, PutYourSellTriggerHere) ;

Thank You in advance
 
Could addorder be added in order to coincide with Buy Put or Call Label in order to generate a backtesting report ?

AddOrder(OrderType.BUY_TO_OPEN, PutYourBuyTriggerHere) ;
AddOrder(OrderType.SELL_TO_CLOSE, PutYourSellTriggerHere) ;

Thank You in advance

mod note:
Please do not post backtesting scripts of repainting indicators to the forum. Backtesting results of repainting indicators do not reflect real-life results only the repainted after-the-fact results. Future viewers who do not read through all 12 pages of the thread will not realize that backtesting cannot be done on this study.
 
Last edited:
mod note:
Please do not post backtesting scripts of repainting indicators to the forum. Backtesting results of repainting indicators do not reflect real-life results. Future viewers who do not read through all 12 pages of the thread will not realize that backtesting cannot be done on this study.
Backtesting can't be done on this study becaue it repaints? So any system that repaints cannot be backtested? Kudos I didn't realize that was

not possible.
 
@OGOptionSlayer - Got Buy Put signal at 10am on SPY - 60min(10 buff/10bar)//30min(10 buff/20bar)/15min((10 buff/20bar) signal and it turned North around 11am. Something needs adjustment, am I missing something?

I would say that you missed the area of confluence. You had your ema cross prior to the signal because the bar was so long. You entered a bear market at that time and probably should have gotten in the trade. You don't always get the ema cross prior to the signal firing but you have to consider other areas of confluence when deciding to take the trade. An ema cross as significant as the one that occurred on your chart, then a retest of the ema with subsequent rejection should have been your entry signal and the way I would have traded it.

The strategy is about using confluence. Also, you may be staying in trades too long but everyone's risk management strategy is different.

That cross with what may be your 48 ema rejection first then later the 13 ema rejection second would have been my entry on this trade. I wouldn't have waited for the indicator to give you the signal on this one, however, I would have used the indicator to get out of the trade instead.

That's my two cents and everyone's strategy is different so don't take it as a criticism of yours but this trade is one where I would have been in earlier just due to the high areas of confluence occurring before that signal was generated.

Also, when you have these huge large candle extensions, it's best to avoid the trade if it's the only area of confluence you have. While bears took the market for a brief bit, they had to use a lot of their energy to steal it from the bulls which led to an easy takeback from the bulls, which you reference with the reversal.

Last thing, I trade two different sessions per day and I break during 12 to 1 pm EST. Crazy things can happen during these times. This morning was a strong bear market and the afternoon was an even stronger bull market. Try to take that mentality and understand the market can shift after everyone comes back from lunch so I treat them as two different sessions.
 
I would say that you missed the area of confluence. You had your ema cross prior to the signal because the bar was so long. You entered a bear market at that time and probably should have gotten in the trade. You don't always get the ema cross prior to the signal firing but you have to consider other areas of confluence when deciding to take the trade. An ema cross as significant as the one that occurred on your chart, then a retest of the ema with subsequent rejection should have been your entry signal and the way I would have traded it.

The strategy is about using confluence. Also, you may be staying in trades too long but everyone's risk management strategy is different.

That cross with what may be your 48 ema rejection first then later the 13 ema rejection second would have been my entry on this trade. I wouldn't have waited for the indicator to give you the signal on this one, however, I would have used the indicator to get out of the trade instead.

That's my two cents and everyone's strategy is different so don't take it as a criticism of yours but this trade is one where I would have been in earlier just due to the high areas of confluence occurring before that signal was generated.

Also, when you have these huge large candle extensions, it's best to avoid the trade if it's the only area of confluence you have. While bears took the market for a brief bit, they had to use a lot of their energy to steal it from the bulls which led to an easy takeback from the bulls, which you reference with the reversal.

Last thing, I trade two different sessions per day and I break during 12 to 1 pm EST. Crazy things can happen during these times. This morning was a strong bear market and the afternoon was an even stronger bull market. Try to take that mentality and understand the market can shift after everyone comes back from lunch so I treat them as two different sessions.
So you can't add backtest p & l file to buy puts and call alerts ?
 
@QUIKTDR1, if it repaints, for which signals would you want to see P & L?

What I did was test the first signal 10 years ago to see if the trade went to profit target or got stopped out. Any additional signals that occurred during the trade were ignored. Then I tested the next signal that occurred after completion of the first trade and ignored any additional signals that occurred while the 2nd trade was in progress. I did that for a 10 year period.

I don't know any other way to back test this strategy. FWIW, I also tested the 30 min level to take trades after a signal occurred AND price crossed the 30 min level. Those results were better but still not something I would trade without additional filters, at least for the narrow range of instruments that I trade.

Best wishes and happy trading.
 
@QUIKTDR1, if it repaints, for which signals would you want to see P & L?

What I did was test the first signal 10 years ago to see if the trade went to profit target or got stopped out. Any additional signals that occurred during the trade were ignored. Then I tested the next signal that occurred after completion of the first trade and ignored any additional signals that occurred while the 2nd trade was in progress. I did that for a 10 year period.

I don't know any other way to back test this strategy. FWIW, I also tested the 30 min level to take trades after a signal occurred AND price crossed the 30 min level. Those results were better but still not something I would trade without additional filters, at least for the narrow range of instruments that I trade.

Best wishes and happy trading.
I understand Trader Raider I was just curious to see if we could get a back testing P &L when Buy Puts or Call alerts signal. No problem just a thought Thanks for response
 
Is your watchlist column set on the timerfame you are looking for? Check this by right-clicking the Hi-Lo column on your watchlist and up in the left corner will be your timeframe. Let me know if this helps or if it's an actual bug. I use the watchlist column and it works for me but I have seen inconsistencies in it.
yes both of them the same timeframe .
 
@QUIKTDR1, if it repaints, for which signals would you want to see P & L?

What I did was test the first signal 10 years ago to see if the trade went to profit target or got stopped out. Any additional signals that occurred during the trade were ignored. Then I tested the next signal that occurred after completion of the first trade and ignored any additional signals that occurred while the 2nd trade was in progress. I did that for a 10 year period.

I don't know any other way to back test this strategy. FWIW, I also tested the 30 min level to take trades after a signal occurred AND price crossed the 30 min level. Those results were better but still not something I would trade without additional filters, at least for the narrow range of instruments that I trade.

Best wishes and happy trading.

What instruments do you trade @Trader Raider? I trade $SPY, most tech stocks, and $SPX. On the 15m and 30m, I rarely get fakeouts and think it could work even without the other areas of confluence. I'm just curious about what instruments you trade on and don't see the results I do, however, I use a lot of confluence as mentioned in my strategy to ensure my entries are on point but still think the indicator works even without the confluence way more often than not.

I've even started to use longer timeframes and have been swinging trades quite successfully using the indicator. For example, I swung $SPX calls yesterday and they literally went to the moon never even getting close to hitting my stop loss.
 
I understand Trader Raider I was just curious to see if we could get a back testing P &L when Buy Puts or Call alerts signal. No problem just a thought Thanks for response
I wonder if @Chemmy could design a version that paints a new signal but leaves the old signals in place. That would allow the ability to backtest.
 
Try this scan and let me know what you think:

http://tos.mx/mxYaxzc
Nice. I will have to play with it. Is there a way I can follow you and how you post your daily "trade" recaps? Is there a way to get labels on the scan to tell the counts and color for buy/sell? Also, @Trader Raider what you said about the 30m chart is golden. I'm finally getting it now and I hope I can learn more from you guys.

K8GBAVB.jpg
 
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
452 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