I've been looking this up, and from what I understand you have to add the aggregation values to all references to candles. This is the script I'm referring to: https://usethinkscript.com/threads/qqe-quantitative-qualitative-estimation-for-thinkorswim.938/
Here's the actual code:
Essentially what I want is to be able to change the aggregations, I don't need like 3 different aggregations. Just 1 for the base code itself. I tried looking through other MTF codes and added these:
That didn't work though. I don't really see references to candles really in this script so I'm not sure where to add this. I'd appreciate if someone could help me figure this out.
Here's the actual code:
Code:
# QQE Indicator
# Converted by Kory Gill for BenTen at useThinkScript.com
# Original https://www.tradingview.com/script/zwbe2plA-Ghosty-s-Zero-Line-QQE/
declare lower;
input RSI_Period = 20;
input Slow_Factor = 5;
input QQE = 4.236;
input levelLine = 35;
plot Level = levelLine;
def Wilder_Period = RSI_Period * 2 - 1;
def vClose = close;
def rsi = RSI(price = vClose, length = RSI_Period).RSI;
def rsi_ma = MovingAverage(AverageType.EXPONENTIAL, rsi, Slow_Factor);
def atr_rsi = AbsValue(rsi_ma[1] - rsi_ma);
def atr_rsi_ma = MovingAverage(AverageType.EXPONENTIAL, atr_rsi, Wilder_Period);
def dar = MovingAverage(AverageType.EXPONENTIAL, atr_rsi_ma, Wilder_Period) * QQE;
def DeltaFastAtrRsi = dar;
def RSIndex = rsi_ma;
def newshortband = RSIndex + DeltaFastAtrRsi;
def newlongband = RSIndex - DeltaFastAtrRsi;
def longband = if RSIndex[1] > longband[1] and RSIndex > longband[1]
then max(longband[1],newlongband)
else newlongband;
def shortband = if RSIndex[1] < shortband[1] and RSIndex < shortband[1]
then min(shortband[1], newshortband)
else newshortband;
def trend = if Crosses(RSIndex, shortband[1])
then 1
else if Crosses(longband[1], RSIndex)
then -1
else if !IsNAN(trend[1])
then trend[1]
else 1;
def FastAtrRsiTL = if trend == 1
Essentially what I want is to be able to change the aggregations, I don't need like 3 different aggregations. Just 1 for the base code itself. I tried looking through other MTF codes and added these:
Code:
input agg = AggregationPeriod.fifteen_min;
plot c = close(period = agg);
That didn't work though. I don't really see references to candles really in this script so I'm not sure where to add this. I'd appreciate if someone could help me figure this out.