The Big Four Chart SetUp For ThinkOrSwim

TradingNumbers

Active member
Newest Version v1.5
Here is the latest update. Also added labels.

0H1blUA.png

Code:
# The Big Four Indicator
# https://usethinkscript.com/threads/the-big-four-chart-setup.14711/
# v1.0 - GiantBull and TradingNumbers
# v1.1 - TradingNumbers - hiding vertical lines by ddefault and added arrows
# v1.2 - TradingNumbers - added TMO
# v1.3 - TradingNumbers - hold trend input added
# v1.4 - TradingNumbers - simplified options, added filter with TMO, and set conditions per GianBull parameters
# v1.5 - TradingNumbers - removed TMO color filter percentChg GiantBull, added labels

# Info Labels

input showLabels = yes;
AddLabel(showLabels, " The Big Four v1.5 ", Color.WHITE);

# AK Trend

def aktrend_input1 = 3;
def aktrend_input2 = 8;
def aktrend_price = close;

def aktrend_fastmaa = MovAvgExponential(aktrend_price, aktrend_input1);
def aktrend_fastmab = MovAvgExponential(aktrend_price, aktrend_input2);
def aktrend_bspread = (aktrend_fastmaa - aktrend_fastmab) * 1.001;

def cond1_UP = if aktrend_bspread > 0 then 1 else 0;
def cond1_DN = if aktrend_bspread <= 0 then -1 else 0;

# ZSCORE

def zscore_price = close;
def zscore_length = 20;
def zscore_ZavgLength = 20;

def zscore_oneSD = StDev(zscore_price, zscore_length);
def zscore_avgClose = SimpleMovingAvg(zscore_price, zscore_length);
def zscore_ofoneSD = zscore_oneSD * zscore_price[1];
def zscore_Zscorevalue = ((zscore_price - zscore_avgClose) / zscore_oneSD);
def zscore_avgZv = Average(zscore_Zscorevalue, 20);
def zscore_Zscore = ((zscore_price - zscore_avgClose) / zscore_oneSD);
def zscore_avgZscore = Average(zscore_Zscorevalue, zscore_ZavgLength);

def cond2_UP = if zscore_Zscore > 0 then 1 else 0;
def cond2_DN = if zscore_Zscore <= 0 then -1 else 0;

# Ehlers

def ehlers_length = 34;

def ehlers_price = (high + low) / 2;
def ehlers_coeff = ehlers_length * ehlers_price * ehlers_price - 2 * ehlers_price * Sum(ehlers_price, ehlers_length)[1] + Sum(ehlers_price * ehlers_price, ehlers_length)[1];
def ehlers_Ehlers = Sum(ehlers_coeff * ehlers_price, ehlers_length) / Sum(ehlers_coeff, ehlers_length);

def cond3_UP = if close > ehlers_Ehlers then 1 else 0;
def cond3_DN = if close <= ehlers_Ehlers then -1 else 0;

# Anchored Momentum

def amom_src = close;
def amom_MomentumPeriod = 10;
def amom_SignalPeriod = 8;
def amom_SmoothMomentum = no;
def amom_SmoothingPeriod = 7;

def amom_p = 2 * amom_MomentumPeriod + 1;
def amom_t_amom = if amom_SmoothMomentum == yes then ExpAverage(amom_src, amom_SmoothingPeriod) else amom_src;
def amom_amom = 100 * ( (amom_t_amom / ( Average(amom_src, amom_p)) - 1));
def amom_amoms = Average(amom_amom, amom_SignalPeriod);


def cond4_UP = if amom_amom > 0 then 1 else 0;
def cond4_DN = if amom_amom <= 0 then -1 else 0;

# TMO

def tmo_length = 30; #def 14
def tmo_calcLength = 6; #def 5
def tmo_smoothLength = 6; #def 3

def tmo_data = fold i = 0 to tmo_length with s do s + (if close > GetValue(open, i) then 1 else if close < GetValue(open, i) then - 1 else 0);
def tmo_EMA5 = ExpAverage(tmo_data, tmo_calcLength);
def tmo_Main = ExpAverage(tmo_EMA5, tmo_smoothLength);
def tmo_Signal = ExpAverage(tmo_Main, tmo_smoothLength);
def tmo_color = if tmo_Main > tmo_Signal then 1 else -1;

def cond5_UP = if tmo_Main <= 0 then 1 else 0;
def cond5_DN = if tmo_Main >= 0 then -1 else 0;

# Strategy

input Strategy_Confirmation_Factor = 4;
input Strategy_FilterWithTMO = no;
input Strategy_ColoredCandlesOn = yes;
input Strategy_VerticalLinesOn = no;
input Strategy_HoldTrend = yes;

def cond_UP = cond1_UP + cond2_UP + cond3_UP + cond4_UP;
def cond_DN = cond1_DN + cond2_DN + cond3_DN + cond4_DN;

def direction = if cond_UP >= Strategy_Confirmation_Factor and (!Strategy_FilterWithTMO or cond5_UP) then 1
                else if cond_DN <= -Strategy_Confirmation_Factor and (!Strategy_FilterWithTMO or cond5_DN) then -1
                else if !Strategy_HoldTrend and direction[1] == 1 and cond_UP < Strategy_Confirmation_Factor and cond_DN > -Strategy_Confirmation_Factor then 0
                else if !Strategy_HoldTrend and direction[1] == -1 and cond_DN > -Strategy_Confirmation_Factor and cond_UP < Strategy_Confirmation_Factor then 0
                else direction[1];

plot signal_up = direction == 1 and direction[1] < 1;
signal_up.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
signal_up.SetDefaultColor(Color.WHITE);
signal_up.Hide();
signal_up.HideBubble();
signal_up.HideTitle();

plot signal_dn = direction == -1 and direction[1] > -1;
signal_dn.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
signal_dn.SetDefaultColor(Color.WHITE);
signal_dn.Hide();
signal_dn.HideBubble();
signal_dn.HideTitle();

AssignPriceColor(if Strategy_ColoredCandlesOn then if direction == 1 then Color.LIGHT_GREEN else if direction == -1 then Color.RED else Color.GRAY else Color.CURRENT);

AddLabel(showLabels, if Strategy_ColoredCandlesOn then if direction == 1 then " Bullish " else if direction == -1 then " Bearish " else " Neutral " else " N/A ",
                     if Strategy_ColoredCandlesOn then if direction == 1 then Color.LIGHT_GREEN else if direction == -1 then Color.RED else Color.GRAY else Color.BLACK);

AddVerticalLine(Strategy_VerticalLinesOn and signal_up, "Buy", Color.LIGHT_GREEN);
AddVerticalLine(Strategy_VerticalLinesOn and signal_dn, "Sell", Color.RED);

Alert(signal_up[1], "Buy", Alert.BAR, Sound.DING);
Alert(signal_dn[1], "Sell", Alert.BAR, Sound.DING);
 
Last edited by a moderator:

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

I can't remember, if the ak trend is on that thread.

Links for the 4 indicators:
Anchored Momentum: https://tos.mx/buzNdWK
AK trend: https://tos.mx/ymhoN5R
Zscore indicator: https://tos.mx/ibBpRr6
Ehlers: https://tos.mx/14yaHql

I forgot to mention that I trade on a 3 min chart and I only trade SPY. The important part is to figure out when a trend has exhausted itself. I use a combo of support and resistance and also the TMO. Whenever it is overbought or oversold, I wait for price to reach a near-term resistance/support area and then watch for a buy/sell signal from the 4 indicators. If 3 out of the 4 indicators have fired a signal I am in the trade. I have tested about almost every indicator that has been posted on this website and I find these 4 to be pretty powerful when used together. I know there's many coders who have posted multiple indicators in one study such as the confirmation candles or the CSA indicators but unfortunately, I couldn't make money off of those.

I have been on this website for about a year now have successfully made $10,000 only last month starting my account from $1,500 using 4 indicators posted on here. I call them the big 4. Ehlers, anchored momentum, ak trend, and zscore. My strategy is simple. I wait until 3 out 4 of the indicators are either bullish or bearish to take on a trade. Over the years I have used other indicators as well but lost.
Shared Chart Link: http://tos.mx/M3STTOx Click here for --> Easiest way to load shared links
mEdtaSg.png
 
Last edited by a moderator:
There are hundreds of indicators that have been posted on here. I was wondering if anyone has actually made consistent money day trading any of the indicators that have been posted on here? If you are going to reply just please post the indicator you are using, your strategy, and how long you have been successful with it. I don't want to turn this into a "trading advice" thread where people post the same recycled advice that have been going around for years. Everyone knows that everyone has a different style and "indicators aren't the holy grail".

I'll go first and post my indicators and strategy. I have been on this website for about a year now have successfully made $10,000 only last month starting my account from $1,500 using 4 indicators posted on here. I call them the big 4. Ehlers, anchored momentum, ak trend, and zscore. My strategy is simple. I wait until 3 out 4 of the indicators are either bullish or bearish to take on a trade. Over the years I have used other indicators as well but lost. So, I am wondering what others have used to successfully day trade.

are these what you are using?

anchored momentum, ak trend
https://usethinkscript.com/threads/anchored-momentum-lazybear-for-thinkorswim.13097/


zscore
https://usethinkscript.com/threads/z-score-upper-indicator-for-thinkorswim.3896/
 
Last edited by a moderator:
@halcyonguy those are the correct links, but I am not sure if the ak trend is on that thread. I can't remember which one it was on.

Links for the 4 indicators:
Anchored Momentum: https://tos.mx/buzNdWK
AK trend: https://tos.mx/ymhoN5R
Zscore indicator: https://tos.mx/ibBpRr6
Ehlers: https://tos.mx/14yaHql

I forgot to mention that I trade on a 3 min chart and I only trade SPY. The important part is to figure out when a trend has exhausted itself. I use a combo of support and resistance and also the TMO. Whenever it is overbought or oversold, I wait for price to reach a near-term resistance/support area and then watch for a buy/sell signal from the 4 indicators. If 3 out of the 4 indicators have fired a signal I am in the trade. I have tested about almost every indicator that has been posted on this website and I find these 4 to be pretty powerful when used together. I know there's many coders who have posted multiple indicators in one study such as the confirmation candles or the CSA indicators but unfortunately, I couldn't make money off of those.
Thank you for sharing
 
You are right, sorry for the confusion. I am using the Ehler's Distant Coefficient that was posted by @Christopher84 which is inside the confirmation candles thread
Thanks for clarifying:) FWIW, last year I back tested both the DCF and the flex/reflex on 10 years worth of data. For the instruments and timeframes that I trade, the DCF did better. I am not a coder though, so it's possible I erred somewhere.

Best wishes and happy trading!
 
Thanks for clarifying:) FWIW, last year I back tested both the DCF and the flex/reflex on 10 years worth of data. For the instruments and timeframes that I trade, the DCF did better. I am not a coder though, so it's possible I erred somewhere.

Best wishes and happy trading!
I would put DCF in the top 5 most profitable indicators posted on this website. Once you find the right parameter for your timeframe it can seriously add a few extra 0's in the end of your account balance
 
@halcyonguy those are the correct links, but I am not sure if the ak trend is on that thread. I can't remember which one it was on.

Links for the 4 indicators:
Anchored Momentum: https://tos.mx/buzNdWK
AK trend: https://tos.mx/ymhoN5R
Zscore indicator: https://tos.mx/ibBpRr6
Ehlers: https://tos.mx/14yaHql

I forgot to mention that I trade on a 3 min chart and I only trade SPY. The important part is to figure out when a trend has exhausted itself. I use a combo of support and resistance and also the TMO. Whenever it is overbought or oversold, I wait for price to reach a near-term resistance/support area and then watch for a buy/sell signal from the 4 indicators. If 3 out of the 4 indicators have fired a signal I am in the trade. I have tested about almost every indicator that has been posted on this website and I find these 4 to be pretty powerful when used together. I know there's many coders who have posted multiple indicators in one study such as the confirmation candles or the CSA indicators but unfortunately, I couldn't make money off of those.
interesting.. thanks for the links! Could you share a chart and what you are looking for before taking a trade?
 
My trading has improved since changing to only the SPY and QQQ's (watching and trying to understand the nuances of these). For years I screened and dreamed with modest success. Years of trading has brought me down to a few trend indicators I call AsGoodAsItGets. Are they perfect...no! Are they helpful...yes! The market is like the ocean and doesn't care about my little sailboat (nor yours) but if I try to go with the flow using my AGAIG's indicators, and try to follow the money (trend) my days are better than they have been in years. When my indicators repaint, or show direction change, I get out and/or take any profits (or small losses) at that point. One can always get back in! Wanting to make "a little more" is where most losses occur. One never loses money when they take a profit (large or small). There is no "holy grail" which is why only a small percentage are profitable. UseThinkscript has been a big help to me in my learning process as I continue to read and try to learn from others.
 
My trading has improved since changing to only the SPY and QQQ's (watching and trying to understand the nuances of these). For years I screened and dreamed with modest success. Years of trading has brought me down to a few trend indicators I call AsGoodAsItGets. Are they perfect...no! Are they helpful...yes! The market is like the ocean and doesn't care about my little sailboat (nor yours) but if I try to go with the flow using my AGAIG's indicators, and try to follow the money (trend) my days are better than they have been in years. When my indicators repaint, or show direction change, I get out and/or take any profits (or small losses) at that point. One can always get back in! Wanting to make "a little more" is where most losses occur. One never loses money when they take a profit (large or small). There is no "holy grail" which is why only a small percentage are profitable. UseThinkscript has been a big help to me in my learning process as I continue to read and try to learn from others.
If day trading options SPY is the only logical security to trade based on volatility and volume. I don't count repainting indicators as indicators because there is no way to back test them properly as your results will always show up as 100% success although you could have had many false signals. However, in the world of trading you need to have an open mind and constantly challenge your paradigm so I will take a look at it the next few days to see how it performs with the TMO oversold/overbought areas. Just taking a look now the results do seem to be fairly well, but live price action can be a whole different story.
 
Thanks for your feedback - if you find an indicator that tells you the next minute, the next hour as relates to the market it is my hope that you will share it. My indicators look at trend and they show up in overbought/oversold areas and give me a pretty good idea what to expect but, as in life, things do seem to repaint occasionally!
 
If day trading options SPY is the only logical security to trade based on volatility and volume. I don't count repainting indicators as indicators because there is no way to back test them properly as your results will always show up as 100% success although you could have had many false signals. However, in the world of trading you need to have an open mind and constantly challenge your paradigm so I will take a look at it the next few days to see how it performs with the TMO oversold/overbought areas. Just taking a look now the results do seem to be fairly well, but live price action can be a whole different story.
@GiantBull could you share a screenshot of your chart and how you use those 4 indicators?
 
I'm sorry but I have other things on my chart that are VIP usethinkscript as well as other proprietary indicators. Those four work very well together
 
@halcyonguy those are the correct links, but I am not sure if the ak trend is on that thread. I can't remember which one it was on.

Links for the 4 indicators:
Anchored Momentum: https://tos.mx/buzNdWK
AK trend: https://tos.mx/ymhoN5R
Zscore indicator: https://tos.mx/ibBpRr6
Ehlers: https://tos.mx/14yaHql

I forgot to mention that I trade on a 3 min chart and I only trade SPY. The important part is to figure out when a trend has exhausted itself. I use a combo of support and resistance and also the TMO. Whenever it is overbought or oversold, I wait for price to reach a near-term resistance/support area and then watch for a buy/sell signal from the 4 indicators. If 3 out of the 4 indicators have fired a signal I am in the trade. I have tested about almost every indicator that has been posted on this website and I find these 4 to be pretty powerful when used together. I know there's many coders who have posted multiple indicators in one study such as the confirmation candles or the CSA indicators but unfortunately, I couldn't make money off of those.
If you can define the decisions to a mechanical list, I think I can combine all into a single indicator.

77ZYNTN.png
 
Would be cool to have all 4 as one vertical line signal red to short green to buy on one chart.
Agreed. I can combine the indicators but the following statement seems to be a manual process.
The important part is to figure out when a trend has exhausted itself. I use a combo of support and resistance and also the TMO. Whenever it is overbought or oversold, I wait for price to reach a near-term resistance/support area and then watch for a buy/sell signal from the 4 indicators.
 
Agreed. I can combine the indicators but the following statement seems to be a manual process.
There would be to some degree a manual process, but I think the following could be turned into a code which would be very cool and take up less space on the screen. I am not a coder but have thought about trying to do this. I tried to do it how the confirmation candles script is written. Maybe you could help fill in the missing puzzles. There would be 4 conditions for a buy signal:

def Condition 1 for AK Trend = bspread>zeroLine
def Condition 2 for Z Score = Zscore>0
def Condition 3 for Ehler's = close>ehlers
def Condition 4 for Momentum = if amom>0

For a sell signal it would be the opposite.

def Agreement level = condition 1+condition 2+condition 3+condition 4
input coloredCandlesOn = yes;
input Confirmation_Factor=3
def UP = Agreement_Level >= Confirmation_Factor;
def DOWN = Agreement_Level < Confirmation_Factor;
AssignPriceColor(if coloredCandlesOn and UP then Color.LIGHT_GREEN else if coloredCandlesOn and DOWN then Color.RED else Color.CURRENT);

This is how I planned on creating the script but if you have some other idea would be interested to see what it is. You're probable more experienced in coding than I am so I trust your judgement. Very interested to see if this could work! As for implementing the TMO to the script I have no idea on how to do that. Receiving buy/sell signals only if the TMO is oversold/overbought would be an added plus to the script.
 
There would be to some degree a manual process, but I think the following could be turned into a code which would be very cool and take up less space on the screen. I am not a coder but have thought about trying to do this. I tried to do it how the confirmation candles script is written. Maybe you could help fill in the missing puzzles. There would be 4 conditions for a buy signal:

def Condition 1 for AK Trend = bspread>zeroLine
def Condition 2 for Z Score = Zscore>0
def Condition 3 for Ehler's = close>ehlers
def Condition 4 for Momentum = if amom>0

For a sell signal it would be the opposite.

def Agreement level = condition 1+condition 2+condition 3+condition 4
input coloredCandlesOn = yes;
input Confirmation_Factor=3
def UP = Agreement_Level >= Confirmation_Factor;
def DOWN = Agreement_Level < Confirmation_Factor;
AssignPriceColor(if coloredCandlesOn and UP then Color.LIGHT_GREEN else if coloredCandlesOn and DOWN then Color.RED else Color.CURRENT);

This is how I planned on creating the script but if you have some other idea would be interested to see what it is. You're probable more experienced in coding than I am so I trust your judgement. Very interested to see if this could work! As for implementing the TMO to the script I have no idea on how to do that. Receiving buy/sell signals only if the TMO is oversold/overbought would be an added plus to the script.
I'll take a look a little later. We might want to have an input that states how many of the parts need to agree. It will make it more adjustable this way. We'll probably ask to move this portion of the discussion to a new thread from @MerryDay when we have a name for this combo indicator.
 
I'll take a look a little later. We might want to have an input that states how many of the parts need to agree. It will make it more adjustable this way. We'll probably ask to move this portion of the discussion to a new thread from @MerryDay when we have a name for this combo indicator.
Thanks for taking interest in this strategy! I think this part of the script I posted in my previous post would allow you to adjust how many parts you want to agree for a buy/sell signal:

input Confirmation_Factor=3
def Agreement level = condition 1+condition 2+condition 3+condition 4
def Agreement level = condition 1+condition 2+condition 3+condition 4

I'll work on a draft script over the weekend to see if my idea of creating the script would actually work or not. @MerryDay thanks for creating a new thread for this. I guess the name for this could be "The Big 4 Indicator". If @TradingNumbers or anyone else wants a different name, feel free to call it whatever you want.
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
357 Online
Create Post

Similar threads

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