High-Low Range Chart Setup For ThinkOrSwim

OGOptionSlayer

Active member
VIP
So I use a very specific setup. It's kind of a mashup between what John Carter teaches with one of his in Mastering the Trade and TradingWarz Golden Indicator. I've used it for about 2 years now and it's extremely profitable. Honestly, I haven't backtested it but I would love to but I'm just not as technical as most in here. I know it brings me immense profit and on Friday, my port grew 11% using it. It's not a small port either. It's a reversal setup and it's solid with tight stop losses. I use it with a Darvas Box but TOS has a great Darvas Box study.

I'm looking to see if someone can create an indicator for it. To keep this post as short as possible, here is the setup:

1) Only using the last 20 candles on any timeframe.
2) Find the high and low of last 20 candles. As a new candle is created, it disregards anything not in the 20 candles.
3) On the high candle, place a "Priceline" that is the low of that candle (wicks included).
4) Once a candle closes a LL below that "Priceline", place a bubble called "Buy Puts" on that candle. It has to close below the low of the highest candle. It would be great if the candle could be painted a custom color. I use black in keeping with John Carter's concept.
5) A stop loss "Priceline" is drawn on the "High" of the highest candle. This is a great stop loss and keeps risk at a low with confirmation that the trend is not reversing but also keeps you from getting shaken out by MM's.
6) On the low candle, place a "Priceline" that is the high of that candle (wicks included).
7) Once a candle closes a HH above that "Priceline", place a bubble called "Buy Calls" on that candle. It has to close above the high of the lowest candle. It would be great to have this candle also painted a customer color. Again, default should be black.
8) A stop loss "Priceline" is drawn on the "Low" of the lowest candle. Again, another great stop loss to keep your risk at a minimum but also confirms that the trend reversal is not manifesting.

I use this with a Darvas box because I will take my option contracts where the Darvas Box low or high is respectfully. This setup works like a champ when I use it manually but I'm trying to share it with people that I trade with so they don't have to depend on me for their signals. I don't charge for signals nor do I have a discord. I just have a group of traders that I've traded with a long time that see how my port grows and theirs doesn't. I've tried to share this concept with them but many still don't get it and this would be great to share and I would love for you guys to use it too. It's a solid setup and it works very well.

Any help would be greatly appreciated!

Also, I would like the indicator to have a trailing stop loss. I forgot to include this important point.

Once it has moved 50% from current entry, I would like it to put a stop loss at the HH of the last two candles for puts and the LL of the last two candles for calls. This locks in profits to ensure you don't get greedy and lose your gains when the market starts to shift. I do take profits on important pivots like PMH and PML and this morning, it made me $3 on each share.
It's easy to trade 0dte's with this setup as well.
 

halcyonguy

Well-known member
VIP
Lifetime
here are steps 1 - 8
this version just draws lines, arrows, and bubbles. it will draw more than 1 bubble, if future bars cross a line.

use it to verify the rules.
it's not a strategy, nothing happens if a line is crossed.


Code:
# High_Low_range_carter_00a

#https://usethinkscript.com/threads/looking-to-setup-a-high-low-range.13750/
#Looking to Setup A High-Low Range

#=======================================

def bn = barnumber();
def na = double.nan;


#1) Only using the last 20 candles on any timeframe.
input bars = 20;
def x = (!isnan(close) and isnan(close[-bars]));
#addverticalline(x,"-");


#2) Find the high and low of last 20 candles. As a new candle is created, it disregards anything not in the 20 candles.

def first = (!isnan(close[-(bars-1)]) and isnan(close[-bars]));
addverticalline(first,"-", Color.white);


def hi = if bn == 1 then 0
  else if first then highest(high[-(bars-1)], (bars-1))
  else hi[1];
def hi2 = (hi == high);


def lo = if bn == 1 then 0
  else if first then lowest(low[-(bars-1)], (bars-1))
  else lo[1];
def lo2 = (lo == low);

input test1 = no;
addchartbubble(test1, 38,
hi + "\n" +
hi2 + "\n" +
lo + "\n" +
lo2
, color.yellow, yes);


input hilo_arrows = yes;
plot z1 = if hilo_arrows and hi2 then high else na;
z1.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
z1.SetDefaultColor(Color.cyan);
z1.setlineweight(3);
z1.hidebubble();

plot z2 = if hilo_arrows and lo2 then low else na;
z2.SetPaintingStrategy(PaintingStrategy.ARROW_up);
z2.SetDefaultColor(Color.cyan);
z2.setlineweight(3);
z2.hidebubble();


#3) On the high candle, place a "Priceline" that is the low of that candle (wicks included).

# buy put
def hilo = if bn == 1 then na else if hi2 then low else hilo[1];
plot z3 = hilo;
z3.SetDefaultColor(Color.red);


#4) Once a candle closes a LL below that "Priceline", place a bubble called "Buy Puts" on that candle. It has to close below the low of the highest candle. It would be great if the candle could be painted a custom color. I use black in keeping with John Carter's concept.

def buyput = if close[1] crosses below hilo then 1 else 0;
addchartbubble(buyput, high*1.001, "Buy Put", color.red, yes);


#5) A stop loss "Priceline" is drawn on the "High" of the highest candle. This is a great stop loss and keeps risk at a low with confirmation that the trend is not reversing but also keeps you from getting shaken out by MM's.

# put stop , short stop
def hihi = if bn == 1 then na else if hi2 then high else hihi[1];
plot z4 = hihi;
z4.SetDefaultColor(Color.red);
z4.SetStyle(Curve.MEDIUM_DASH);


#6) On the low candle, place a "Priceline" that is the high of that candle (wicks included).

# buy call
def lohi = if bn == 1 then na else if lo2 then high else lohi[1];
plot z5 = lohi;
z5.SetDefaultColor(Color.green);



#7) Once a candle closes a HH above that "Priceline", place a bubble called "Buy Calls" on that candle. It has to close above the high of the lowest candle. It would be great to have this candle also painted a customer color. Again, default should be black.

def buycall = if close[1] crosses above lohi then 1 else 0;
addchartbubble(buycall, low*0.999, "Buy Call", color.green, no);


#8) A stop loss "Priceline" is drawn on the "Low" of the lowest candle. Again, another great stop loss to keep your risk at a minimum but also confirms that the trend reversal is not manifesting.

#  call stop , long stop
def lolo = if bn == 1 then na else if lo2 then low else lolo[1];
plot z6 = lolo;
z6.SetDefaultColor(Color.green);
z6.SetStyle(Curve.MEDIUM_DASH);



#9) Also, I would like the indicator to have a trailing stop loss. I forgot to include this important point.


#10) Once it has moved 50% from current entry, I would like it to put a stop loss at the HH of the last two candles for puts and the LL of the last two candles for calls. This locks in profits to ensure you don't get greedy and lose your gains when the market starts to shift.
# I do take profits on important pivots like PMH and PML

#

solid lines are buys
dashed lines are stops
Fy2WVic.jpg
 
Last edited by a moderator:

halcyonguy

Well-known member
VIP
Lifetime
So I use a very specific setup. It's kind of a mashup between what John Carter teaches with one of his in Mastering the Trade and TradingWarz Golden Indicator. I've used it for about 2 years now and it's extremely profitable. Honestly, I haven't backtested it but I would love to but I'm just not as technical as most in here. I know it brings me immense profit and on Friday, my port grew 11% using it. It's not a small port either. It's a reversal setup and it's solid with tight stop losses. I use it with a Darvas Box but TOS has a great Darvas Box study.

I'm looking to see if someone can create an indicator for it. To keep this post as short as possible, here is the setup:

1) Only using the last 20 candles on any timeframe.
2) Find the high and low of last 20 candles. As a new candle is created, it disregards anything not in the 20 candles.
3) On the high candle, place a "Priceline" that is the low of that candle (wicks included).
4) Once a candle closes a LL below that "Priceline", place a bubble called "Buy Puts" on that candle. It has to close below the low of the highest candle. It would be great if the candle could be painted a custom color. I use black in keeping with John Carter's concept.
5) A stop loss "Priceline" is drawn on the "High" of the highest candle. This is a great stop loss and keeps risk at a low with confirmation that the trend is not reversing but also keeps you from getting shaken out by MM's.
6) On the low candle, place a "Priceline" that is the high of that candle (wicks included).
7) Once a candle closes a HH above that "Priceline", place a bubble called "Buy Calls" on that candle. It has to close above the high of the lowest candle. It would be great to have this candle also painted a customer color. Again, default should be black.
8) A stop loss "Priceline" is drawn on the "Low" of the lowest candle. Again, another great stop loss to keep your risk at a minimum but also confirms that the trend reversal is not manifesting.

I use this with a Darvas box because I will take my option contracts where the Darvas Box low or high is respectfully. This setup works like a champ when I use it manually but I'm trying to share it with people that I trade with so they don't have to depend on me for their signals. I don't charge for signals nor do I have a discord. I just have a group of traders that I've traded with a long time that see how my port grows and theirs doesn't. I've tried to share this concept with them but many still don't get it and this would be great to share and I would love for you guys to use it too. It's a solid setup and it works very well.

Any help would be greatly appreciated!

Also, I would like the indicator to have a trailing stop loss. I forgot to include this important point.

Once it has moved 50% from current entry, I would like it to put a stop loss at the HH of the last two candles for puts and the LL of the last two candles for calls. This locks in profits to ensure you don't get greedy and lose your gains when the market starts to shift. I do take profits on important pivots like PMH and PML and this morning, it made me $3 on each share.
It's easy to trade 0dte's with this setup as well.

9) Also, I would like the indicator to have a trailing stop loss. I forgot to include this important point.

do you have a formula in mind for the trailing stop?



10) Once it has moved 50% from current entry, I would like it to put a stop loss at the HH of the last two candles for puts

50% of what ? the buy price ?? if you buy at $100 , are you are waiting till $150 is reached before setting a stop ??
 
Last edited:
9) Also, I would like the indicator to have a trailing stop loss. I forgot to include this important point.

do you have a formula in mind for the trailing stop?



10) Once it has moved 50% from current entry, I would like it to put a stop loss at the HH of the last two candles for puts

50% of what ? the buy price ?? if you buy at $100 , are you are waiting till $150 is reached before setting a stop ??
Hi bro, I believe he is using option. I think it might not be feasible using trailing stop for point nine (9).

For point ten (10), he is using option, therefore, 50% of the option premium price. I suppose not the stock price.

Thank you so much for the scripts. Very much appreciated! Cheers
 

OGOptionSlayer

Active member
VIP
9) Also, I would like the indicator to have a trailing stop loss. I forgot to include this important point.

do you have a formula in mind for the trailing stop?



10) Once it has moved 50% from current entry, I would like it to put a stop loss at the HH of the last two candles for puts

50% of what ? the buy price ?? if you buy at $100 , are you are waiting till $150 is reached before setting a stop ??
Honestly, I use this for options contracts more than anything. @halcyonguy is spot on with the stop loss. This is incredible. I am about to plug it in and test. Then will backtest later tonight to see the % win.
 

OGOptionSlayer

Active member
VIP
So far, working like a champ. Trailing stop loss will be key with the two candles so people can do risk management after 50% gain.

It would be nice if once you are told to buy puts, that when a candle after makes a HH than the previous candle, you get a bubble that says Sell Puts and do the inverse on calls.
But like the entry signal, it has to close above it not just cross it. This prevents shake outs.
 

halcyonguy

Well-known member
VIP
Lifetime
It would be nice if once you are told to buy puts, that when a candle after makes a HH than the previous candle, you get a bubble that says Sell Puts and do the inverse on calls.
But like the entry signal, it has to close above it not just cross it. This prevents shake outs.
will look at it some more tonight




edit 12/23
been preoccupied with a week of -30F wind chills and snow... will get back to this




edit 12/26
fixed couple issues.
removed duplicate bubbles and arrows
working on the 50% levels , #10
will post something in a day or 2


...
 
Last edited:

OGOptionSlayer

Active member
VIP
Prime example is at 11:03 on $SPY this morning. Went above for a fakeout but didn't close and dropped another 1.5 pts.

So far it works like a champ and signaled a $1.32 drop on SPY in less than 50 minutes.
 

OGOptionSlayer

Active member
VIP
First complete test went from 381.26 to 378.85, a $2.41 move. I don't think there is a way to make this dummy proof so you do have to use discretion when it makes over a 200% gain obviously and not wait for it to break a HH unless that's what you want to do. I typically use it in lockstep with Squeeze Pro and wait for two candles to signal a reversal before I get out.

TTM Squeeze is just as effective to use for an exit signal.

I'm also noticing that maybe we need to extend the candle count to maybe 40 instead of 20 on anything lower than 1 hr. You can get some false signals and if you don't know the setup, then it will cause you to make poor choices. If there is any way to extend this to 40 candles on lower timeframes, that would be optimal. So far, it's working as it should and as requested.

End of day note: This thing is a gold mine if used properly. The Buy Puts signal is a great exit for Buy Calls and vice versa. This is a reversal king indicator so far.

Thank you for doing this.
 
Last edited:
First complete test went from 381.26 to 378.85, a $2.41 move. I don't think there is a way to make this dummy proof so you do have to use discretion when it makes over a 200% gain obviously and not wait for it to break a HH unless that's what you want to do. I typically use it in lockstep with Squeeze Pro and wait for two candles to signal a reversal before I get out.

TTM Squeeze is just as effective to use for an exit signal.

I'm also noticing that maybe we need to extend the candle count to maybe 40 instead of 20 on anything lower than 1 hr. You can get some false signals and if you don't know the setup, then it will cause you to make poor choices. If there is any way to extend this to 40 candles on lower timeframes, that would be optimal. So far, it's working as it should and as requested.

End of day note: This thing is a gold mine if used properly. The Buy Puts signal is a great exit for Buy Calls and vice versa. This is a reversal king indicator so far.

Thank you for doing this.
Hi bro, I suppose if you refer to the input bar which is 20 and you can change to 40. And it will look back 40 candles.

Btw, I have a question? Are you using this strategy based on "after market hour" turn off, right?

Thanks again for sharing this strategy! Cheers
 

OGOptionSlayer

Active member
VIP
Hi bro, I suppose if you refer to the input bar which is 20 and you can change to 40. And it will look back 40 candles.

Btw, I have a question? Are you using this strategy based on "after market hour" turn off, right?

Thanks again for sharing this strategy! Cheers
It works with anything. After-market, futures, Forex, etc. The reason being it's based solely on price action. Most trading signals are lagging indicators and John Carter refers to the most important being price action in his book Mastering the Trade. I wanted to have a setup that only took price action into account for my entries and exits but also could be used well with the indicators I loved like Squeeze Pro. This indicator can get you in a squeeze that is going to fire well before the squeeze fires.

It also keeps you from overtrading because you are looking for specific price action and confirmation with the closing of the candle. Even if it reverses, your stop loss is usually minimal compared to just trying to get lucky and hoping it reverses. You always know there is another play to be made, 24 hours a day, 7 days a week in any market.

I used this thing yesterday with overwhelming results but it's my setup and I worry if the lower timeframes aren't extended, someone using it will overtrade because the lower timeframes will give you many signals.

Increasing lower timeframes to 40 and having the longer ones stay at 20, which will always lead to almost 2 full days including extended hours, would have people picking their entries wisely, thus preventing them from overtrading and being patient for the right spots.

Trading is about discipline and this indicator with those adjustments would handle two of what I think are the most important things to understand in trading. Discipline and price action.
 

Butler

Member
How do we place an image in this forum? I'm trying to show the indicator in action and it wants me to pull the image from a website. I had two trades go 200%+ yesterday using it.
OGOptionSlayer What time frame are you trading with the last 20 candle setup? Is there a certain time you avoid trading etc? Thanks
 

OGOptionSlayer

Active member
VIP
Indicator told me to swing $SPX yesterday. Pretty simple.
When the price breaks above and you get a Buy Call signal, get out of your puts, the trend is either retracing or it's over. Usually just get back into the retracement for a cheaper price and keep riding it.
The indicator also serves as a pseudo (but better imho) Darvas Box. You can see that I use them and that was the basis for my thought process when coming up with it.
It gets you in prior to the Darvas Box giving you a signal. I really need someone to backtest this that can really do a good job. It works almost flawlessly on the 15m timeframe.

fgrcDGW.png


Same on calls but reverse. Remember, the candle should always close for you to take the entry and exit. This indicator only deals with price action and sniffs out most fakeouts.
 
Last edited:

vmalhotra13

New member
here are steps 1 - 8
this version just draws lines, arrows, and bubbles. it will draw more than 1 bubble, if future bars cross a line.

use it to verify the rules.
it's not a strategy, nothing happens if a line is crossed.


Code:
# High_Low_range_carter_00a

#https://usethinkscript.com/threads/looking-to-setup-a-high-low-range.13750/
#Looking to Setup A High-Low Range

#=======================================

def bn = barnumber();
def na = double.nan;


#1) Only using the last 20 candles on any timeframe.
input bars = 20;
def x = (!isnan(close) and isnan(close[-bars]));
#addverticalline(x,"-");


#2) Find the high and low of last 20 candles. As a new candle is created, it disregards anything not in the 20 candles.

def first = (!isnan(close[-(bars-1)]) and isnan(close[-bars]));
addverticalline(first,"-", Color.white);


def hi = if bn == 1 then 0
  else if first then highest(high[-(bars-1)], (bars-1))
  else hi[1];
def hi2 = (hi == high);


def lo = if bn == 1 then 0
  else if first then lowest(low[-(bars-1)], (bars-1))
  else lo[1];
def lo2 = (lo == low);

input test1 = no;
addchartbubble(test1, 38,
hi + "\n" +
hi2 + "\n" +
lo + "\n" +
lo2
, color.yellow, yes);


input hilo_arrows = yes;
plot z1 = if hilo_arrows and hi2 then high else na;
z1.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
z1.SetDefaultColor(Color.cyan);
z1.setlineweight(3);
z1.hidebubble();

plot z2 = if hilo_arrows and lo2 then low else na;
z2.SetPaintingStrategy(PaintingStrategy.ARROW_up);
z2.SetDefaultColor(Color.cyan);
z2.setlineweight(3);
z2.hidebubble();


#3) On the high candle, place a "Priceline" that is the low of that candle (wicks included).

# buy put
def hilo = if bn == 1 then na else if hi2 then low else hilo[1];
plot z3 = hilo;
z3.SetDefaultColor(Color.red);


#4) Once a candle closes a LL below that "Priceline", place a bubble called "Buy Puts" on that candle. It has to close below the low of the highest candle. It would be great if the candle could be painted a custom color. I use black in keeping with John Carter's concept.

def buyput = if close[1] crosses below hilo then 1 else 0;
addchartbubble(buyput, high*1.001, "Buy Put", color.red, yes);


#5) A stop loss "Priceline" is drawn on the "High" of the highest candle. This is a great stop loss and keeps risk at a low with confirmation that the trend is not reversing but also keeps you from getting shaken out by MM's.

# put stop , short stop
def hihi = if bn == 1 then na else if hi2 then high else hihi[1];
plot z4 = hihi;
z4.SetDefaultColor(Color.red);
z4.SetStyle(Curve.MEDIUM_DASH);


#6) On the low candle, place a "Priceline" that is the high of that candle (wicks included).

# buy call
def lohi = if bn == 1 then na else if lo2 then high else lohi[1];
plot z5 = lohi;
z5.SetDefaultColor(Color.green);



#7) Once a candle closes a HH above that "Priceline", place a bubble called "Buy Calls" on that candle. It has to close above the high of the lowest candle. It would be great to have this candle also painted a customer color. Again, default should be black.

def buycall = if close[1] crosses above lohi then 1 else 0;
addchartbubble(buycall, low*0.999, "Buy Call", color.green, no);


#8) A stop loss "Priceline" is drawn on the "Low" of the lowest candle. Again, another great stop loss to keep your risk at a minimum but also confirms that the trend reversal is not manifesting.

#  call stop , long stop
def lolo = if bn == 1 then na else if lo2 then low else lolo[1];
plot z6 = lolo;
z6.SetDefaultColor(Color.green);
z6.SetStyle(Curve.MEDIUM_DASH);



#9) Also, I would like the indicator to have a trailing stop loss. I forgot to include this important point.


#10) Once it has moved 50% from current entry, I would like it to put a stop loss at the HH of the last two candles for puts and the LL of the last two candles for calls. This locks in profits to ensure you don't get greedy and lose your gains when the market starts to shift.
# I do take profits on important pivots like PMH and PML

#

solid lines are buys
dashed lines are stops
Fy2WVic.jpg

In this case buy is at candle close where solid line is being plotted or when the bubble is displayed. During today in $CVX at 5 min chart both solid line and bubble were displayed on 2 different candles. Thanks.
 

OGOptionSlayer

Active member
VIP
In this case buy is at candle close where solid line is being plotted or when the bubble is displayed. During today in $CVX at 5 min chart both solid line and bubble were displayed on 2 different candles. Thanks.
I haven't ran into this issue yet but thanks for pointing it out and @halcyonguy will most likely take a look. Regardless, this thing is money. I had an $SPX play that went 400% yesterday that I swung the day before based solely on the indicator and signal. Price action is king when trading stocks and this indicator only uses price action. Doesn't care about EMA's, Squeezes, Fibs, or any other form of confluence, although I do use those signals to find areas of confluence.

I had a 3 hour appointment so I got out because I couldn't manage my trade but the trade went from $470 to $4700 per contract, I got out at $1675 per contract, a paltry gain of around 400% but it did hit 1000% and I would have been in had I not had the appointment.
 

vmalhotra13

New member
Thanks for your response, I do appreciate you sharing your experiences. I am not sure, why I am unable to post snapshot. Else I could have asked my doubt better.

My question is - you get into trade on 2nd day once the candle is being formed or enter at last 5 mins assuming now the alert line won't go away. Like in the below example assume 1 and 2 are candles. So, you enter PUT at last 5 mins of 1 candle or next day begining at candle 1 when it break the low of 1.

- - - - - --
1 (candle)
__________
2 (candle)
 
I haven't ran into this issue yet but thanks for pointing it out and @halcyonguy will most likely take a look. Regardless, this thing is money. I had an $SPX play that went 400% yesterday that I swung the day before based solely on the indicator and signal. Price action is king when trading stocks and this indicator only uses price action. Doesn't care about EMA's, Squeezes, Fibs, or any other form of confluence, although I do use those signals to find areas of confluence.

I had a 3 hour appointment so I got out because I couldn't manage my trade but the trade went from $470 to $4700 per contract, I got out at $1675 per contract, a paltry gain of around 400% but it did hit 1000% and I would have been in had I not had the appointment.
@OGOptionSlayer congratulations...liking this indicator a lot but need more clarification, it looks back 20 candles, when I looked at 2m on SPX for 12/23 , It generated a signal at the break of 3834, may I know how that could be HH of the last 20 candles?

I tried testing this using onDemand future in ToS, it didn't work well during november timeframe, gave a lot of false signals or too many signals


also how do set your targets, do you use any fibs ?
 

halcyonguy

Well-known member
VIP
Lifetime
So I use a very specific setup. It's kind of a mashup between what John Carter teaches with one of his in Mastering the Trade and TradingWarz Golden Indicator. I've used it for about 2 years now and it's extremely profitable. Honestly, I haven't backtested it but I would love to but I'm just not as technical as most in here. I know it brings me immense profit and on Friday, my port grew 11% using it. It's not a small port either. It's a reversal setup and it's solid with tight stop losses. I use it with a Darvas Box but TOS has a great Darvas Box study.

I'm looking to see if someone can create an indicator for it. To keep this post as short as possible, here is the setup:

1) Only using the last 20 candles on any timeframe.
2) Find the high and low of last 20 candles. As a new candle is created, it disregards anything not in the 20 candles.
3) On the high candle, place a "Priceline" that is the low of that candle (wicks included).
4) Once a candle closes a LL below that "Priceline", place a bubble called "Buy Puts" on that candle. It has to close below the low of the highest candle. It would be great if the candle could be painted a custom color. I use black in keeping with John Carter's concept.
5) A stop loss "Priceline" is drawn on the "High" of the highest candle. This is a great stop loss and keeps risk at a low with confirmation that the trend is not reversing but also keeps you from getting shaken out by MM's.
6) On the low candle, place a "Priceline" that is the high of that candle (wicks included).
7) Once a candle closes a HH above that "Priceline", place a bubble called "Buy Calls" on that candle. It has to close above the high of the lowest candle. It would be great to have this candle also painted a customer color. Again, default should be black.
8) A stop loss "Priceline" is drawn on the "Low" of the lowest candle. Again, another great stop loss to keep your risk at a minimum but also confirms that the trend reversal is not manifesting.

I use this with a Darvas box because I will take my option contracts where the Darvas Box low or high is respectfully. This setup works like a champ when I use it manually but I'm trying to share it with people that I trade with so they don't have to depend on me for their signals. I don't charge for signals nor do I have a discord. I just have a group of traders that I've traded with a long time that see how my port grows and theirs doesn't. I've tried to share this concept with them but many still don't get it and this would be great to share and I would love for you guys to use it too. It's a solid setup and it works very well.

Any help would be greatly appreciated!

Also, I would like the indicator to have a trailing stop loss. I forgot to include this important point.

Once it has moved 50% from current entry, I would like it to put a stop loss at the HH of the last two candles for puts and the LL of the last two candles for calls. This locks in profits to ensure you don't get greedy and lose your gains when the market starts to shift. I do take profits on important pivots like PMH and PML and this morning, it made me $3 on each share.
It's easy to trade 0dte's with this setup as well.


here is an updated version,

fixed a couple issues
.. removed duplicate arrows and bubbles, so only the first ones appear
.. added dashed lines for rule#10 , 50% beyond a buy level. can set the % number. (i suggest 1 to start)
. (in this version, nothing happens if price crosses the % line)

i didn't tidy this up, the code is messy. it has a lot of commented out stuff, code that may or may not be used in the future.


Code:
# 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
##1
#So I use a very specific setup. It's kind of a mashup between what John Carter teaches with one of his in Mastering the Trade and TradingWarz Golden Indicator. I've used it for about 2 years now and it's extremely profitable. Honestly, I haven't backtested it but I would love to but I'm just not as technical as most in here. I know it brings me immense profit and on Friday, my port grew 11% using it. It's not a small port either. It's a reversal setup and it's solid with tight stop losses. I use it with a Darvas Box but TOS has a great Darvas Box study.

#I'm looking to see if someone can create an indicator for it. To keep this post as short as possible, here is the setup:

#1) Only using the last 20 candles on any timeframe.
#2) Find the high and low of last 20 candles. As a new candle is created, it disregards anything not in the 20 candles.
#3) On the high candle, place a "Priceline" that is the low of that candle (wicks included).
#4) Once a candle closes a LL below that "Priceline", place a bubble called "Buy Puts" on that candle. It has to close below the low of the highest candle. It would be great if the candle could be painted a custom color. I use black in keeping with John Carter's concept.
#5) A stop loss "Priceline" is drawn on the "High" of the highest candle. This is a great stop loss and keeps risk at a low with confirmation that the trend is not reversing but also keeps you from getting shaken out by MM's.
#6) On the low candle, place a "Priceline" that is the high of that candle (wicks included).
#7) Once a candle closes a HH above that "Priceline", place a bubble called "Buy Calls" on that candle. It has to close above the high of the lowest candle. It would be great to have this candle also painted a customer color. Again, default should be black.
#8) A stop loss "Priceline" is drawn on the "Low" of the lowest candle. Again, another great stop loss to keep your risk at a minimum but also confirms that the trend reversal is not manifesting.


# 9  Also, I would like the indicator to have a trailing stop loss. I forgot to include this important point.

# 10  Once it has moved 50% from current entry,
#   for puts, put a stop loss at the HH of the last two candles
#   for calls, put a stop loss at the LL of the last two candles
#     to lock in profits


#=======================================


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;
}
# used in #4  buy puts , #7 calls


#---------------------------
# choose_wick_body01
#input plot_type = {default SMA, "Red EMA", "Green EMA", WMA};
input candle_levels = {default "wick" , "body" };
def highx;
def lowx;
switch (candle_levels) {
case "wick":
    highx = high;
    lowx = low;
case "body":
    highx = Max( open, close);
    lowx = Min( open, close);
}

#addlabel(yes, "choose=" + candle_levels + "..high=" + highx + "..low=" + lowx);
#-----------------------------



#1) Only using the last 20 candles on any timeframe.
input bars = 20;
def period = (!IsNaN(close) and IsNaN(close[-bars]));
#addverticalline(x,"-");



#2) Find the high and low of last 20 candles. As a new candle is created, it disregards anything not in the 20 candles.

# define group of x bars
def first = (!IsNaN(close[-(bars - 1)]) and IsNaN(close[-bars]));
AddVerticalLine(first, "-", Color.WHITE);



#----------------------------

# 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;




addchartbubble(0, low,
bn + "\n" +
hihifirstbn
, color.yellow, no);




#-------------------------------------

#def lolo = 0;


# find lowest low
#def lo = if bn == 1 then 0
#  else if first then Lowest(low[-(bars - 1)], (bars - 1))
#  else lo[1];

##def lo2 = (lo == low);
#def islo = (lo == 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 test1 = no;
AddChartBubble(test1, 38,
hihi + "\n" +
#hi2 + "\n" +
ishi + "\n" +
lolo + "\n" +
#lo2
islo
, Color.YELLOW, yes);




input hilo_arrows = yes;

plot z1 = if hilo_arrows and ishi then high else na;
z1.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
z1.SetDefaultColor(Color.CYAN);
z1.SetLineWeight(3);
z1.HideBubble();

plot z2 = if hilo_arrows and islo then low else na;
z2.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
z2.SetDefaultColor(Color.CYAN);
z2.SetLineWeight(3);
z2.HideBubble();


#3) On the high candle, place a "Priceline" that is the low of that candle (wicks included).

# buy put
def put_buy_hilo = if bn == 1 or isnan(close) then 0 else if ishi then low else put_buy_hilo[1];
plot z3 = if put_buy_hilo > 0 then put_buy_hilo else na;
z3.SetDefaultColor(Color.RED);


#4) Once a candle closes a LL below that "Priceline", place a bubble called "Buy Puts" on that candle. It has to close below the low of the highest candle. It would be great if the candle could be painted a custom color. I use black in keeping with John Carter's concept.




# replace , draws many bubbles
#def buyput = if close[1] crosses below hilo then 1 else 0;
#def buyput = if close[buyoff] crosses below put_buy_hilo then 1 else 0;
#AddChartBubble(buy_bubbles_on and buyput, high * 1.0005, "Buy Put", Color.RED, yes);





# chg signal, remove dup signals
#  when triggered on first time, keep signal at 1.
#  then check for transition 0 to 1

# chg words ?   option ., stock oriented , or options
#  long-open , short-open
#  buy call , buy put

# 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;

AddChartBubble(buy_bubbles_on and bp3, high * 1.0005, "Buy Put", Color.RED, yes);



addchartbubble(0,low*.997,
 close[buyoff] + "\n" +
 put_buy_hilo + "\n" +
 bp1 + "\n" +
 bp2 + "\n" +
 bp3
, color.yellow, no);





# buy only on first signal
#def buyput = if !period then 0
#  else if buyput[1] then buyput[1]
#  else if close[buyoff] crosses below hilo then 1
#  else buyput[1];

#def bp =  !buyput[1] and buyput;
#addchartbubble(bubbles_on and bp, high*1.001, "Buy Put", color.red, yes);


AddChartBubble(0, low * 0.997,
period + " p\n" +
#buyput + " bp\n" +
close[buyoff] + " cls\n" +
put_buy_hilo + " hl"
, Color.YELLOW, no);








#5) A stop loss "Priceline" is drawn on the "High" of the highest candle. This is a great stop loss and keeps risk at a low with confirmation that the trend is not reversing but also keeps you from getting shaken out by MM's.


# hihi_level

#def hilo = if bn == 1 then 0 else if hi2 then low else hilo[1];
#plot z3 = if hilo > 0 then hilo else na;

# put stop , short stop
#def put_sell_hihi = if bn == 1 then 0 else if ishi then high else put_sell_hihi[1];
#plot z4 = if put_sell_hihi > 0 then put_buy_hilo else na;

plot z4 = hihi_level;
z4.SetDefaultColor(Color.RED);
z4.SetStyle(Curve.MEDIUM_DASH);


#6) On the low candle, place a "Priceline" that is the high of that candle (wicks included).

# buy call
#def call_buy_lohi = if bn == 1 or isnan(close) then na else if islo then high else call_buy_lohi[1];
# chg to 0 , simpler
def call_buy_lohi = if bn == 1 or isnan(close) then 0 else if islo then high else call_buy_lohi[1];
plot z5 = if  call_buy_lohi > 0 then call_buy_lohi else na;
z5.SetDefaultColor(Color.GREEN);



#7) Once a candle closes a HH above that "Priceline", place a bubble called "Buy Calls" on that candle. It has to close above the high of the lowest candle. It would be great to have this candle also painted a customer color. Again, default should be black.





# may bubbles
#def buycall = if close[1] crosses above lohi then 1 else 0;
#def buycall = if close[buyoff] crosses above call_buy_lohi then 1 else 0;
#AddChartBubble(buy_bubbles_on and buycall, low * 0.9995, "Buy Call", Color.GREEN, no);



# just first bubble
# bc = buycall
#def bc1 = if period and !first then (close[buyoff] crosses above call_buy_lohi) else 0;

# use offset so first bar of call_buy_lohi  checked is after the buy signal. so its not trying to cross above a na
#def bc1 = if period and !isnan(call_buy_lohi[1]) then (close[buyoff] crosses above call_buy_lohi) else 0;
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;

AddChartBubble(buy_bubbles_on and bc3, low * 0.9995, "Buy Call", Color.GREEN, no);



addchartbubble(0,low*.997,
 close[buyoff] + "\n" +
 call_buy_lohi + "\n" +
 bc1 + "\n" +
 bc2 + "\n" +
 bc3
, color.yellow, no);
#, (if bc3 then color.yellow else color.gray), no);




#8) A stop loss "Priceline" is drawn on the "Low" of the lowest candle. Again, another great stop loss to keep your risk at a minimum but also confirms that the trend reversal is not manifesting.

#  call stop , long stop
#def call_sell_lolo = if bn == 1 then na else if islo then low else call_sell_lolo[1];
#plot z6 = call_sell_lolo;
plot z6 = lolo_level;
z6.SetDefaultColor(Color.GREEN);
z6.SetStyle(Curve.MEDIUM_DASH);



#9) Also, I would like the indicator to have a trailing stop loss. I forgot to include this important point.





# 10  Once it has moved 50% from current entry,
#   for puts, put a stop loss at the HH of the last two candles
#   for calls, put a stop loss at the LL of the last two candles

#input gain_stop_percent = 50;
input gain_stop_percent = 20;

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


# puts
#  draw stop ref line at (buy put $$) - 50%
# putreflevel = hilo - ( hilo * x%)


# puts
def putreflevel = put_buy_hilo - (put_buy_hilo * (gain_stop_percent/100));
# dashed line for stop , gray/red. draw dash line first
plot z23 = if put_buy_hilo > 0 then  putreflevel else na;
# this color will appear as longer dashes than next color
z23.SetDefaultColor(Color.light_red);
#z23.SetDefaultColor(Color.light_gray);
z23.SetStyle(Curve.medium_DASH);
plot z24 = z23;
z24.SetDefaultColor(Color.light_gray);
#z24.SetDefaultColor(Color.light_red);


addchartbubble(ref_bubble_x, z23[offx],
gain_stop_percent + "%  put stop ref"
, color.yellow, yes);



addchartbubble(0, low,
  put_buy_hilo + "\n" +
 putreflevel + "\n" +
 z23
, color.yellow, no);



# calls
def callreflevel = call_buy_lohi + (call_buy_lohi * (gain_stop_percent/100));
# dashed line for stop , gray/red. draw dash line first
plot z25 = if call_buy_lohi > 0 then callreflevel else na;
# this color will appear as longer dashes than next color
z25.SetDefaultColor(Color.green);
#z25.SetDefaultColor(Color.light_gray);
z25.SetStyle(Curve.medium_DASH);
plot z26 = z25;
z26.SetDefaultColor(Color.blue);
#z26.SetDefaultColor(Color.gray);
#z26.SetDefaultColor(Color.light_red);


addchartbubble(ref_bubble_x, z25[offx],
gain_stop_percent + "%  call stop ref"
, color.yellow, no);

#

yIiahYM.jpg
 
here is an updated version,

fixed a couple issues
.. removed duplicate arrows and bubbles, so only the first ones appear
.. added dashed lines for rule#10 , 50% beyond a buy level. can set the % number. (i suggest 1 to start)
. (in this version, nothing happens if price crosses the % line)

i didn't tidy this up, the code is messy. it has a lot of commented out stuff, code that may or may not be used in the future.


Code:
# 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
##1
#So I use a very specific setup. It's kind of a mashup between what John Carter teaches with one of his in Mastering the Trade and TradingWarz Golden Indicator. I've used it for about 2 years now and it's extremely profitable. Honestly, I haven't backtested it but I would love to but I'm just not as technical as most in here. I know it brings me immense profit and on Friday, my port grew 11% using it. It's not a small port either. It's a reversal setup and it's solid with tight stop losses. I use it with a Darvas Box but TOS has a great Darvas Box study.

#I'm looking to see if someone can create an indicator for it. To keep this post as short as possible, here is the setup:

#1) Only using the last 20 candles on any timeframe.
#2) Find the high and low of last 20 candles. As a new candle is created, it disregards anything not in the 20 candles.
#3) On the high candle, place a "Priceline" that is the low of that candle (wicks included).
#4) Once a candle closes a LL below that "Priceline", place a bubble called "Buy Puts" on that candle. It has to close below the low of the highest candle. It would be great if the candle could be painted a custom color. I use black in keeping with John Carter's concept.
#5) A stop loss "Priceline" is drawn on the "High" of the highest candle. This is a great stop loss and keeps risk at a low with confirmation that the trend is not reversing but also keeps you from getting shaken out by MM's.
#6) On the low candle, place a "Priceline" that is the high of that candle (wicks included).
#7) Once a candle closes a HH above that "Priceline", place a bubble called "Buy Calls" on that candle. It has to close above the high of the lowest candle. It would be great to have this candle also painted a customer color. Again, default should be black.
#8) A stop loss "Priceline" is drawn on the "Low" of the lowest candle. Again, another great stop loss to keep your risk at a minimum but also confirms that the trend reversal is not manifesting.


# 9  Also, I would like the indicator to have a trailing stop loss. I forgot to include this important point.

# 10  Once it has moved 50% from current entry,
#   for puts, put a stop loss at the HH of the last two candles
#   for calls, put a stop loss at the LL of the last two candles
#     to lock in profits


#=======================================


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;
}
# used in #4  buy puts , #7 calls


#---------------------------
# choose_wick_body01
#input plot_type = {default SMA, "Red EMA", "Green EMA", WMA};
input candle_levels = {default "wick" , "body" };
def highx;
def lowx;
switch (candle_levels) {
case "wick":
    highx = high;
    lowx = low;
case "body":
    highx = Max( open, close);
    lowx = Min( open, close);
}

#addlabel(yes, "choose=" + candle_levels + "..high=" + highx + "..low=" + lowx);
#-----------------------------



#1) Only using the last 20 candles on any timeframe.
input bars = 20;
def period = (!IsNaN(close) and IsNaN(close[-bars]));
#addverticalline(x,"-");



#2) Find the high and low of last 20 candles. As a new candle is created, it disregards anything not in the 20 candles.

# define group of x bars
def first = (!IsNaN(close[-(bars - 1)]) and IsNaN(close[-bars]));
AddVerticalLine(first, "-", Color.WHITE);



#----------------------------

# 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;




addchartbubble(0, low,
bn + "\n" +
hihifirstbn
, color.yellow, no);




#-------------------------------------

#def lolo = 0;


# find lowest low
#def lo = if bn == 1 then 0
#  else if first then Lowest(low[-(bars - 1)], (bars - 1))
#  else lo[1];

##def lo2 = (lo == low);
#def islo = (lo == 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 test1 = no;
AddChartBubble(test1, 38,
hihi + "\n" +
#hi2 + "\n" +
ishi + "\n" +
lolo + "\n" +
#lo2
islo
, Color.YELLOW, yes);




input hilo_arrows = yes;

plot z1 = if hilo_arrows and ishi then high else na;
z1.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
z1.SetDefaultColor(Color.CYAN);
z1.SetLineWeight(3);
z1.HideBubble();

plot z2 = if hilo_arrows and islo then low else na;
z2.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
z2.SetDefaultColor(Color.CYAN);
z2.SetLineWeight(3);
z2.HideBubble();


#3) On the high candle, place a "Priceline" that is the low of that candle (wicks included).

# buy put
def put_buy_hilo = if bn == 1 or isnan(close) then 0 else if ishi then low else put_buy_hilo[1];
plot z3 = if put_buy_hilo > 0 then put_buy_hilo else na;
z3.SetDefaultColor(Color.RED);


#4) Once a candle closes a LL below that "Priceline", place a bubble called "Buy Puts" on that candle. It has to close below the low of the highest candle. It would be great if the candle could be painted a custom color. I use black in keeping with John Carter's concept.




# replace , draws many bubbles
#def buyput = if close[1] crosses below hilo then 1 else 0;
#def buyput = if close[buyoff] crosses below put_buy_hilo then 1 else 0;
#AddChartBubble(buy_bubbles_on and buyput, high * 1.0005, "Buy Put", Color.RED, yes);





# chg signal, remove dup signals
#  when triggered on first time, keep signal at 1.
#  then check for transition 0 to 1

# chg words ?   option ., stock oriented , or options
#  long-open , short-open
#  buy call , buy put

# 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;

AddChartBubble(buy_bubbles_on and bp3, high * 1.0005, "Buy Put", Color.RED, yes);



addchartbubble(0,low*.997,
 close[buyoff] + "\n" +
 put_buy_hilo + "\n" +
 bp1 + "\n" +
 bp2 + "\n" +
 bp3
, color.yellow, no);





# buy only on first signal
#def buyput = if !period then 0
#  else if buyput[1] then buyput[1]
#  else if close[buyoff] crosses below hilo then 1
#  else buyput[1];

#def bp =  !buyput[1] and buyput;
#addchartbubble(bubbles_on and bp, high*1.001, "Buy Put", color.red, yes);


AddChartBubble(0, low * 0.997,
period + " p\n" +
#buyput + " bp\n" +
close[buyoff] + " cls\n" +
put_buy_hilo + " hl"
, Color.YELLOW, no);








#5) A stop loss "Priceline" is drawn on the "High" of the highest candle. This is a great stop loss and keeps risk at a low with confirmation that the trend is not reversing but also keeps you from getting shaken out by MM's.


# hihi_level

#def hilo = if bn == 1 then 0 else if hi2 then low else hilo[1];
#plot z3 = if hilo > 0 then hilo else na;

# put stop , short stop
#def put_sell_hihi = if bn == 1 then 0 else if ishi then high else put_sell_hihi[1];
#plot z4 = if put_sell_hihi > 0 then put_buy_hilo else na;

plot z4 = hihi_level;
z4.SetDefaultColor(Color.RED);
z4.SetStyle(Curve.MEDIUM_DASH);


#6) On the low candle, place a "Priceline" that is the high of that candle (wicks included).

# buy call
#def call_buy_lohi = if bn == 1 or isnan(close) then na else if islo then high else call_buy_lohi[1];
# chg to 0 , simpler
def call_buy_lohi = if bn == 1 or isnan(close) then 0 else if islo then high else call_buy_lohi[1];
plot z5 = if  call_buy_lohi > 0 then call_buy_lohi else na;
z5.SetDefaultColor(Color.GREEN);



#7) Once a candle closes a HH above that "Priceline", place a bubble called "Buy Calls" on that candle. It has to close above the high of the lowest candle. It would be great to have this candle also painted a customer color. Again, default should be black.





# may bubbles
#def buycall = if close[1] crosses above lohi then 1 else 0;
#def buycall = if close[buyoff] crosses above call_buy_lohi then 1 else 0;
#AddChartBubble(buy_bubbles_on and buycall, low * 0.9995, "Buy Call", Color.GREEN, no);



# just first bubble
# bc = buycall
#def bc1 = if period and !first then (close[buyoff] crosses above call_buy_lohi) else 0;

# use offset so first bar of call_buy_lohi  checked is after the buy signal. so its not trying to cross above a na
#def bc1 = if period and !isnan(call_buy_lohi[1]) then (close[buyoff] crosses above call_buy_lohi) else 0;
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;

AddChartBubble(buy_bubbles_on and bc3, low * 0.9995, "Buy Call", Color.GREEN, no);



addchartbubble(0,low*.997,
 close[buyoff] + "\n" +
 call_buy_lohi + "\n" +
 bc1 + "\n" +
 bc2 + "\n" +
 bc3
, color.yellow, no);
#, (if bc3 then color.yellow else color.gray), no);




#8) A stop loss "Priceline" is drawn on the "Low" of the lowest candle. Again, another great stop loss to keep your risk at a minimum but also confirms that the trend reversal is not manifesting.

#  call stop , long stop
#def call_sell_lolo = if bn == 1 then na else if islo then low else call_sell_lolo[1];
#plot z6 = call_sell_lolo;
plot z6 = lolo_level;
z6.SetDefaultColor(Color.GREEN);
z6.SetStyle(Curve.MEDIUM_DASH);



#9) Also, I would like the indicator to have a trailing stop loss. I forgot to include this important point.





# 10  Once it has moved 50% from current entry,
#   for puts, put a stop loss at the HH of the last two candles
#   for calls, put a stop loss at the LL of the last two candles

#input gain_stop_percent = 50;
input gain_stop_percent = 20;

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


# puts
#  draw stop ref line at (buy put $$) - 50%
# putreflevel = hilo - ( hilo * x%)


# puts
def putreflevel = put_buy_hilo - (put_buy_hilo * (gain_stop_percent/100));
# dashed line for stop , gray/red. draw dash line first
plot z23 = if put_buy_hilo > 0 then  putreflevel else na;
# this color will appear as longer dashes than next color
z23.SetDefaultColor(Color.light_red);
#z23.SetDefaultColor(Color.light_gray);
z23.SetStyle(Curve.medium_DASH);
plot z24 = z23;
z24.SetDefaultColor(Color.light_gray);
#z24.SetDefaultColor(Color.light_red);


addchartbubble(ref_bubble_x, z23[offx],
gain_stop_percent + "%  put stop ref"
, color.yellow, yes);



addchartbubble(0, low,
  put_buy_hilo + "\n" +
 putreflevel + "\n" +
 z23
, color.yellow, no);



# calls
def callreflevel = call_buy_lohi + (call_buy_lohi * (gain_stop_percent/100));
# dashed line for stop , gray/red. draw dash line first
plot z25 = if call_buy_lohi > 0 then callreflevel else na;
# this color will appear as longer dashes than next color
z25.SetDefaultColor(Color.green);
#z25.SetDefaultColor(Color.light_gray);
z25.SetStyle(Curve.medium_DASH);
plot z26 = z25;
z26.SetDefaultColor(Color.blue);
#z26.SetDefaultColor(Color.gray);
#z26.SetDefaultColor(Color.light_red);


addchartbubble(ref_bubble_x, z25[offx],
gain_stop_percent + "%  call stop ref"
, color.yellow, no);

#

yIiahYM.jpg
Is there a possible way to change the "Gain Stop Percent" to reflect actual dollar amount instead? I trade SPY and even with 1% it is still a hefty number to get to? Would love to just gain, say 50 cents? Maybe 75 cents or $1 ?
 

sonnytrader

New member
VIP
@OGOptionSlayer congratulations...liking this indicator a lot but need more clarification, it looks back 20 candles, when I looked at 2m on SPX for 12/23 , It generated a signal at the break of 3834, may I know how that could be HH of the last 20 candles?

I tried testing this using onDemand future in ToS, it didn't work well during november timeframe, gave a lot of false signals or too many signals


also how do set your targets, do you use any fibs ?

Is there a possible way to change the "Gain Stop Percent" to reflect actual dollar amount instead? I trade SPY and even with 1% it is still a hefty number to get to? Would love to just gain, say 50 cents? Maybe 75 cents or $1 ?
can anyone explain the blue arrows,,,what they mean versus the buy put?
 

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.
Top