Translate TradingView “BoS Yellow Candle” to Thinkorsiwm


Category:
0
0

Hello Hahn,

 

I wans wondering if its possible to convert the following study from TradingView to Thinkorswim format?

More info here: https://www.tradingview.com/v/rHO6gt9u/

thank in advance,
Luis

Marked as spam
Posted by Luis (Questions: 1, Answers: 1)
Asked on July 8, 2025 2:37 pm
71 views
0
Private answer

Here is the solution for Thinkorswim. I compared this using a daily chart of AAPL and this matches what is displayed on the TradingView chart:

input lookBack = 12;
input minLookBack = 7;
def highestHigh = Highest(high, lookBack);
def lowestLow = Lowest(low, lookBack);
def bullishBOS = close > highestHigh[1];
def bearishBOS = close < lowestLow[1];
rec bullishBosFirst = !bullishBOS[1] and bullishBOS;
rec bearishBosFirst = !bearishBOS[1] and bearishBOS;
AssignPriceColor(if bullishBOS or bearishBOS then Color.YELLOW else Color.CURRENT);

In case that link to the original source code on TradingView gets removed in the future, I have attached a plain text file containing the original PineScript source code from TradingView. Link to that file is listed below with the name of "TV_BoS Yellow Candle.txt".

Marked as spam
Posted by Pete Hahn (Questions: 37, Answers: 4144)
Answered on July 8, 2025 2:42 pm