Join useThinkScript to post your question to a community of 21,000+ developers and traders.
Where do you find a script for trend pivots and volume wave?Honestly macd is a great, so are bollingers, but its even greater to understand what bolingers are actually doing, they are taking the standard deviation, meaning the average extreme moves of the last (usually can be changed) 21 bars, look into what standard deviations are, all indicators do is show you a different way that price is moving, like it simplifies the idea that price is going up or down, the most simple form of this that i have come across is THE STRAT, this will allow you to visualize price action, trading without understand what the indicators are actually doing is only seeing the result, trading "indicators" are not the way to trade, but they do help you visualise what price is doing, one may argue that if everyone is looking at the same indicator than it becomes a self-fulfilling prophecy, meaning if everyone is looking at macd to across over to green than to buy than it works, or if everyone is looking at Fibonacci than it might work, i once saw a post by this creator of indicators name mobious, and he stated that more than three indicators is too much. read this
I use this indicator with fast , slow , macd values cut in half along with others to day trade and it works quite well . Thanks@rovo Sorry for delayed rsponse.
AVG line is white line labeled SMA in your photo in post 54
midline is safe buy = orange line
Stages would be;
1. Break off outer band if following an outer band
2. Color change of MACD line
3. Cross AVG line
4. Cross midline
Main signal is cross of MACD and midline.
# Ultimate MACD by Horserider 8/30/2019
# Standard version
# Also have short and long term versions. Can accomplish all three by just adjusting inputs to fit your trading style.
# Standard MACD 12,26,9 BB length 20.
# Short term MACD 6, 13, 6 BB length 5.
# Long term MACD 48, 104, 36 BBlength 20.
# Added zero line on suggestion of Ahmar824 1/12/2019.
input fastLength = 12;
input slowLength = 26;
input MACDLength = 9;
input AverageTypeMACD = {SMA, default EMA, HMA, Wilders};
input price = close;
input displace = 0;
def MACD_Data = MACD(fastLength = fastLength, slowLength = slowLength, MACDLength = MACDLength);
def MACD_Line = MACD_Data;
def state = if MACD_Line > MACD_Line[1] then 1 else
if MACD_Line < MACD_Line[1] then -1 else 0 ;
##Long
AddOrder(OrderType.BUY_TO_OPEN, condition = (STATE crosses above 0));
AddOrder(OrderType.SELL_TO_CLOSE, condition = (STATE crosses below 0));
https://usethinkscript.com/threads/...nt-to-successful-trading-in-thinkorswim.6114/I am asking the catalog of studies, not the place where they will be shown in chart. For example, RSI is a momenton indicator, MA, EMA, and MACD is trend indicator, etc.
Since horserider emphasied many time in this forum, do not use (recommend) studies or indicators from the same catalog. So he might has a complete list of catalog of studies (indicator), or maybe some optimazation combination of indicators from different catalog.
see post #34Hi @horserider is there a scanner that indicates when the MACD Line turns from RED to GREEN or vice versa on your indicator?
Price action is looking at a single candle. Whereas the MACD is looking at a group of candles.Hello @horserider/@BenTen,
Thank you for the script. I've been checking it out and it's amazing. I'm really new to all this and had a question.
What's the reason sometimes the MACD is a different color from the candles. So price if moving down but the MACD color is green?
It doesn't happen all the time but I have seen situations where the MACD is a different color from the price action.
Thanks in advance.
What do you consider Short, Standard and Long term?Here is a MACD indicator for ThinkorSwim. It uses a color coded MACD line to show changes. There is a moving average of the MACD signal line. And MACD bands to show volatility. The signal would be the cross of MACD (Green/RED) and signal line (White). A photo is also below to give tips on trading the indicator. The lengths can be adjusted to suit your trading. (Since the below photo zero line was added)
Original post is below with updated standard code.
Any questions just ask.
Here is the code. Code updated to current version:
Code:# # Ultimate MACD by Horserider 8/30/2019 # Standard version # Also have short and long term versions. Can accomplish all three by just adjusting inputs to fit your trading style. # Standard MACD 12,26,9 BB length 20. # Short term MACD 6, 13, 6 BB length 5. # Long term MACD 48, 104, 36 BB length 20. # Added zero line on suggestion of Ahmar824 1/12/2019. declare lower; input fastLength = 12; input slowLength = 26; input MACDLength = 9; input AverageTypeMACD = {SMA, default EMA, Wilders}; input price = close; input displace = 0; def MACD_Data = MACD(fastLength = fastLength, slowLength = slowLength, MACDLength = MACDLength); plot MACD_Line = MACD_Data; MACD_Line.DefineColor("Up", Color.GREEN); MACD_Line.DefineColor("Down", Color.RED); MACD_Line.DefineColor("Even", Color.WHITE); MACD_Line.AssignValueColor(if MACD_Line > MACD_Line[1] then MACD_Line.Color("Up") else (if MACD_Line == MACD_Line[1] then MACD_Line.Color("Even") else MACD_Line.Color("Down"))); MACD_Line.SetLineWeight(3); plot zero = 0; zero.setDefaultColor(color.LIGHT_ORANGE); zero.setLineWeight (1) ; def Value; plot Avg; switch (AverageTypeMACD) { case SMA: Value = Average(price, fastLength) - Average(price, slowLength); Avg = Average(Value, MACDLength); case EMA: Value = ExpAverage(price, fastLength) - ExpAverage(price, slowLength); Avg = ExpAverage(Value, MACDLength); case Wilders: Value = WildersAverage(price, fastLength) - WildersAverage(price, slowLength); Avg = ExpAverage(Value, MACDLength); } Avg.SetDefaultColor(Color.WHITE); #plot BB; #Bollinger BandsSMA,EMA input AverageTypeBB = {default SMA, EMA, HMA}; input displaceBB = 0; input lengthBB = 20; input Num_Dev_Dn = -2.0; input Num_Dev_up = 2.0; plot upperBand; plot lowerBand; def midline; switch (AverageTypeBB) { case SMA: upperBand = reference BollingerBands(MACD_Line, displaceBB, lengthBB, Num_Dev_Dn, Num_Dev_up).UpperBand; lowerBand = reference BollingerBands(MACD_Line, displaceBB, lengthBB, Num_Dev_Dn, Num_Dev_up).LowerBand; midline = reference BollingerBands(MACD_Line, displaceBB, lengthBB, Num_Dev_Dn, Num_Dev_up).Midline; case EMA: upperBand = reference BollingerBands(MACD_Line, displaceBB, lengthBB, Num_Dev_Dn, Num_Dev_up, averageType = AverageType.EXPONENTIAL).UpperBand; lowerBand = reference BollingerBands(MACD_Line, displaceBB, lengthBB, Num_Dev_Dn, Num_Dev_up, averageType = AverageType.EXPONENTIAL).LowerBand; midline = reference BollingerBands(MACD_Line, displaceBB, lengthBB, Num_Dev_Dn, Num_Dev_up, averageType = AverageType.EXPONENTIAL).Midline; case HMA: upperBand = reference BollingerBands(MACD_Line, displaceBB, lengthBB, Num_Dev_Dn, Num_Dev_up, averageType = AverageType.EXPONENTIAL).UpperBand; lowerBand = reference BollingerBands(MACD_Line, displaceBB, lengthBB, Num_Dev_Dn, Num_Dev_up, averageType = AverageType.EXPONENTIAL).LowerBand; midline = reference BollingerBands(MACD_Line, displaceBB, lengthBB, Num_Dev_Dn, Num_Dev_up, averageType = AverageType.EXPONENTIAL).Midline; } upperBand.SetDefaultColor(Color.GRAY); upperBand.DefineColor("Up", Color.CYAN); upperBand.DefineColor("Down", Color.PINK); upperBand.DefineColor("Even", Color.GRAY); upperBand.AssignValueColor(if upperBand > upperBand[1] and lowerBand < lowerBand[1] then upperBand.Color("Up") else (if upperBand < upperBand[1] and lowerBand > lowerBand[1] then upperBand.Color("Down") else upperBand.Color("Even"))); upperBand.SetLineWeight(2); lowerBand.SetDefaultColor(Color.GRAY); lowerBand.DefineColor("Up", Color.CYAN); lowerBand.DefineColor("Down", Color.PINK); lowerBand.DefineColor("Even", Color.GRAY); lowerBand.AssignValueColor(if upperBand > upperBand[1] and lowerBand < lowerBand[1] then upperBand.Color("Up") else (if upperBand < upperBand[1] and lowerBand > lowerBand[1] then upperBand.Color("Down") else upperBand.Color("Even"))); plot midline1 = midline;
Update to show versatility of the study to fit different trading styles. Will include shares to each variation but same can be accomplished by changing the inputs. Added a zero line.
Standard MACD 12,26,9 BB length 20. https://tos.mx/X1IBznK
Short term MACD 6, 13, 6 BB length 5. https://tos.mx/tpa1Ek8
Long term MACD 48, 104, 36 BB length 20. https://tos.mx/iUs5wqK
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
P | Ultimate MACD For ThinkOrSwim | Indicators | 16 | |
The Ultimate Buy and Sell Indicator for ThinkOrSwim | Indicators | 5 | ||
Ultimate RSI [LuxAlgo] for ThinkOrSwim | Indicators | 12 | ||
Ultimate Bullish Cross using Price Momentum and Volume For SwingTrading | Indicators | 26 | ||
YungTrader's Ultimate Indicator | Indicators | 685 |
Start a new thread and receive assistance from our community.
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.
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.