Repaints The PAM High Low Chart Setup For ThinkOrSwim

Repaints
Status
Not open for further replies.
Sure here it the indicator link: http://tos.mx/ZMo0dIv
thanks @OGOptionSlayer ...I think this is an upgraded version with Fib , I was looking the one that has SL line with no Fibs.

Also, I found that it didn't generate Buy Call at 11:30 AM EST on 1/28/2023. Do you know why?
Do you enter when the price is above both 13 & 48 EMA's after the close of the 15m candle? Wouldn't you miss a lot of move then?
( Actually, in ToS, I can't put 48.5 EMA, it always round to the nearest integer)


May I know how do you check if Relative Volume > 2.0
 
thanks @OGOptionSlayer ...I think this is an upgraded version with Fib , I was looking the one that has SL line with no Fibs.

Also, I found that it didn't generate Buy Call at 11:30 AM EST on 1/28/2023. Do you know why?
Do you enter when the price is above both 13 & 48 EMA's after the close of the 15m candle? Wouldn't you miss a lot of move then?
( Actually, in ToS, I can't put 48.5 EMA, it always round to the nearest integer)


May I know how do you check if Relative Volume > 2.0
I can't see the bottom of the screen where the timeframe is so it's tough to say. I'm guessing it's because it was more than 20 candles back and the indicator had already generated another signal. It has a built in buffer to not take any candles 20 back. No, typically the indicator gives you the signal well prior to the cross but then after I get in, I look for the 13 and 48 to confirm the full reversal or if it may be a retracement. I look for something that John Carter calls "kissing the trend goodbye". That's when it breaks below the 13 in a put and goes down but then retraces back up and rejects off of it again. That's a good confirmation the previous trend is dead.

I've also found that this indicator is working nice with Smart Money Concepts being taught by ICT on Twitter. Another area of confluence I look for is if the candle that generates the stop loss and buy lines is a true reversal candle (i.e. evening star, etc.). Then I keep in the trade using Squeeze Pro but TTM Squeeze works just as well. Also, I have TrendSpark from ST and I like it because it confirms the trend is still going as well, although you don't need this.

For relative volume, I use the Relative Volume indicator that is built into the studies in TOS. It's standard is set to 2.0.

On the upgraded version, you can just go to the settings and turn the fibs off.
 
I can't see the bottom of the screen where the timeframe is so it's tough to say. I'm guessing it's because it was more than 20 candles back and the indicator had already generated another signal. It has a built in buffer to not take any candles 20 back. No, typically the indicator gives you the signal well prior to the cross but then after I get in, I look for the 13 and 48 to confirm the full reversal or if it may be a retracement. I look for something that John Carter calls "kissing the trend goodbye". That's when it breaks below the 13 in a put and goes down but then retraces back up and rejects off of it again. That's a good confirmation the previous trend is dead.

I've also found that this indicator is working nice with Smart Money Concepts being taught by ICT on Twitter. Another area of confluence I look for is if the candle that generates the stop loss and buy lines is a true reversal candle (i.e. evening star, etc.). Then I keep in the trade using Squeeze Pro but TTM Squeeze works just as well. Also, I have TrendSpark from ST and I like it because it confirms the trend is still going as well, although you don't need this.

For relative volume, I use the Relative Volume indicator that is built into the studies in TOS. It's standard is set to 2.0.

On the upgraded version, you can just go to the settings and turn the fibs off.
here is a magnified image...there are 390 minutes in a regular trading session and 26 15minute candles are generated on each regular trading session so you won't get many signals each day using this indicator if you are regular hour trader. This needs to be tested for 5 minute intervals rather than 15 minute. 15 minute is too long for a day trader.



I'm surprised that it didn't generate any signals even for a 2 minute timeframe.
 
Last edited by a moderator:
So my filter is 0dte, I hide Equity Type ETF's/ETN's, Premium is set to $50k and above. I also filter Size > OI, Single Leg Only. The reason why is I want pure directional bias. Spreads are saying chop. But if I have a whale that puts in $50k on a directional put or call, and the size of that trade is more than the OI that the trade currently has, then that's strong directional bias in my experience.

Another site I use is Tradytics. It's more expensive but the analytics from Tradytics is top notch and they provide almost too detailed videos on how to use the platform. While they have flow data, nothing beats Unusual Whales and if I had to choose between the two, which I would never do, I would choose Unusual Whales simply for the flow data and Daily Market Tide.

Daily Market Tide shows the amount of premiums in real time being bought and sold. You can see the entire market shifting from puts to calls and vice versa. It's why I swung puts for Monday (even if I am proven wrong), but $200M worth of puts were bought in the last hour of the market being open and $50M worth of calls were sold.

For UW, I use Super Live Buffet.

Thanks so much for explaining all of this. I have the filters set up as you've suggested. However, I have to confess that I'm confused about how to interpret the information that is outputted. For example, this is what I see now (which of course is displaying last Friday's data):

Q7Nhg1B.png


This is from the sidebar option with the wave icon called "Live Flow" - is this different than Daily Market Tide?

If it's not different, then when using the filters you suggested ("hide Equity Type ETF's/ETN's, Premium is set to $50k and above, filter Size > OI, Single Leg Only"), why do I not see that "$200M worth of puts were bought in the last hour of the market being open and $50M worth of calls were sold"? Maybe I am just unclear about how to interpret the information. Sorry to ask you to keep explaining 😅 , I just want to make sure I understand how to follow your advice correctly.
 
Thanks so much for explaining all of this. I have the filters set up as you've suggested. However, I have to confess that I'm confused about how to interpret the information that is outputted. For example, this is what I see now (which of course is displaying last Friday's data):

Q7Nhg1B.png


This is from the sidebar option with the wave icon called "Live Flow" - is this different than Daily Market Tide?

If it's not different, then when using the filters you suggested ("hide Equity Type ETF's/ETN's, Premium is set to $50k and above, filter Size > OI, Single Leg Only"), why do I not see that "$200M worth of puts were bought in the last hour of the market being open and $50M worth of calls were sold"? Maybe I am just unclear about how to interpret the information. Sorry to ask you to keep explaining 😅 , I just want to make sure I understand how to follow your advice correctly.
Hi bro, from what I understand of unusual option activities (UOA) may be the following conditions (1) Volume > OI, (2) Strike OTM and (3) Sweep trades.
 
here is a magnified image...there are 390 minutes in a regular trading session and 26 15minute candles are generated on each regular trading session so you won't get many signals each day using this indicator if you are regular hour trader. This needs to be tested for 5 minute intervals rather than 15 minute. 15 minute is too long for a day trader.



I'm surprised that it didn't generate any signals even for a 2 minute timeframe.
I haven't had any issues with it generating signals on any timeframe, especially lower. I'm not sure how you are set up. Time is fractal and plenty of day traders use 15m to confirm the trend. I'm one of them. I almost never swing trades until very recently. Majority of my trades last less than an hour and a maximum of two hours.

I don't use 5m to trade on but rather use the 10m and 3m for my entries. Unless the market is super choppy in the one you are trading in, there is a setting not configured properly. Also, you can change the buffer area to a lower candle count. For hourly, I typically use like 5 bars instead of 20. For 15m though, I definitely use 20. I'm not looking to take 10-15 trades during the day. I'm looking for 1-2 great setups and I'm following the trend. I might make 3 trades in a day max.

If you want to get more signals with the indicator on the 15m, go into settings on the indicator and change the buffer to 10. I would go with 5 but 10 should be okay. This will generate double the signals.

And the indicator is for a trader, not specifically a day trader. It helps you make an informed decision whatever your trading style.
 
Last edited:
Hi bro, from what I understand of unusual option activities (UOA) may be the following conditions (1) Volume > OI, (2) Strike OTM and (3) Sweep trades.
The first thing I look for is OTM Strikes and Volume > OI. Sweeps are good indicators too because the person buying them really cares about the price they get their entry on and are willing to break the trade up among many brokerages.

If I see a $50k volume trade that is OTM and also has more volume than OI, then I'm looking hard at the possibility of that occurring. I filter only 0dte's to capture that current price action. I could care less if it expires the following day. I don't even look at those until the last hour of trading where I will update the filter to show 1dte's trades as well.

I also confirm in Unusual Whales --> Market Overview --> Daily Market Tide to see where the put and call premiums are changing. You can learn the market trend just by looking at this.
 
Thanks so much for explaining all of this. I have the filters set up as you've suggested. However, I have to confess that I'm confused about how to interpret the information that is outputted. For example, this is what I see now (which of course is displaying last Friday's data):

Q7Nhg1B.png


This is from the sidebar option with the wave icon called "Live Flow" - is this different than Daily Market Tide?

If it's not different, then when using the filters you suggested ("hide Equity Type ETF's/ETN's, Premium is set to $50k and above, filter Size > OI, Single Leg Only"), why do I not see that "$200M worth of puts were bought in the last hour of the market being open and $50M worth of calls were sold"? Maybe I am just unclear about how to interpret the information. Sorry to ask you to keep explaining 😅 , I just want to make sure I understand how to follow your advice correctly.
For the $200M worth of puts, go to Unusual Whales --> Market Overview --> Daily Market Tide. Look at 2 pm on that chart for Friday if it's still available. It will show that in the last hour $200M worth of puts were bought and $50k worth of calls were sold. The market tide is almost even now setting us up for either a choppy Monday or one of the two hedging to protect their positions which will be the catalyst for a big move.

As for your image, this was taken after the market has closed. You have to see the data in real time to truly catch it. What you are looking for is an exclamation point beside the Time column instead of the warning sign (which lets you know the option may have multiple legs like a call credit spread). The exclamation point lets you know that the Volume for the trade was larger than the OI. I try to look for the ones that don't have any legs attached to them and they are directional only. This tells me of extreme bias for that position and direction.

Unfortunately, at any level, there are compulsive gamblers even with big premiums so you need to use it as an area of confluence and don't just pick the strike because it's directional only. I hope this is a good explanation of my thought process.
 
I reworked the day High Low Range to

1. Focus upon Today only starting the 1st bar of the day + Skip 'x' number of bars with "Bars To Skip' starting from the 1st bar of today.
2. I used a slightly different method to find the highest and lowest starting the 1st bar of today + "Bars To Skip".
3. Instead of looking back '20' bars - start from an exact bar in any given time frame.
4. I plan to test it further and make any necessary - One change I have in mind is to drop the start from a certain bar to start from a certain time say 9:35 or 10:35 to keep visual results consistent in all time frames.

Please comment and suggest.

Here is an image.
Consistent results in 2, 5 and 10 minutes

17366[/ATTACH]']
e30qsk0.png


CSS:
# Retrofitted 01-29-2023 Farooq Khan from then day high low range specifications
# ...  01-31-2023 - Farooq Khan - remove duplicate Sell Put / Call Signals. Only show the very 1st signal for each set
# ...
#declare hide_on_daily;
declare once_per_bar;

input Bars_To_Skip = 0;
input ShowStartEnd = no;

#
# logic
#

# Establish 1st and last bar of today
def nan = Double.NaN;
def isRollover = GetYYYYMMDD() != GetYYYYMMDD()[1];
def beforeStart = GetTime() < RegularTradingStart(GetYYYYMMDD());
def afterEnd = GetTime() > RegularTradingEnd(GetYYYYMMDD());
def firstBarOfDay = if (beforeStart[1] == 1 and beforeStart == 0) or (isRollover and beforeStart == 0) then 1 else 0;

def lastBarOfDay = if
    (afterEnd[-1] == 1 and afterEnd == 0) or
    (isRollover[-1] and firstBarOfDay[-1])
    then 1
    else 0;

#
# Identify first bar of any day and last bar of any day on chart
#
AddChartBubble(
    firstBarOfDay and ShowStartEnd,
    close,
    "First Bar of Day" +BarNumber(),
    Color.GREEN,
    yes);

AddChartBubble(
    lastBarOfDay and ShowStartEnd,
    close,
    "Last Bar of Day" +BarNumber(),
    Color.GREEN,
    no);

# High_Low_range_of today

#Looking to Setup A High-Low Range of Today

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

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

#1) Only using the First and last bar of today candles on any timeframe.
#def barsfromopen = (RegularTradingstart(GetYYYYMMDD())- GetTime() )/ GetAggregationPeriod();
#input  bars = 118;


#2) Find the high and low starting from 1st bat of today + MoveBarsForward candles.

# find 1st and last bar of today
def barNumber = if firstBarOfDay then  BarNumber() else 0 ;
def firstBarOfToday = HighestAll(  barNumber) + Bars_To_Skip;
AddVerticalLine(firstBarOfToday == bn , "-", Color.WHITE);

def zlastbarnum = if lastBarOfDay then  BarNumber() else 0 ;
def LastBarofTOday = HighestAll(  zlastbarnum);


#get HIGH of today starting the firstBarOfToday + Bars_To_Skip

def zhigh = if bn > firstBarOfToday then  high else nan;
def  zhigh2 =  HighestAll(  zhigh);
def zhighest =  if bn >  firstBarOfToday then zhigh2 else  nan;
 


def hi = zhighest;
def hi2 = (hi == high);

# Get Low of today starting the firstBarOfToday + Bars_To_Skip
def zlow = if bn > firstBarOfToday   then  low else nan;;
def zlow2 =  LowestAll(  zlow);
def zlowest =  if bn >  firstBarOfToday  then zlow2 else  nan;

def lo = zlowest;
def lo2 = (lo == low);


#addlabel(yes, " zlow2: "  + zlow2  , Color.WHITE);
#addlabel(yes, " zhigh2: "  + zhigh2  , Color.WHITE);




input hilo_arrows = yes;
plot z1 = if hilo_arrows and hi2 then high * 1.0005 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  or bn > LastBarofTOday  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 "Sell Call" 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.

#buy put or sell call
def buyput = if close[1] crosses below hilo then bn else 99999;
def sellCall = LowestAll(  buyput);
def sellcall2 = if bn equals sellCall then 1 else 0;
#addlabel(yes, " sellCall: "  + sellCall  , Color.WHITE);
AddChartBubble(sellcall2, high * 1.0001, "Sell Call: "   , Color.YELLOW, 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  or bn > LastBarofTOday  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 or sell put
def lohi = if bn == 1 or bn > LastBarofTOday 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 "Sell Put" 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.

# buy call is sell put
def buycall = if close[1] crosses above lohi then bn else 99999;
def sellPut = LowestAll(  buycall);
def sellput2 = if bn equals sellPut then 1 else 0;
#addlabel(yes, " sellPut: "  + sellPut  , Color.WHITE);

AddChartBubble(sellPut2, low * 0.9999, "Sell Put", Color.YELLOW, 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  or bn > LastBarofTOday  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

#EOF
 

Attachments

  • e30qsk0.png
    e30qsk0.png
    429.4 KB · Views: 118
Last edited:
I reworked the day High Low Range to

1. Focus upon Today only starting the 1st bar of the day + Skip 'x' number of bars with "Bars To Skip' starting from the 1st bar of today.
2. I used a slightly different method to find the highest and lowest starting the 1st bar of today + "Bars To Skip".
3. Instead of looking back '20' bars - start from an exact bar in any given time frame.
4. I plan to test it further and make any necessary - One change I have in mind is to drop the start from a certain bar to start from a certain time say 9:35 or 10:35 to keep visual results consistent in all time frames.

Please comment and suggest.

Here is an image.
Consistent results in 2, 5 and 10 minutes

17376[/ATTACH]']
e30qsk0.png


CSS:
# modified 01-29-2023 Farooq Khan from then day high low range specifications
# ...
# ...
declare hide_on_daily;
declare once_per_bar;

input Bars_To_Skip = 1;
input ShowStartEnd = no;

#
# logic
#

# Establish 1st and last bar of today
def nan = Double.NaN;
def isRollover = GetYYYYMMDD() != GetYYYYMMDD()[1];
def beforeStart = GetTime() < RegularTradingStart(GetYYYYMMDD());
def afterEnd = GetTime() > RegularTradingEnd(GetYYYYMMDD());
def firstBarOfDay = if (beforeStart[1] == 1 and beforeStart == 0) or (isRollover and beforeStart == 0) then 1 else 0;
def lastBarOfDay = if
    (afterEnd[-1] == 1 and afterEnd == 0) or
    (isRollover[-1] and firstBarOfDay[-1])
    then 1
    else 0;

#
# Identify first bar of any day and last bar of any day on chart
#
AddChartBubble(
    firstBarOfDay and ShowStartEnd,
    close,
    "First Bar of Day" +BarNumber(),
    Color.GREEN,
    yes);

AddChartBubble(
    lastBarOfDay and ShowStartEnd,
    close,
    "Last Bar of Day" +BarNumber(),
    Color.GREEN,
    no);

# High_Low_range_of today

#Looking to Setup A High-Low Range of Today

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

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

#1) Only using the First and last bar of today candles on any timeframe.
#def barsfromopen = (RegularTradingstart(GetYYYYMMDD())- GetTime() )/ GetAggregationPeriod();
#input  bars = 118;


#2) Find the high and low starting from 1st bat of today + MoveBarsForward candles.

# find 1st and last bar of today
def barNumber = if firstBarOfDay then  BarNumber() else 0 ;
def firstBarOfToday = HighestAll(  barNumber) + Bars_To_Skip;
AddVerticalLine(firstBarOfToday == bn , "-", Color.WHITE);

def zlastbarnum = if lastBarOfDay then  BarNumber() else 0 ;
def LastBarofTOday = HighestAll(  zlastbarnum);


#get HIGH of today starting the firstBarOfToday + Bars_To_Skip

def zhigh = if bn > firstBarOfToday then  high else nan;
def zhigh2 =  HighestAll(  zhigh);
def zhighest =  if bn >  firstBarOfToday then zhigh2 else  nan;
 

def hi = zhighest;
def hi2 = (hi == high);

# Get Low of today starting the firstBarOfToday + Bars_To_Skip
def zlow = if bn > firstBarOfToday   then  low else nan;;
def zlow2 =  LowestAll(  zlow);
def zlowest =  if bn >  firstBarOfToday  then zlow2 else  nan;

def lo = zlowest;
def lo2 = (lo == low);


input hilo_arrows = yes;
plot z1 = if hilo_arrows and hi2 then high * 1.0005 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  or bn > LastBarofTOday  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 "Sell Call" 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.

#buy put or sell call
def buyput = if close[1] crosses below hilo then 1 else 0;
AddChartBubble(buyput, high * 1.0001, "Sell Call", Color.YELLOW, 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  or bn > LastBarofTOday  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 or sell put
def lohi = if bn == 1 or bn > LastBarofTOday 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 "Sell Put" 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.
# buy call is sell put
def buycall = if close[1] crosses above lohi then 1 else 0;
AddChartBubble(buycall, low * 0.9999, "Sell Put", Color.YELLOW, 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  or bn > LastBarofTOday  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

#EOF
Is there a way to add fib to the indicator? Since the indicator ignores premarket price action, will it not give late signals on 15m and 30m?
 

Attachments

  • e30qsk0.png
    e30qsk0.png
    429.4 KB · Views: 64
Last edited:
@fskhan,
This is really interesting code, I like this a lot! I'm still working on a version that doesn't repaint after confirmation, but the option to start the barcount after market open is definitely intriguing -- I may add that open to my version as well!

As for the version that I'm working on, does anyone know how swing highs/lows are counted in strategies? Because the logic that goes into them still requires a highest high and lowest low to be confirmed first, which likely results in some "repainting" until that highest/lowest value is final. A somewhat visual indication is used here:

YPqKYuA.png


I'm still working on removing the secondary signals within each zone, but you can hopefully see my concern about counting the repainting: In the first image, which is present in @fskhan 's version too, we see a lower swing low from the first candle of the day, so a second call signal is generated around 11am -- then later, around 1pm we see a slightly higher high, so the signal is remade once again.

My concern is that with this minor "repainting", we may still see slightly skewed results, but I'm not sure how else to find swing highs/lows without some small measure of repainting. I'll check how this study performs tomorrow during the market to see if it's any easier to follow.
 
Last edited:
@fskhan,
This is really interesting code, I like this a lot! I'm still working on a version that doesn't repaint after confirmation, but the option to start the barcount after market open is definitely intriguing -- I may add that open to my version as well!

As for the version that I'm working on, does anyone know how swing highs/lows are counted in strategies? Because the logic that goes into them still requires a highest high and lowest low to be confirmed first, which likely results in some "repainting" until that highest/lowest value is final. A somewhat visual indication is used here:

YPqKYuA.png


I'm still working on removing the secondary signals within each zone, but you can hopefully see my concern about counting the repainting: In the first image, which is present in @fskhan 's version too, we see a lower swing low from the first candle of the day, so a second call signal is generated around 11am -- then later, around 1pm we see a slightly higher high, so the signal is remade once again.

My concern is that with this minor "repainting", we may still see slightly skewed results, but I'm not sure how else to find swing highs/lows without some small measure of repainting. I'll check how this study performs tomorrow during the market to see if it's any easier to follow.

Thanks indeed.

1. we see a lower swing low from the first candle of the day, so a second call signal is generated around 11am -- then later, around 1pm we see a slightly higher high, so the signal is remade once again.
To help me think better, could you please elaborate a bit? This study only uses CYAN arrows. YELLOW Arrows are from another study. But still I need to understand what is needed to help me think better.

2. how swing highs/lows are counted in strategies?
Do you intend to count high/lows in a day or bars between A High and a LOW?
 
@fskhan,
This is really interesting code, I like this a lot! I'm still working on a version that doesn't repaint after confirmation, but the option to start the barcount after market open is definitely intriguing -- I may add that open to my version as well!

As for the version that I'm working on, does anyone know how swing highs/lows are counted in strategies? Because the logic that goes into them still requires a highest high and lowest low to be confirmed first, which likely results in some "repainting" until that highest/lowest value is final. A somewhat visual indication is used here:

YPqKYuA.png


I'm still working on removing the secondary signals within each zone, but you can hopefully see my concern about counting the repainting: In the first image, which is present in @fskhan 's version too, we see a lower swing low from the first candle of the day, so a second call signal is generated around 11am -- then later, around 1pm we see a slightly higher high, so the signal is remade once again.

My concern is that with this minor "repainting", we may still see slightly skewed results, but I'm not sure how else to find swing highs/lows without some small measure of repainting. I'll check how this study performs tomorrow during the market to see if it's any easier to follow.
Well if you look at it, the 9:30 trend is ends when the put signal is generated. The 11 am call signal is a new play. The 1 pm put signal is a new play as well. That's how I would have played those but since it's not repainting, it looks bad. I would say you make the strategy backtest the first time the signal is generated and that first move. Once a new buy call signal is generated, that ends that indicator signal even if it rejects at the buy put line up top.
 
Well if you look at it, the 9:30 trend is ends when the put signal is generated. The 11 am call signal is a new play. The 1 pm put signal is a new play as well. That's how I would have played those but since it's not repainting, it looks bad. I would say you make the strategy backtest the first time the signal is generated and that first move. Once a new buy call signal is generated, that ends that indicator signal even if it rejects at the buy put line up top.

Yeah, I'm happy to put this code out in a day or two when the work feels more complete -- I definitely want to make it a bit more aesthetically pleasing, as the previous signals not disappearing is currently making the chart look pretty crowded. For the most part, the signals on this version do match the signals shown by the original study when covered in the same period at least.
 
For the $200M worth of puts, go to Unusual Whales --> Market Overview --> Daily Market Tide. Look at 2 pm on that chart for Friday if it's still available. It will show that in the last hour $200M worth of puts were bought and $50k worth of calls were sold. The market tide is almost even now setting us up for either a choppy Monday or one of the two hedging to protect their positions which will be the catalyst for a big move.

As for your image, this was taken after the market has closed. You have to see the data in real time to truly catch it. What you are looking for is an exclamation point beside the Time column instead of the warning sign (which lets you know the option may have multiple legs like a call credit spread). The exclamation point lets you know that the Volume for the trade was larger than the OI. I try to look for the ones that don't have any legs attached to them and they are directional only. This tells me of extreme bias for that position and direction.

Unfortunately, at any level, there are compulsive gamblers even with big premiums so you need to use it as an area of confluence and don't just pick the strike because it's directional only. I hope this is a good explanation of my thought process.

Thank you, I can see now exactly what you're talking about on Daily Market Tide. It looks like that section of the Unusual Whales platform doesn't use filters. The section that uses filters is the one I screenshotted, and I understand you're saying that you also watch that (in addition to Daily Market Tide) with the filters set so that you can see the particular, individual directional bets that are taking place.

The ones with the exclamation points (for "Volume>Open Interest") were hidden because I had the filter condition for "Size>Open Interest" and it seems that I need to switch it to "Volume>Open Interest" instead for these to show up:

AfaS1AI.png


It seems that having both of these switched on, instead of only the circled one, likewise causes the rows with exclamation points to not show up as results.
 
Last edited:
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
547 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