Its been a long time!!!!, Here, I am back with another indicator bust. This time it is TTM_Trend sold by Trade The Market.

This is my interpretation of the indicator, There are some mismatches, but i consider it as minimum. On Thinkorswim I was able to match it exactly. May be its just the way Tradingview plots the arguments specified. Here is the concept for anyone who want to improve and match it to the actual.

Update: The mismatch occurs in high volatility zone. the painted bars highs and lows in Tradingview is different when compared to TOS.

Uday C Santhakumar
오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?
study("UCS_Trend", overlay=true) // My Interpretation of TTM Trend bars. It is really close to the actual. 

haclose = ohlc4
haopen = na(haopen[1]) ? (open + close) / 2 : (haopen[1] + haclose[1]) / 2
//hahigh = max(high, max(haopen, haclose))
//halow = min(low, min(haopen, haclose))

ccolor = haclose - haopen > 0 ? 1 : 0

inside6 = haopen <= max(haopen[6],haclose[6]) and haopen>=min(haopen[6],haclose[6]) and haclose <= max(haopen[6],haclose[6]) and haclose >= min(haopen[6],haclose[6]) ? 1 : 0

inside5 = haopen <= max(haopen[5],haclose[5]) and haopen>=min(haopen[5],haclose[5]) and haclose <= max(haopen[5],haclose[5]) and haclose >= min(haopen[5],haclose[5]) ? 1 : 0

inside4 = haopen <= max(haopen[4],haclose[4]) and haopen>=min(haopen[4],haclose[4]) and haclose <= max(haopen[4],haclose[4]) and haclose >= min(haopen[4],haclose[4]) ? 1 : 0

inside3 = haopen <= max(haopen[3],haclose[3]) and haopen>=min(haopen[3],haclose[3]) and haclose <= max(haopen[3],haclose[3]) and haclose >= min(haopen[3],haclose[3]) ? 1 : 0

inside2 = haopen <= max(haopen[2],haclose[2]) and haopen>=min(haopen[2],haclose[2]) and haclose <= max(haopen[2],haclose[2]) and haclose >= min(haopen[2],haclose[2]) ? 1 : 0

inside1 = haopen <= max(haopen[1],haclose[1]) and haopen>=min(haopen[1],haclose[1]) and haclose <= max(haopen[1],haclose[1]) and haclose >= min(haopen[1],haclose[1]) ? 1 : 0


colorvalue = inside6 ? ccolor[6] : inside5 ? ccolor[5] : inside4 ? ccolor[4] : inside3 ? ccolor[3] : inside2 ? ccolor[2] : inside1 ? ccolor[1] : ccolor

color = colorvalue ? blue : red

barcolor(color)