Rob Smith's The STRAT Indicator for ThinkorSwim

Cribbage

New member
I tried to update the Radar TFC labels to include the same color scheme as the Strat Numbers study but haven't been able to get it to work. Any advice?


Code:
Declare upper;
 
input Time_Frame = aggregationPeriod.DAY;

#Scenarios by Pelonsax

def H = high(period = Time_Frame);
def L = low(period = Time_Frame);
def C = close(period = Time_Frame);
def O = open(period = Time_Frame);

def insidebar =  (H < H[1] and L > L[1]) or (H == H[1] and L > L[1]) or (H < H[1] and L == L[1]) or (H == H[1] and L == L[1]);
def outsidebar =  H  > H[1] and L <  L[1];
def twoup  = H > H[1] and L >= L[1];
def twodown  = H <= H[1] and L < L[1];

AddLabel(yes, if Time_Frame == aggregationPeriod.YEAR then "Y"
    else
    if Time_Frame == aggregationPeriod.QUARTER then "Q"
    else
    if Time_Frame == aggregationPeriod.MONTH then "M"
    else
    if Time_Frame == aggregationPeriod.WEEK then "W"
    else
    if Time_Frame == aggregationPeriod.FOUR_DAYS then "4D"
    else
    if Time_Frame == aggregationPeriod.THREE_DAYS then "3D"
    else
    if Time_Frame == aggregationPeriod.TWO_DAYS then "2D"
    else
    if Time_Frame == aggregationPeriod.DAY then "D"
    else
    if Time_Frame == aggregationPeriod.FOUR_HOURS then "4H"
    else
    if Time_Frame == aggregationPeriod.TWO_HOURS then "2H"
    else
    if Time_Frame == aggregationPeriod.HOUR then "60m"
    else
    if Time_Frame == aggregationPeriod.THIRTY_MIN then "30m"
    else
    if Time_Frame == aggregationPeriod.TWENTY_MIN then "20m"
    else
    if Time_Frame == aggregationPeriod.FIFTEEN_MIN then "15m"
    else
    if Time_Frame == aggregationPeriod.TEN_MIN then "10m"
    else
    if Time_Frame == aggregationPeriod.FIVE_MIN then "5m"
    else
    if Time_Frame == aggregationPeriod.FOUR_MIN then "4m"
    else
    if Time_Frame  == aggregationPeriod.THREE_MIN then "3m"
    else
    if Time_Frame == aggregationPeriod.TWO_MIN then "2m"
    else
    if Time_Frame  == aggregationPeriod.MIN then "1m"
    else "",
if insidebar then color.yellow else if outsiderbar then color.magenta else if twoup then color.green else if twodown color.red else color.white);
 

Pelonsax

Active member
VIP
Sorry guys, i honestly haven't had much free time on my hands, which is why I've been AWOL. No clue when or if I'll be able to adress these issues. If anyone who knows how to code would like to weigh in and offer some help it would be most welcome. Thank you all for understanding.
 

Cribbage

New member
Sorry guys, i honestly haven't had much free time on my hands, which is why I've been AWOL. No clue when or if I'll be able to adress these issues. If anyone who knows how to code would like to weigh in and offer some help it would be most welcome. Thank you all for understanding.
No sweat Pelonsax - You've done a ton already.
 

viper8690

New member
@Pelonsax, I have been skulking around this site for awhile and never really saw the need to register as most of the questions are asked by other people on this forum but I saw it necessary to register just so I could thank you.

I'm new to trading in general and as everyone knows it can be disorientating trying to figure out strategies, grail-indicators (I know, no such thing), etc.

There are 2 things that I feel are important for me which is price action and following the trend. The strat kind of calls to me for these 2 reasons. I don't know if it's something that I'm going to actually implement but at the very least it's helping me in understanding price action and categorizing moves.

What you have done for the indicators is really amazing. On top of that, you have provided it for free. On top of that, you have created videos explaining everything. These indicators provide more value than any paid indicator that I have come across.

Really you are the man and I can't thank you enough for all of the work that you have done for this.
 

Pelonsax

Active member
VIP
@Pelonsax, I have been skulking around this site for awhile and never really saw the need to register as most of the questions are asked by other people on this forum but I saw it necessary to register just so I could thank you.

I'm new to trading in general and as everyone knows it can be disorientating trying to figure out strategies, grail-indicators (I know, no such thing), etc.

There are 2 things that I feel are important for me which is price action and following the trend. The strat kind of calls to me for these 2 reasons. I don't know if it's something that I'm going to actually implement but at the very least it's helping me in understanding price action and categorizing moves.

What you have done for the indicators is really amazing. On top of that, you have provided it for free. On top of that, you have created videos explaining everything. These indicators provide more value than any paid indicator that I have come across.

Really you are the man and I can't thank you enough for all of the work that you have done for this.
Thank you very much for your kindness. That is very encouraging to me.
 

Pelonsax

Active member
VIP
is your chart on a timeframe that supports the labels? If you‘re on a daily and expect to see intraday, it won’t work.
Thats not just my chart. Any TOS study will only work on the aggregation of the chart or higher, never lower
 

bigshow3

New member
Thank you. I was able to do the 1 Bar Rev Strat and the Inside Bull Break. The 2 Bar Rev Strat scan is looking for a 1-2dn-2up and the Thinkscript Editor says "no such function:TwoDown at 1:1". I'm not quite sure what that means, but it won't let me change it to "TwoUp", since I'd be looking for a 1-2up-2dn @KCali Did you ever figure this out because I've Benn trying to scan that as well with the same error message?
 

Pelonsax

Active member
VIP
You have to watch the video on how to make the scenarios scan first and save them as separate studies and then do the actionable signal scan the way I demonstrate in my video.
 

tradecombine

New member
Has anyone had any real world luck with The Strat?
Yes. I have.
I'm a little confused at what is the optimal setup that people look for in terms of the numbered bars? Can someone please share their favs? @skychemist5 and if there is an easier way to simply setup buy/sell arrows on the chart instead of manually having to figure out the numbered candles? Thanks
optimal setup would be subjective (some people prefer trading off inside bars, other prefer looking for something coming back off the bottom (or top) of a broadening formation.

What I look for is something near the edge of the broadening formation while waiting for an indication that price is moving in the opposite direction.

As far as what you're looking for, the main idea is that you're hoping to catch the next 2-candle (or a 2 that becomes a 3).

The way I trade it is fairly simple:
I develop a thesis of whether I think something is going up or down, and then I set my entry, target, and stop. This is how I do it whether it's an option or a stock trade. (I tend to use conditional orders for option trades.)

For example: (using TSLA as an example, of wanting to trade a 2-2 Bearish Reversal
LDwlLsL.png


uD39yLX.png




So, you have to develop a thesis about where you think price will go. You have to "predict" what you think the pattern will be.
(You'd check your higher time frames, and draw broadening formations, and figure out which way you'd most likely think TSLA would go.)
If you thought TSLA was going down, then you'd enter short @ 730.44, and your profit target would be at 718.62. (Note: Some people like to go a penny beyond, and they'd be going short at 730.43). I don't go with a stop-loss that is bigger than half my target.

Basically, you'd be guessing that if price dropped all the way to 730.44, it might continue dropping until it got to 718.62.

(Caution: If trading theSTRAT don't use a vanilla LIMIT order, make sure to use a STOP order, or a STOP-LIMIT order, so that you can trigger the trade at the Price Level that you really want to enter. A vanilla LIMIT order might give you a more FAVORABLE price of entry, but it could potentially get you in the deal PRIOR TO your desired trigger point.)

If you're the type who wants to strictly enter off one side of the candle and stop-loss at the other side of the entry candle, then make sure you look for price contractions from inside bars (1s), or double-inside bars (1-1), or maybe find some small-magnitude directional bars (2s). Then, you can set a tighter stop-loss that way .


You can even just use conditional orders to enter the trade at certain levels.



Example: You're looking to trade a 2 up, 2 down reversal combo. You just look for the 2 up, and you're guessing at the 2-down is coming next. It's maybe an educated guess, because you're guessing based upon your time frame analysis, broadening formation, and where the overall trend of the market appears to be. If all of those points are in agreement for you, then you're more likely to be successful, but it's still a guess.

If you're looking for an "easy" way, you can get "actionable signals", yes, but the way ThinkOrSwim works, you need to have the chart loaded to get an alert that you could immediately act upon. (Either that, or you use an auto-trading platform.) For an example of getting actionable signals, you can look at "Alex's Options" on Youtube. He does his research the night before, but during the morning trading session, you can see charts loaded for getting alerts on high volume symbols (tighter spreads). He has videos posted on his channel, so that might help you with ideas.
Tried the strat but not for me, hope someone is able to make some real money with this. Like someone said too much hindsight. All the stuff I see and read out there is “after the fact”. I did learn a lot like using MTF analysis which I am able to take away and broadening formations happen everywhere.

Trading theSTRAT is just like trading any other strategy. You get a thesis, and you see if it plays out, or not.

By the time that last bar is forming, you're already too late (as you probably already observed.) You can see that last bar hitting the entry trigger live, but if you're not right on it (i.e.: using automation or monitoring the charts, you might enter too late, and you don't want to chase.

So, you're not trading the last bar, you're trading off that next-to-last bar, and you're "predicting" what that next bar will be (unless you're trading live and watching charts like a hawk or using automation)

See my TSLA example above in this post.

If you don't have a lot of time to trade during the day (like me) You could do your chart studies at night, pre-enter your entries, targets, and stops across multiple symbols, and then come back later to see how they did. If you can't stomach that, then just watch the charts live or leverage automation.

Hope this makes sense.
 

tradecombine

New member
Yes. I have.

optimal setup would be subjective (some people prefer trading off inside bars, other prefer looking for something coming back off the bottom (or top) of a broadening formation.

What I look for is something near the edge of the broadening formation while waiting for an indication that price is moving in the opposite direction.

As far as what you're looking for, the main idea is that you're hoping to catch the next 2-candle (or a 2 that becomes a 3).

The way I trade it is fairly simple:
I develop a thesis of whether I think something is going up or down, and then I set my entry, target, and stop. This is how I do it whether it's an option or a stock trade. (I tend to use conditional orders for option trades.)

For example: (using TSLA as an example, of wanting to trade a 2-2 Bearish Reversal
LDwlLsL.png


uD39yLX.png




So, you have to develop a thesis about where you think price will go. You have to "predict" what you think the pattern will be.
(You'd check your higher time frames, and draw broadening formations, and figure out which way you'd most likely think TSLA would go.)
If you thought TSLA was going down, then you'd enter short @ 730.44, and your profit target would be at 718.62. (Note: Some people like to go a penny beyond, and they'd be going short at 730.43). I don't go with a stop-loss that is bigger than half my target.

Basically, you'd be guessing that if price dropped all the way to 730.44, it might continue dropping until it got to 718.62.

(Caution: If trading theSTRAT don't use a vanilla LIMIT order, make sure to use a STOP order, or a STOP-LIMIT order, so that you can trigger the trade at the Price Level that you really want to enter. A vanilla LIMIT order might give you a more FAVORABLE price of entry, but it could potentially get you in the deal PRIOR TO your desired trigger point.)

If you're the type who wants to strictly enter off one side of the candle and stop-loss at the other side of the entry candle, then make sure you look for price contractions from inside bars (1s), or double-inside bars (1-1), or maybe find some small-magnitude directional bars (2s). Then, you can set a tighter stop-loss that way .


You can even just use conditional orders to enter the trade at certain levels.



Example: You're looking to trade a 2 up, 2 down reversal combo. You just look for the 2 up, and you're guessing at the 2-down is coming next. It's maybe an educated guess, because you're guessing based upon your time frame analysis, broadening formation, and where the overall trend of the market appears to be. If all of those points are in agreement for you, then you're more likely to be successful, but it's still a guess.

If you're looking for an "easy" way, you can get "actionable signals", yes, but the way ThinkOrSwim works, you need to have the chart loaded to get an alert that you could immediately act upon. (Either that, or you use an auto-trading platform.) For an example of getting actionable signals, you can look at "Alex's Options" on Youtube. He does his research the night before, but during the morning trading session, you can see charts loaded for getting alerts on high volume symbols (tighter spreads). He has videos posted on his channel, so that might help you with ideas.


Trading theSTRAT is just like trading any other strategy. You get a thesis, and you see if it plays out, or not.

By the time that last bar is forming, you're already too late (as you probably already observed.) You can see that last bar hitting the entry trigger live, but if you're not right on it (i.e.: using automation or monitoring the charts, you might enter too late, and you don't want to chase.

So, you're not trading the last bar, you're trading off that next-to-last bar, and you're "predicting" what that next bar will be (unless you're trading live and watching charts like a hawk or using automation)

See my TSLA example above in this post.

If you don't have a lot of time to trade during the day (like me) You could do your chart studies at night, pre-enter your entries, targets, and stops across multiple symbols, and then come back later to see how they did. If you can't stomach that, then just watch the charts live or leverage automation.

Hope this makes sense.

Replying to my own post, TSLA didn't trigger the 2-2 Bearish reversal today, as it appears to have done a gap-fill instead. and gone in the opposite direction.

Note: The proposed trade would not have triggered, as it never hit the entry point on the daily. Like with any trade idea, you get your opinion (hopefully based on something you've tested) and you see what happens. In this case, it didn't happen.
MFBpUv1.png

Hope this makes sense!
 

Pelonsax

Active member
VIP
Yes. I have.

optimal setup would be subjective (some people prefer trading off inside bars, other prefer looking for something coming back off the bottom (or top) of a broadening formation.

What I look for is something near the edge of the broadening formation while waiting for an indication that price is moving in the opposite direction.

As far as what you're looking for, the main idea is that you're hoping to catch the next 2-candle (or a 2 that becomes a 3).

The way I trade it is fairly simple:
I develop a thesis of whether I think something is going up or down, and then I set my entry, target, and stop. This is how I do it whether it's an option or a stock trade. (I tend to use conditional orders for option trades.)

For example: (using TSLA as an example, of wanting to trade a 2-2 Bearish Reversal
LDwlLsL.png


uD39yLX.png




So, you have to develop a thesis about where you think price will go. You have to "predict" what you think the pattern will be.
(You'd check your higher time frames, and draw broadening formations, and figure out which way you'd most likely think TSLA would go.)
If you thought TSLA was going down, then you'd enter short @ 730.44, and your profit target would be at 718.62. (Note: Some people like to go a penny beyond, and they'd be going short at 730.43). I don't go with a stop-loss that is bigger than half my target.

Basically, you'd be guessing that if price dropped all the way to 730.44, it might continue dropping until it got to 718.62.

(Caution: If trading theSTRAT don't use a vanilla LIMIT order, make sure to use a STOP order, or a STOP-LIMIT order, so that you can trigger the trade at the Price Level that you really want to enter. A vanilla LIMIT order might give you a more FAVORABLE price of entry, but it could potentially get you in the deal PRIOR TO your desired trigger point.)

If you're the type who wants to strictly enter off one side of the candle and stop-loss at the other side of the entry candle, then make sure you look for price contractions from inside bars (1s), or double-inside bars (1-1), or maybe find some small-magnitude directional bars (2s). Then, you can set a tighter stop-loss that way .


You can even just use conditional orders to enter the trade at certain levels.



Example: You're looking to trade a 2 up, 2 down reversal combo. You just look for the 2 up, and you're guessing at the 2-down is coming next. It's maybe an educated guess, because you're guessing based upon your time frame analysis, broadening formation, and where the overall trend of the market appears to be. If all of those points are in agreement for you, then you're more likely to be successful, but it's still a guess.

If you're looking for an "easy" way, you can get "actionable signals", yes, but the way ThinkOrSwim works, you need to have the chart loaded to get an alert that you could immediately act upon. (Either that, or you use an auto-trading platform.) For an example of getting actionable signals, you can look at "Alex's Options" on Youtube. He does his research the night before, but during the morning trading session, you can see charts loaded for getting alerts on high volume symbols (tighter spreads). He has videos posted on his channel, so that might help you with ideas.


Trading theSTRAT is just like trading any other strategy. You get a thesis, and you see if it plays out, or not.

By the time that last bar is forming, you're already too late (as you probably already observed.) You can see that last bar hitting the entry trigger live, but if you're not right on it (i.e.: using automation or monitoring the charts, you might enter too late, and you don't want to chase.

So, you're not trading the last bar, you're trading off that next-to-last bar, and you're "predicting" what that next bar will be (unless you're trading live and watching charts like a hawk or using automation)

See my TSLA example above in this post.

If you don't have a lot of time to trade during the day (like me) You could do your chart studies at night, pre-enter your entries, targets, and stops across multiple symbols, and then come back later to see how they did. If you can't stomach that, then just watch the charts live or leverage automation.

Hope this makes sense.
Thank you
 

roughsleeper

New member
Replying to my own post, TSLA didn't trigger the 2-2 Bearish reversal today, as it appears to have done a gap-fill instead. and gone in the opposite direction.

Note: The proposed trade would not have triggered, as it never hit the entry point on the daily. Like with any trade idea, you get your opinion (hopefully based on something you've tested) and you see what happens. In this case, it didn't happen.
MFBpUv1.png

Hope this makes sense!

have you tried a strat that sets up both long and short position triggers on both sides of these trades? curious if that has worked for you / anyone with The Strat.
 

vetrider

New member
If anyone who knows how to code would like to weigh in and offer some help it would be most welcome.
Just started messing around with this strat. I have no idea if I'll end up using it long term until I do some extensive testing, but I appreciate the time you've spent on the indicators and studies. As it's my nature, I can't help but want to jump in and make tweaks and improvements that will serve my own purposes when testing any given strategy or study.

Watching your 10 minute video, the very first thing that came to mind was I could combine the DanielBones label coloring into the exiting TFC study labels, and then make them conditionally hide not only based on the user's study setting, but also based on if the chart time frame selected supports the data required for that time frame to work (might help users not mistakenly belive they are seeing TFC for a time frame their chart doesn't have the required data for.

1) any reason I shouldn't do that?
2) would you like the finished code if I do combine them?
 

Traderschool

New member
I found this script for adding a custom watchlist column and it works fine for 15m and 30m. But it is not displaying correctly for 1h, nor 4h. I am sure it has to do with the aggregation periods not starting at market open. How do I force them to aggregate at market open?
Ruby:
#------------------------------------
#
# M T F S T R A T
# W A T C H L I S T
# a Study by Ramon DV. aka Pelonsax
#
#------------------------------------
#------------------------------------
# S T R A T R E V E R S A L S
#
# A study by Ramon DV. aka Pelonsax
#
# Version 1.0 8/01/20
#
# Version 2.0 8/4/20 Corrected errors in logic for scenarios
# Version 2.1 8/15/20 Added Reversals
# 9/15/20 added two previous bars and reversals for WL
#------------------------------------
# COLUMNS
#------------------------------------
def H = high;
def L = low;
def O = open;
def C = close;
#------------------------------------
# DEFINE SCENARIOS
#------------------------------------
def insidebar = (H < H[1] and L > L[1]) or (H == H[1] and L > L[1]) or (H < H[1] and L == L[1]) or (H == H[1] and L == L[1]);
def outsidebar = H > H[1] and L < L[1];

def insidebarup = insidebar and O < C;
def twoup = H > H[1] and L >= L[1];
def outsidebarup = outsidebar and O < C;
def insidebardown = insidebar and O > C;
def twodown = H <= H[1] and L < L[1];
def outsidebardown = outsidebar and O > C;


def insidebar1 = (H[1] < H[2] and L[1] > L[2]) or (H[1] == H[2] and L[1] > L[2]) or (H[1] < H[2] and L[1] == L[2]) or (H[1] == H[2] and L[1] == L[2]);
def outsidebar1 = H[1] > H[2] and L[1] < L[2];

def insidebarup1 = insidebar1 and O[1] < C[1];
def twoup1 = H[1] > H[2] and L[1] >= L[2];
def outsidebarup1 = outsidebar1 and O[1] < C[1];
def insidebardown1 = insidebar1 and O[1] > C[1];
def twodown1 = H[1] <= H[2] and L[1] < L[2];
def outsidebardown1 = outsidebar1 and O[1] > C[1];


def insidebar2 = (H[2] < H[3] and L[2] > L[3]) or (H[2] == H[3] and L[2] > L[3]) or (H[2] < H[3] and L[2] == L[3]) or (H[2] == H[3] and L[2] == L[3]);
def outsidebar2 = H[2] > H[3] and L[2] < L[3];

def insidebarup2 = insidebar2 and O[2] < C[2];
def twoup2 = H[2] > H[3] and L[2] >= L[3];
def outsidebarup2 = outsidebar2 and O[2] < C[2];
def insidebardown2 = insidebar2 and O[2] > C[2];
def twodown2 = H[2] <= H[3] and L[2] < L[3];
def outsidebardown2 = outsidebar2 and O[2] > C[2];

#------------------------------------
# DEFINE REVERSALS (Basic four)
#------------------------------------

# Bullish
def TwoOneTwoBull = twoup and insidebar1 and twodown2;
def TwoTwoBull = twoup and twodown1;
def ThreeBull = outsidebarup and (twodown1 or insidebar1 or outsidebardown1);
def ThreeOneTwoBull = twoup and insidebar1 and outsidebardown2;

# Bearish
def TwoOneTwoBear = twodown and insidebar1 and twoup2;
def TwoTwoBear = twodown and twoup2;
def ThreeBear = outsidebardown and (twoup1 or insidebar1 or outsidebarup1);
def ThreeOneTwoBear = twodown and insidebar1 and outsidebarup2;

#------------------------------------
# LABEL SECTION
#------------------------------------
AddLabel(yes,

(if twoup2 then “2U” else if twodown2 then “2D” else if insidebarup2 then “1U" else if insidebardown2 then “1D” else if outsidebarup2 then “3U” else if outsidebardown2 then “3D” else if insidebar2 and !insidebarup2 and !insidebardown2 then "1" else if outsidebar2 and !outsidebarup2 and !outsidebardown2 then "3" else “”) + “-“ +

(if twoup1 then “2U” else if twodown1 then “2D” else if insidebarup1 then “1U" else if insidebardown1 then “1D” else if outsidebarup1 then “3U” else if outsidebardown1 then “3D” else if insidebar1 and !insidebarup1 and !insidebardown1 then "1" else if outsidebar1 and !outsidebarup1 and !outsidebardown1 then "3" else “”)+ ”-“ +

(if twoup then “[2U]” else if twodown then “[2D]” else if insidebarup then “[1U]” else if insidebardown then “[1D]” else if outsidebarup then “[3U]” else if outsidebardown then “[3D]” else if insidebar and !insidebarup and !insidebardown then “[1]” else if outsidebar and !outsidebarup and !outsidebardown then “[3]” else “”), color.black);

assignbackgroundColor(if TwoOneTwoBull or TwoTwoBull or ThreeBull or ThreeOneTwoBull then color.cyan else if TwoOneTwoBear or TwoTwoBear or ThreeBear or ThreeOneTwoBear then color.magenta else if

!TwoTwoBull and
!ThreeBull and
!ThreeOneTwoBull and
!TwoOneTwoBear and
!TwoTwoBear and
!ThreeBear and
!ThreeOneTwoBear and
twoup then color.green else if

!TwoOneTwoBull and
!TwoTwoBull and
!ThreeBull and
!ThreeOneTwoBull and
!TwoOneTwoBear and
!TwoTwoBear and
!ThreeBear and
!ThreeOneTwoBear and
twodown then color.red else if

!TwoOneTwoBull and
!TwoTwoBull and
!ThreeBull and
!ThreeOneTwoBull and
!TwoOneTwoBear and
!TwoTwoBear and
!ThreeBear and
!ThreeOneTwoBear and
outsidebarup then color.dark_green else if

!TwoOneTwoBull and
!TwoTwoBull and
!ThreeBull and
!ThreeOneTwoBull and
!TwoOneTwoBear and
!TwoTwoBear and
!ThreeBear and
!ThreeOneTwoBear and
insidebarup then color.light_green else if

!TwoOneTwoBull and
!TwoTwoBull and
!ThreeBull and
!ThreeOneTwoBull and
!TwoOneTwoBear and
!TwoTwoBear and
!ThreeBear and
!ThreeOneTwoBear and
outsidebardown then color.dark_red else if

!TwoOneTwoBull and
!TwoTwoBull and
!ThreeBull and
!ThreeOneTwoBull and
!TwoOneTwoBear and
!TwoTwoBear and
!ThreeBear and
!ThreeOneTwoBear and
insidebardown then color.orange else if

!TwoOneTwoBull and
!TwoTwoBull and
!ThreeBull and
!ThreeOneTwoBull and
!TwoOneTwoBear and
!TwoTwoBear and
!ThreeBear and
!ThreeOneTwoBear and
!insidebarup and
!insidebardown and
insidebar then color.white else if

!TwoOneTwoBull and
!TwoTwoBull and
!ThreeBull and
!ThreeOneTwoBull and
!TwoOneTwoBear and
!TwoTwoBear and
!ThreeBear and
!ThreeOneTwoBear and
!outsidebardown and
!outsidebarup and
outsidebar then color.white

else color.current);
 

tradecombine

New member
I found this script for adding a custom watchlist column and it works fine for 15m and 30m. But it is not displaying correctly for 1h, nor 4h. I am sure it has to do with the aggregation periods not starting at market open. How do I force them to aggregate at market open?

The short answer:

Try this:

Chart Settings > Equities > Axis > Time
Unchecked =
Show Extended-hours Trading Session
Checked = Start aggregations at market open

2PlrwXz.png


The long answer:

Under Chart Settings for Equities, "Start aggregations at market open" appears to be impacted by whether or not Show Extended-hours Trading Session is turned on also.

Where the 1 hour and 4 hour candles start is impacted by two settings: Start aggregations at market open and Show Extended-Hours Trading session. Based on experiments shown below, Start aggregations at market open only works if Show Extended-Hours Trading session is UNCHECKED.

Option 1: Hourly candle start at 8:30
UNCHECK "Show Extended-Hours Trading session"
CHECK "Start aggregations at market open"


2PlrwXz.png


Notice Agilent open on 2021, October 1st = 157.15, and the hour chart started at 8:30 AM!

Ba3yPN3.png


Option 2: Hourly Candle start at 8:00
CHECK "Show Extended-Hours Trading session"
CHECK "Start aggregations at market open"


Sg8h6q7.png


Notice Agilent open on 2021, October 1st = 157.22, and the hour chart started at 8:00 AM!

I3TBpmv.png


Option 3: Hourly candle starts at 8:00
CHECK "Show Extended-Hours Trading session"
UNCHECK "Start aggregations at market open"


IuhlYct.png


Notice Agilent open on 2021, October 1st = 157.22, and the hour chart started at 8:00 AM!

I3TBpmv.png


Option 4: Hourly candle start at 8:00
UNCHECK "Show Extended-Hours Trading session"
UNCHECK "Start aggregations at market open"


23vAdAK.png


Notice Agilent open on 2021, October 1st = 157.22, and the hour chart started at 8:00 AM!

I3TBpmv.png
 

Similar threads

Top