Truedepth of ROC

YungTraderFromMontana

Well-known member
While working on my other breakout indicator I ended up making this, as a trader look for a squeeze of the upper and lower ranges (range tighter then usual) with an accompanying move up or down of the true range.

Code:
input length1 = 8;
input length21 = 80;
input length31 = 4;
input price = close;
input BuyEntry3 = 10;
input SellEntry3 = 10;

assert(length1 > 0, "'length' must be positive: " + length1);
plot ROC = if price[length1] != 0 then (price / price[length1] - 1) * 100 else 0;
roc.SetDefaultColor(GetColor(9));
Assert(length21 > 0, "'length' must be positive: " + length21);

def QB3 = Highest(ROC, BuyEntry3);
def QS3 = Lowest(ROC, SellEntry3);
plot trueqb3 = QB3[1];
trueqb3.SetDefaultColor(GetColor(5));
plot trueqs3 = QS3[1];
trueqs3.SetDefaultColor(GetColor(5));
def squeeze = (trueqb3 - trueqs3) < 5;

plot bottom = 10;
bottom.SetDefaultColor(GetColor(14));
plot top = -10;
top.SetDefaultColor(GetColor(14));

1YD4odo.png
 
Last edited by a moderator:

HighBredCloud

Well-known member
VIP
So basically trade in the direction of the white line (ROC) crossing over the red line? Is this ONLY suitable for DAILY charts or any timeframe?
 
Thread starter Similar threads Forum Replies Date
P VOL ROC Questions 1
A ROC of VIX+SPX Indicator TradingView --> ToS Questions 0
R Buy / Sell Volume RoC Indicators 53
C Need help with ROC scan Questions 3

Similar threads

Top