You are using an out of date browser. It may not display this or other websites correctly.

You should upgrade or use an alternative browser.

You should upgrade or use an alternative browser.

- Thread starter BenTen
- Start date

I'd be interested in an update on this QQE Histogram indicator...This is what ive been able to come up with so far- I think i want the Histogram to act as a Oscillator around the 50 Line. I having a hard time with those adjustments.

Thanks for sharing that chart. I really like the QQE v5 here. Are you able to share the TradeStation code?

@FOTM_8888 Already did, take look at message #13.

thank you ben for the reply, i saw it, but what i mean is in the candles, not in the lower indicator, just to plot the signal in the upper of the charts, so that way we can save space deleting the lower part. thanks@FOTM_8888 Already did, take look at message #13.

Code:

```
# QQE Indicator
# Converted by Kory Gill for BenTen at useThinkScript.com
# Original https://www.tradingview.com/script/zwbe2plA-Ghosty-s-Zero-Line-QQE/
input RSI_Period = 20;
input Slow_Factor = 5;
input QQE = 4.236;
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
then longband
else shortband;
def pFastAtrRsiTL = FastAtrRsiTL;
def pRsiMa = rsi_ma;
def line50 = 50;
plot UpSignal = if pRSIMA crosses above pFastAtrRsiTL then low else Double.NaN;
plot DownSignal = if pRSIMA crosses below pFastAtrRsiTL then high else Double.NaN;
UpSignal.SetDefaultColor(Color.MAGENTA);
UpSignal.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
DownSignal.SetDefaultColor(Color.CYAN);
DownSignal.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
```

i assume the first line is storing one absolute value in the variable atr_rsi correct?

but if so then how are you finding the EMA with that one value in the second line?

is atr_rsi an array?

thanks!

def atr_rsi = AbsValue(rsi_ma[1] - rsi_ma);

def atr_rsi_ma = MovingAverage(AverageType.EXPONENTIAL, atr_rsi, Wilder_Period);

As for the question about arrays, no, TOS does not support arrays... What may appear to be an array is simply a series of basic calculations done one after the other as trade data comes in, not an aggregate grouping of values as a whole... I hope that makes sense...

What the numbers are is irrelevant... Just remember the concept that every time the price changes, so does the moving average... The current price paints and so does the current average, on a price change by price change basis... And there is no array of data... When a chart starts painting, regardless of how far back it goes, TOS parses the servers database for each candle/bar - without building a data array...ah that's interesting, to confirm my understand, I want to use an example, so lets say we had RSIs of these values: 40 50 60 70 80

basically the second line will be doing the EMA of these following absolute values (40-50),(50-60),(60-70), (70-80) right?

For this very reason you should keep the length of your charts only as long as immediately needed... If you only need a few days of

All that being said, TOS most likely uses a streaming buffer of some sort but not what programmers would consider and array...

Were you ever able to figure out a scan?@Barmarrs You're correct about the scanner. I wasn't able to obtain any result either. I'll look more into this issue.

https://usethinkscript.com/threads/answers-to-commonly-asked-questions.6006/#post-58238

Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|

QQE MTF (Multi Timeframe) for ThinkorSwim | Indicators | 15 |