QQE crossover in watchlist


Category:
0
0

Hi Mr Hahn

May i know how to create a QQE Histogram Crossover for watchlist in TOS similar to the MACD Histogram Crossover found in TOS? The MACD Histogram Crossover in the watchlist will show a 1 when there is a crossover and 0 when there is none.

I have attached the QQE indicator script for you. i have already tried copying the MACD Histogram Crossover (Charts) by adding the additional script to the QQE Indicator which i have also attached for you. But it doesnt seem to load on TOS. Can i ask for your help? Thanks

Marked as spam
Posted by (Questions: 1, Answers: 1)
Asked on August 2, 2023 1:07 am
99 views
0
Private answer

First thing I need to mention is the file you provided which is named "QQE Indicator.txt" includes a the MACD Histogram. Based on a quick search of the internet I do not find that the MACD histogram should be included. So I just want the rest of our viewers to know that in case they attempt to use the version you provided with your question.

The solution I have provided below includes only the QQE sections of the code. And I have cleaned up the code to make it easier to present in this forum.

Oh, and there are two plots on this QQE indicator and you did not mention which of the two should be used for the crossing event. So I have chosen to use the plot named "pRsiMa" for this solution. Why? Because that seems to be the main metric used in this indicator and it makes for a much simpler section of code.

declare lower;
input rsiLength = 21;
input slowFactor = 8;
def rsi = RSI(price = vwap, length = rsiLength).RSI;
def pRsiMa = MovingAverage(AverageType.EXPONENTIAL, rsi, slowFactor);
def crossAbove = pRsiMa[1] < 50 and pRsiMa > 50;
def crossBelow = pRsiMa[1] > 50 and pRsiMa < 50;
plot data = if crossAbove then 1 else if crossBelow then -1 else 0;
data.AssignValueColor(if data <> 0 then Color.BLACK else Color.CURRENT);
AssignBackgroundColor(if data == 1 then Color.GREEN else if data == -1 then Color.RED else Color.CURRENT);

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on August 2, 2023 8:25 am
0
Hi Mr Hahn Appreciated your prompt reply but I am sorry that i didnt specify what crossover. What i meant was the crossover between pRSIMA and pFastATRSItl the solution u have given me shows up on the watchlist, but it shows the crossover for pRSIMA over 50 and below 50. so i tried to modify your solution by changing to the below code def crossAbove = pRsiMa > pfastAtrRsiTL; def crossBelow = pRsiMa < pfastAtrRsiTL;plot data = if crossAbove then 1 else if crossBelow then -1 else 0; data.AssignValueColor(if data 0 then Color.BLACK else Color.CURRENT); AssignBackgroundColor(if data == 1 then Color.GREEN else if data == -1 then Color.RED else Color.CURRENT); But instead of 1 or -1 or 0 i get numbers like 45.74, 66.23, 49.5 which i believe is the QQE values. but what i am looking at is for the column to show 1 when pRsiMa first cross over pfastAtrRsiTL and -1 when pRsiMA cross below pfastAtrRsiTL and 0 after that. I hope you get my meaning. Thanks
( at August 2, 2023 9:43 pm)
0
Sorry but for this request I have already exceeded the time I allocate to each free solution I provide in this forum. (by about double my limit). I was very close to declining to provide this solution due to the complexity of the code you provided.
( at August 3, 2023 7:26 am)
0
No worries. May i ask if you are willing to make one paid solution for me? We can chat via email to discuss this more if you are willing. Do let me know. Thanks and really appreciate your time and help
( at August 3, 2023 7:29 am)
0
I do offer professional services of this type and you will find all the details are described on the following webpage: https://www.hahn-tech.com/professional-services/ Be sure to read all of the details on the webpage which describes our rates and terms of business. There is a contact form at the bottom which you can fill out if/when you are ready to submit a formal project request. Thanks!
( at August 3, 2023 7:39 am)
0
Ok thanks. Appreciate your help
( at August 3, 2023 7:45 am)