I got it. It works now.I made the changes...simply delete it. I was deleting code that wasn't necessary and missed that line. I made the changes in the original script that was posted. I also deleted the quote as well.
Thank you.
I got it. It works now.I made the changes...simply delete it. I was deleting code that wasn't necessary and missed that line. I made the changes in the original script that was posted. I also deleted the quote as well.
Can you show it to me? Did the above information resolve the issue?@BonBon Invalid statement: input at 6:1
Yeah he's talking about thisCan you show it to me? Did the above information resolve the issue?
Previously, I used arrows with the same code for plotting the reversals. They did not repaint. I simply changed the arrows to bubbles which should not repaint. I have not tested the bubbles as yet but I assume the theory should hold as it did for the arrows.Also, does this reversal bubble not repaint? @BonBon
@BonBon Is there a way to add this to the watchlist column?
yes this is the error i get.Yeah he's talking about this
input period = 50;
input hideCandles = no;
input candleSmoothing = {default Valcu, Vervoort};
input show_bubble_labels = yes;
input movingAverageType = {default Exponential, TEMA};
def openMA;
def closeMA;
def highMA;
def lowMA;
switch (movingAverageType) {
case Exponential:
openMA = CompoundValue(1, ExpAverage(open, period), open);
closeMA = CompoundValue(1, ExpAverage(close, period), close);
highMA = CompoundValue(1, ExpAverage(high, period), high);
lowMA = CompoundValue(1, ExpAverage(low, period), low);
case TEMA:
openMA = CompoundValue(1, TEMA(open, period), open);
closeMA = CompoundValue(1, TEMA(close, period), close);
highMA = CompoundValue(1, TEMA(high, period), high);
lowMA = CompoundValue(1, TEMA(low, period), low);
}
def haOpen = CompoundValue(1,( (haOpen[1] + (openMA[1] + highMA[1] + lowMA[1] + closeMA[1]) / 4.0) / 2.0), open);
def haClose = ((((openMA + highMA + lowMA + closeMA) / 4.0) + haOpen + Max(highMA, haOpen) + Min(lowMA, haOpen)) / 4.0);
def haLow = Min(lowMA, Min(haclose, haOpen));
def haHigh = Max(highMA, Max(haclose, haOpen));
def trend = haclose >= haopen;
plot trendup = trend and !trend[1];
def trendd = haclose < haopen;
plot trendDown = trendd and !trendd[1];
def arrowup = trendup;
def arrowdown = trenddown;
def trigger = if arrowup then 100 else if arrowdown then -100 else trigger [1];
AddLabel(yes, if trigger == 100 then "👍" else if trigger == -100 then "👎" else "NA", if trigger ==100 then color.black else if trigger == -100 then color.black else color.white);
AssignbackgroundColor(if trigger == 100 then Color.Green else if trigger == -100 then Color.dark_Red else Color.black);
alert(Trendup,"Trend Up", alert.Bar, sound.bell);
alert(Trenddown,"Trend down", alert.Bar, sound.bell);
Please help @BonBon, I have this errors:@D_Tramp Yes... this is the script that I use for the watchlist.
Code:input period = 50; input hideCandles = no; input candleSmoothing = {default Valcu, Vervoort}; input show_bubble_labels = yes; input movingAverageType = {default Exponential, TEMA}; def openMA; def closeMA; def highMA; def lowMA; switch (movingAverageType) { case Exponential: openMA = CompoundValue(1, ExpAverage(open, period), open); closeMA = CompoundValue(1, ExpAverage(close, period), close); highMA = CompoundValue(1, ExpAverage(high, period), high); lowMA = CompoundValue(1, ExpAverage(low, period), low); case TEMA: openMA = CompoundValue(1, TEMA(open, period), open); closeMA = CompoundValue(1, TEMA(close, period), close); highMA = CompoundValue(1, TEMA(high, period), high); lowMA = CompoundValue(1, TEMA(low, period), low); } def haOpen = CompoundValue(1,( (haOpen[1] + (openMA[1] + highMA[1] + lowMA[1] + closeMA[1]) / 4.0) / 2.0), open); def haClose = ((((openMA + highMA + lowMA + closeMA) / 4.0) + haOpen + Max(highMA, haOpen) + Min(lowMA, haOpen)) / 4.0); def haLow = Min(lowMA, Min(haclose, haOpen)); def haHigh = Max(highMA, Max(haclose, haOpen)); def arrowup = trendup; def arrowdown = trenddown; def trigger = if arrowup then 100 else if arrowdown then -100 else trigger [1]; AddLabel(yes, if trigger == 100 then "👍" else if trigger == -100 then "👎" else "NA", if trigger ==100 then color.black else if trigger == -100 then color.black else color.white); AssignbackgroundColor(if trigger == 100 then Color.Green else if trigger == -100 then Color.dark_Red else Color.black); alert(Trendup,"Trend Up", alert.Bar, sound.bell); alert(Trenddown,"Trend down", alert.Bar, sound.bell);
Hi bro, excuseme, I added this part to the script you use in the Watchlist #28, but now it generates this errorYou have to add the below script from the main study
def trend = haclose >= haopen;
plot trendup = trend and !trend[1];
def trendd = haclose < haopen;
plot trendDown = trendd and !trendd[1];
Hi bro, excuseme, I added this part to the script you use in the Watchlist #28, but now it generates this error
Yes.. please have a look at the previous discussion.@BonBon Is there a way to have just the HA candles without smoothing...or just candlesticks without HA but the signals and everything else stays...I have been watching all morning and no repaint so far...very interesting. But I read my candlestick better.
Use the above script that was posted for the watchlist and add the below. Place it directly before the "arrowup" statement.
def trend = haclose >= haopen;
plot trendup = trend and !trend[1];
def trendd = haclose < haopen;
plot trendDown = trendd and !trendd[1];
Join useThinkScript to post your question to a community of 21,000+ developers and traders.
Start a new thread and receive assistance from our community.
useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.
We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.
If you are new, or just looking for guidance, here are some helpful links to get you started.