Heikin_Ashi Indicator For ThinkOrSwim

@rlohmeyer Thank you for posting regarding your success with the script. I love when members make adaptations based on their trading plan. Please share your code so members can benefit from your updates. I also use the opening range but I changed from 30 to 15 minutes. My rationale is due to the decrease in market noise after the first 15 mins after market open (based on the type of stocks I trade).

@everyone here is the link to the opening range breakout (OFB) that I use.
https://tos.mx/fM6fCqN
 
@sunstar @BonBon
@Thomas
Thomas, I am referencing you as I thought you might be interested in this adaptation of BonBon's work to get signals on my charts for potential trend reversals as close to the fact as possible. BonBon was seeking a way to smooth a trend so that it could be ridden. (Please correct me if I simplify too much BonBon) This indicator seems to give very clean signals. I cannot yet attest to whether there are repaints as I have not had this on my charts for more than one day. I was still in a search for some kind of Enhanced Trend Reversal Indicator. Is this a candidate? Don't yet know, but will report back in this thread.

I have included the screen shot of the chart with signals, my settings for the code, and the adapted code.

Dk5ZPnM.jpg


dVdbzLZ.jpg


Code:
#BonBon - Heiken_Ashi based on Sylvan Verboort's Trading with HA Candlestick Oscillator
#Bon Bon _last update 2/1/2021, Jan 17th 2021,
#Influenced by script from HoboTheClown / blt,http://www.thinkscripter.com, TD Hacolt etc., Thinkscript Cloud, #TOS & Thinkscript Collection
#Code adapted by @rlohmeyer for chart signals
input candleSmoothing = {default Valcu, Vervoort};
input MA_Type1 = {default TEMA, Hull, ExpAverage};
input t1_period = 34;
input MA_Type2 = {default TEMA, Hull, ExpAverage};
input t2_period = 34;
input swing_back = 20;
input swing_forward = 34;
#Code 1
def openMA;
def closeMA;
def highMA;
def lowMA;
#Code2
def openMA2;
def closeMA2;
def highMA2;
def lowMA2;

#Code1
switch (MA_Type1) {
case Hull:
    openMA = CompoundValue(1, HullMovingAvg(open, t1_period), open);
    closeMA = CompoundValue(1,  HullMovingAvg(close, t1_period), close);
    highMA = CompoundValue(1,  HullMovingAvg(high, t1_period), high);
    lowMA = CompoundValue(1,  HullMovingAvg(low, t1_period), low);
case TEMA:
   openMA = CompoundValue(1, TEMA(open, t1_period), open);
   closeMA = CompoundValue(1, TEMA(close, t1_period), close);
   highMA = CompoundValue(1, TEMA(high, t1_period), high);
   lowMA = CompoundValue(1, TEMA(low, t1_period), low);
case ExpAverage:
   openMA = CompoundValue(1, ExpAverage (open, t1_period), open);
   closeMA = CompoundValue(1, ExpAverage(close, t1_period), close);
   highMA = CompoundValue(1, ExpAverage(high, t1_period), high);
   lowMA = CompoundValue(1, ExpAverage(low, t1_period), low);
}
#Code2
switch (MA_Type2) {
case Hull:
    openMA2 = CompoundValue(1, HullMovingAvg(open, t2_period), open);
    closeMA2 = CompoundValue(1,  HullMovingAvg(close, t2_period), close);
    highMA2 = CompoundValue(1,  HullMovingAvg(high, t2_period), high);
    lowMA2 = CompoundValue(1,  HullMovingAvg(low, t2_period), low);
case TEMA:
   openMA2 = CompoundValue(1, TEMA(open, t2_period), open);
   closeMA2 = CompoundValue(1, TEMA(close, t2_period), close);
   highMA2 = CompoundValue(1, TEMA(high, t2_period), high);
   lowMA2 = CompoundValue(1, TEMA(low, t2_period), low);
case ExpAverage:
   openMA2 = CompoundValue(1, ExpAverage (open, t2_period), open);
   closeMA2 = CompoundValue(1, ExpAverage(close, t2_period), close);
   highMA2 = CompoundValue(1, ExpAverage(high, t2_period), high);
   lowMA2 = CompoundValue(1, ExpAverage(low, t2_period), low);
}

#Code1
def haopen;
def haclose;
switch (candleSmoothing){
case Valcu:
    haOpen = CompoundValue(1, ( (haOpen[1] + (openMA[1] + highMA[1] + lowMA[1] + closeMA[1]) / 4.0) / 2.0), open);
    haClose = ((((openMA + highMA + lowMA + closeMA) / 4.0) + haOpen + Max(highMA, haOpen) + Min(lowMA, haOpen)) / 4.0);
case Vervoort:
    haOpen = CompoundValue(1, ( (haOpen[1] + (openMA[1] + highMA[1] + lowMA[1] + closeMA[1]) / 4.0 ) / 2.0), open);
    haClose = ((((openMA + highMA + lowMA + closeMA) / 4.0) + haOpen + Max(highMA, haOpen) + Min(lowMA, haOpen)) / 4.0);
}
def halow =  Min(lowMA, haOpen);
def hahigh = Max(highMA, haOpen);
def trend = if haclose >= haopen then 1 else 0; # halow1[-50]
def trendd =  if haclose < haopen then 1 else 0;

#Code2
def haopen2;
def haclose2;
switch (candleSmoothing){
case Valcu:
    haOpen2 = CompoundValue(1, ( (haOpen2[1] + (openMA2[1] + highMA2[1] + lowMA2[1] + closeMA2[1]) / 4.0) / 2.0), open);
    haClose2 = ((((openMA2 + highMA2 + lowMA2 + closeMA2) / 4.0) + haOpen2 + Max(highMA2, haOpen2) + Min(lowMA2, haOpen2)) / 4.0);
case Vervoort:
    haOpen2 = CompoundValue(1, ( (haOpen2[1] + (openMA2[1] + highMA2[1] + lowMA2[1] + closeMA2[1]) / 4.0 ) / 2.0), open);
    haClose2 = ((((openMA2 + highMA2 + lowMA2 + closeMA2) / 4.0) + haOpen2 + Max(highMA2, haOpen2) + Min(lowMA2, haOpen2)) / 4.0);
}
def halow2 =  Min(lowMA2, haOpen2);
def hahigh2 = Max(highMA2, haOpen2);
def trend2 = if haclose2 >= haopen2 then 1 else 0; # halow1[-50]
def trendd2 =  if haclose2 < haopen2 then 1 else 0;


#Signals1
#Original code by Taz43
#updated by BonBon 1/15/21 inccreased swing_back periods, changed "high and Low to Halow1 and Hahigh1".

def sb = swing_back;
def sf = swing_forward;
def na = Double.NaN;
def lfor1 = Lowest(halow, sf)[-sf]; #Remember that a negative number inside the square brackets means "after" this bar. So, the above line is defining "lfor" as being the lowest value of the two bars after this bar.
def lback1 = Lowest(halow, sb)[1]; #This line of code is defining "lback" as the lowest value of the eight bars before this one.
def swinglow1 = if halow < lfor1 and halow < lback1 then 1 else 0;
#Finally, this line is actually defining what a "swing low" is. It says, if the low of this bar is lower than the two bars after this one AND the low of this bar is also lower than or equal to the lowest of the previous eight bars, then this bar is a swing low. So, what that means is that in order to determine whether a point on the chart is either a swing high or a swing low, it must have eight bars before the bar in question, as well as, two bars after it. Looking at the picture above, it can be seen that point "A" is a "swing high" because it is higher than the 8 bars before it AND it is higher than the 2 bars after it. Likewise, point "C" is a "swing low" because it is lower than the 8 bars before it AND it is lower than the 2 bars after it. (I know it's a line chart, not a bar chart. smiling smiley Just work with me here.)
def hfor1 = Highest(hahigh, sf)[-sf];
def hback1 = Highest(hahigh, sb)[1];
def swinghigh1 = if hahigh > hfor1  and hahigh > hback1 then 1 else 0;

plot fh = if swinghigh1 then hahigh else na ;
fh.SetDefaultColor(Color.red);
fh.SetPaintingStrategy(PaintingStrategy.booleaN_ARROW_DOWN);
fh.SetLineWeight(1);

plot fl = if swinglow1 then halow else na;
fl.SetPaintingStrategy(PaintingStrategy.boolean_ARROW_UP);
fl.SetDefaultColor(Color.green);
fl.SetLineWeight(1);

#Signals2
def lfor2 = Lowest(halow2, sf)[-sf]; #Remember that a negative number inside the square brackets means "after" this bar. So, the above line is defining "lfor" as being the lowest value of the two bars after this bar.
def lback2 = Lowest(halow2, sb)[1]; #This line of code is defining "lback" as the lowest value of the eight bars before this one.
def swinglow2 = if halow2 < lfor2 and halow2 < lback2 then 1 else 0;
#Finally, this line is actually defining what a "swing low" is. It says, if the low of this bar is lower than the two bars after this one AND the low of this bar is also lower than or equal to the lowest of the previous eight bars, then this bar is a swing low. So, what that means is that in order to determine whether a point on the chart is either a swing high or a swing low, it must have eight bars before the bar in question, as well as, two bars after it. Looking at the picture above, it can be seen that point "A" is a "swing high" because it is higher than the 8 bars before it AND it is higher than the 2 bars after it. Likewise, point "C" is a "swing low" because it is lower than the 8 bars before it AND it is lower than the 2 bars after it. (I know it's a line chart, not a bar chart. smiling smiley Just work with me here.)
def hfor2 = Highest(hahigh2, sf)[-sf];
def hback2 = Highest(hahigh2, sb)[1];
def swinghigh2 = if hahigh2 > hfor2  and hahigh2 > hback2 then 1 else 0;

plot fh2 = if swinghigh2 then hahigh2 else na ;
fh.SetDefaultColor(Color.red);
fh.SetPaintingStrategy(PaintingStrategy.booleaN_ARROW_DOWN);
fh.SetLineWeight(1);

plot fl2 = if swinglow2 then halow2 else na;
fl.SetPaintingStrategy(PaintingStrategy.boolean_ARROW_UP);
fl.SetDefaultColor(Color.green);
fl.SetLineWeight(1);
 
@sunstar @BonBon
@Thomas
Thomas, I am referencing you as I thought you might be interested in this adaptation of BonBon's work to get signals on my charts for potential trend reversals as close to the fact as possible. BonBon was seeking a way to smooth a trend so that it could be ridden. (Please correct me if I simplify too much BonBon) This indicator seems to give very clean signals. I cannot yet attest to whether there are repaints as I have not had this on my charts for more than one day. I was still in a search for some kind of Enhanced Trend Reversal Indicator. Is this a candidate? Don't yet know, but will report back in this thread.

I have included the screen shot of the chart with signals, my settings for the code, and the adapted code.

Dk5ZPnM.jpg


dVdbzLZ.jpg


Code:
#BonBon - Heiken_Ashi based on Sylvan Verboort's Trading with HA Candlestick Oscillator
#Bon Bon _last update 2/1/2021, Jan 17th 2021,
#Influenced by script from HoboTheClown / blt,http://www.thinkscripter.com, TD Hacolt etc., Thinkscript Cloud, #TOS & Thinkscript Collection
#Code adapted by @rlohmeyer for chart signals
input candleSmoothing = {default Valcu, Vervoort};
input MA_Type1 = {default TEMA, Hull, ExpAverage};
input t1_period = 34;
input MA_Type2 = {default TEMA, Hull, ExpAverage};
input t2_period = 34;
input swing_back = 20;
input swing_forward = 34;
#Code 1
def openMA;
def closeMA;
def highMA;
def lowMA;
#Code2
def openMA2;
def closeMA2;
def highMA2;
def lowMA2;

#Code1
switch (MA_Type1) {
case Hull:
    openMA = CompoundValue(1, HullMovingAvg(open, t1_period), open);
    closeMA = CompoundValue(1,  HullMovingAvg(close, t1_period), close);
    highMA = CompoundValue(1,  HullMovingAvg(high, t1_period), high);
    lowMA = CompoundValue(1,  HullMovingAvg(low, t1_period), low);
case TEMA:
   openMA = CompoundValue(1, TEMA(open, t1_period), open);
   closeMA = CompoundValue(1, TEMA(close, t1_period), close);
   highMA = CompoundValue(1, TEMA(high, t1_period), high);
   lowMA = CompoundValue(1, TEMA(low, t1_period), low);
case ExpAverage:
   openMA = CompoundValue(1, ExpAverage (open, t1_period), open);
   closeMA = CompoundValue(1, ExpAverage(close, t1_period), close);
   highMA = CompoundValue(1, ExpAverage(high, t1_period), high);
   lowMA = CompoundValue(1, ExpAverage(low, t1_period), low);
}
#Code2
switch (MA_Type2) {
case Hull:
    openMA2 = CompoundValue(1, HullMovingAvg(open, t2_period), open);
    closeMA2 = CompoundValue(1,  HullMovingAvg(close, t2_period), close);
    highMA2 = CompoundValue(1,  HullMovingAvg(high, t2_period), high);
    lowMA2 = CompoundValue(1,  HullMovingAvg(low, t2_period), low);
case TEMA:
   openMA2 = CompoundValue(1, TEMA(open, t2_period), open);
   closeMA2 = CompoundValue(1, TEMA(close, t2_period), close);
   highMA2 = CompoundValue(1, TEMA(high, t2_period), high);
   lowMA2 = CompoundValue(1, TEMA(low, t2_period), low);
case ExpAverage:
   openMA2 = CompoundValue(1, ExpAverage (open, t2_period), open);
   closeMA2 = CompoundValue(1, ExpAverage(close, t2_period), close);
   highMA2 = CompoundValue(1, ExpAverage(high, t2_period), high);
   lowMA2 = CompoundValue(1, ExpAverage(low, t2_period), low);
}

#Code1
def haopen;
def haclose;
switch (candleSmoothing){
case Valcu:
    haOpen = CompoundValue(1, ( (haOpen[1] + (openMA[1] + highMA[1] + lowMA[1] + closeMA[1]) / 4.0) / 2.0), open);
    haClose = ((((openMA + highMA + lowMA + closeMA) / 4.0) + haOpen + Max(highMA, haOpen) + Min(lowMA, haOpen)) / 4.0);
case Vervoort:
    haOpen = CompoundValue(1, ( (haOpen[1] + (openMA[1] + highMA[1] + lowMA[1] + closeMA[1]) / 4.0 ) / 2.0), open);
    haClose = ((((openMA + highMA + lowMA + closeMA) / 4.0) + haOpen + Max(highMA, haOpen) + Min(lowMA, haOpen)) / 4.0);
}
def halow =  Min(lowMA, haOpen);
def hahigh = Max(highMA, haOpen);
def trend = if haclose >= haopen then 1 else 0; # halow1[-50]
def trendd =  if haclose < haopen then 1 else 0;

#Code2
def haopen2;
def haclose2;
switch (candleSmoothing){
case Valcu:
    haOpen2 = CompoundValue(1, ( (haOpen2[1] + (openMA2[1] + highMA2[1] + lowMA2[1] + closeMA2[1]) / 4.0) / 2.0), open);
    haClose2 = ((((openMA2 + highMA2 + lowMA2 + closeMA2) / 4.0) + haOpen2 + Max(highMA2, haOpen2) + Min(lowMA2, haOpen2)) / 4.0);
case Vervoort:
    haOpen2 = CompoundValue(1, ( (haOpen2[1] + (openMA2[1] + highMA2[1] + lowMA2[1] + closeMA2[1]) / 4.0 ) / 2.0), open);
    haClose2 = ((((openMA2 + highMA2 + lowMA2 + closeMA2) / 4.0) + haOpen2 + Max(highMA2, haOpen2) + Min(lowMA2, haOpen2)) / 4.0);
}
def halow2 =  Min(lowMA2, haOpen2);
def hahigh2 = Max(highMA2, haOpen2);
def trend2 = if haclose2 >= haopen2 then 1 else 0; # halow1[-50]
def trendd2 =  if haclose2 < haopen2 then 1 else 0;


#Signals1
#Original code by Taz43
#updated by BonBon 1/15/21 inccreased swing_back periods, changed "high and Low to Halow1 and Hahigh1".

def sb = swing_back;
def sf = swing_forward;
def na = Double.NaN;
def lfor1 = Lowest(halow, sf)[-sf]; #Remember that a negative number inside the square brackets means "after" this bar. So, the above line is defining "lfor" as being the lowest value of the two bars after this bar.
def lback1 = Lowest(halow, sb)[1]; #This line of code is defining "lback" as the lowest value of the eight bars before this one.
def swinglow1 = if halow < lfor1 and halow < lback1 then 1 else 0;
#Finally, this line is actually defining what a "swing low" is. It says, if the low of this bar is lower than the two bars after this one AND the low of this bar is also lower than or equal to the lowest of the previous eight bars, then this bar is a swing low. So, what that means is that in order to determine whether a point on the chart is either a swing high or a swing low, it must have eight bars before the bar in question, as well as, two bars after it. Looking at the picture above, it can be seen that point "A" is a "swing high" because it is higher than the 8 bars before it AND it is higher than the 2 bars after it. Likewise, point "C" is a "swing low" because it is lower than the 8 bars before it AND it is lower than the 2 bars after it. (I know it's a line chart, not a bar chart. smiling smiley Just work with me here.)
def hfor1 = Highest(hahigh, sf)[-sf];
def hback1 = Highest(hahigh, sb)[1];
def swinghigh1 = if hahigh > hfor1  and hahigh > hback1 then 1 else 0;

plot fh = if swinghigh1 then hahigh else na ;
fh.SetDefaultColor(Color.red);
fh.SetPaintingStrategy(PaintingStrategy.booleaN_ARROW_DOWN);
fh.SetLineWeight(1);

plot fl = if swinglow1 then halow else na;
fl.SetPaintingStrategy(PaintingStrategy.boolean_ARROW_UP);
fl.SetDefaultColor(Color.green);
fl.SetLineWeight(1);

#Signals2
def lfor2 = Lowest(halow2, sf)[-sf]; #Remember that a negative number inside the square brackets means "after" this bar. So, the above line is defining "lfor" as being the lowest value of the two bars after this bar.
def lback2 = Lowest(halow2, sb)[1]; #This line of code is defining "lback" as the lowest value of the eight bars before this one.
def swinglow2 = if halow2 < lfor2 and halow2 < lback2 then 1 else 0;
#Finally, this line is actually defining what a "swing low" is. It says, if the low of this bar is lower than the two bars after this one AND the low of this bar is also lower than or equal to the lowest of the previous eight bars, then this bar is a swing low. So, what that means is that in order to determine whether a point on the chart is either a swing high or a swing low, it must have eight bars before the bar in question, as well as, two bars after it. Looking at the picture above, it can be seen that point "A" is a "swing high" because it is higher than the 8 bars before it AND it is higher than the 2 bars after it. Likewise, point "C" is a "swing low" because it is lower than the 8 bars before it AND it is lower than the 2 bars after it. (I know it's a line chart, not a bar chart. smiling smiley Just work with me here.)
def hfor2 = Highest(hahigh2, sf)[-sf];
def hback2 = Highest(hahigh2, sb)[1];
def swinghigh2 = if hahigh2 > hfor2  and hahigh2 > hback2 then 1 else 0;

plot fh2 = if swinghigh2 then hahigh2 else na ;
fh.SetDefaultColor(Color.red);
fh.SetPaintingStrategy(PaintingStrategy.booleaN_ARROW_DOWN);
fh.SetLineWeight(1);

plot fl2 = if swinglow2 then halow2 else na;
fl.SetPaintingStrategy(PaintingStrategy.boolean_ARROW_UP);
fl.SetDefaultColor(Color.green);
fl.SetLineWeight(1);
@rlohmeyer...I see you have made changes to the swing_hig_swing_lo signals. This is the swing_hi_swing lo signal (part of the 3 signals that I included in the code).

The original code for the swings were 2 and 8. I tailored them to my trading plan and they are now 45 and 45. I also use the high and low of the heikin candles (TOS) instead of the HA smoothing hahigh and halow. I found this was significant as whenever the signals appear it indicated a reverse was about to follow.

@RickK...This is another way for me (along with the zig zag) to not only verify the reversals/pullbacks but to prepare to exit, enter or based on my additional confirmations to determine if it is a 1, 2 or 3 wave.

I also use it as a standalone script instead of within my HA_Smoothing Code

#Begin code
#updated by BonBon - swing_back and _swing_forward (February 4, 2021)
def bubbles = yes;
input swing_back = 45;
input swing_forward = 45;
input maxbars = 50;
input showlevels = Yes;
def sb = swing_back;
def sf = swing_forward;
def na = Double.NaN;

def Offset = 8; # high(period = "day")and low(period = "day" ) and close(period = "day" ) * 0.03;
def bubblelocation = bubbles[Offset];

def lfor = Lowest(low, sf)[-sf]; #Remember that a negative number inside the square brackets means "after" this bar. So, the above line is defining "lfor" as being the lowest value of the two bars after this bar.
def lback = Lowest(low, sb)[1]; #This line of code is defining "lback" as the lowest value of the eight bars before this one.

##############################
#Finally, this line is actually defining what a "swing low" is. It says, if the low of this bar is lower than the two bars after this one AND the low of this bar is also lower than or equal to the lowest of the previous eight bars, then this bar is a swing low.

def swinglow = if low < lfor and low <= lback then 1 else 0;
plot sl = if swinglow then low else na;
sl.SetPaintingStrategy(PaintingStrategy.POINTS);
sl.SetDefaultColor(Color.WHITE);
sl.SetLineWeight(4);


def hfor = Highest(high, sf)[-sf];
def hback = Highest(high, sb)[1];

def swinghigh = if high > hfor and high >= hback then 1 else 0;
plot sh = if swinghigh then high else na ;
sh.SetDefaultColor(Color.WHITE);
sh.SetPaintingStrategy(PaintingStrategy.POINTS);
sh.SetLineWeight(4);

#End code

@everyone..as always please research the ways in which these can be used based on your trading plan. Also, please share your updates with members. We are all learning together and the original intent for this thread was to obtain feedback as to how my HA_smoothed code with the MTFs, signals etc. can be improved upon.
 
@BonBon et all

The image below is the same image I posted from above with the addition of signals from @BonBon code in post 134, minus the HA candles. The default settings were retained. As you can see, the Original Code (signals are the Bubbles) caught a longer trend, however the adapted code gave me more plays, with less drawdown, in less time. I am usually out of the market in 2hrs from the open. Perfect for me. For me the game is about leveraging risks with time spent at risk.

Since the original settings were retained in the Original Code, a couple of signals were a little late to the party. I do not take my eyes off the chart, even looking at indicators below would be a distraction. For me the Price/ Volume Profile action at Support Resistance (and certain Time Lines) is critical. From my perspective, @BonBon did a pretty amazing job with this indicator.

Regards,
Bob

PS: The Price Time Grid on this chart is an indicator I put together, because certain price levels and time intervals can be very important.

pYPTyfe.jpg
 
Last edited:
Set up 2 more columns on your watch list for 15 and 30 mins plots, shared by bonbon.. just make a tweak to the existing script of 5 minutes to 15 and 30 mins, save those scripts and put it on your watchlist.. it will help you find out stocks that have a possible reversal..
what this scan helps you find? It shows you a bullish reversal on (5,15,30 mins) check the lower chart shared by bonbon and use rsi or stochastic for an entry..
Hi VictusJogi sorry to keep bothering you...

1) I did what you said and setup 3 separate custom watchlist columns with 5M, 15M and 30M with the script from page 2 post #28 which is pictured below.


*(I tried to use the MTF watchlist on page 10 post #183 with no luck because if I set the aggregation higher than 5M it said "secondary aggregation period can not be higher than primary" so I did'nt use that.)


2) Maybe I am just confused because of the numerous updates and changes or me not the sharpest tool in the shed, probably the latter...so on my chart I used the most recent HA smoothing script found on page 7 post #134 for the upper and the lower...(I had to split the code in 2 having the lower code start at:"#Multi-Time Frame Script for the lower chart")

**Here are 2 examples with my chart set to 5M and the watchlist set to 5 mins with a RED THUMBS DOWN but when you look at the 5M lower TF (#6) it has a green dot not red)

Ex #1)


Ex #2)




3) And I threw in the scan criteria ( that I got from you) being used for shits and giggles...



I am ready to jump out my 1st story window in about a minute (luckily my house is only 1 story) if I can't figure this out!! It's driving me insane! Thanks in advance for all your time and patience helping me out thanks!!!!
 
@BonBon So i have the codes from post #134 for my chart and lower indicator, how do i change the HA bars to a line and how do i import the watchlist scanner
As far as LINE goes just go to studies and click on gear icon of the upper study that you saved then scroll down to "hide candles" and make sure it is set to "no" close that out and go to your settings (gear icon) menu and click on "Appearance" then click "chart type" and change from say "candle" to "line" and make sure that to the left of up tick or down tick its not black...if it is hover over it and click on it and say change the black to green for up tick and the black to red for down tick.


 
Last edited:
Here is the Scan Watchlist provided by VictusJogi post #250


http://tos.mx/WEH2XeH
Hey Joe, Thank you for the response. So for the chart, I saw RickK posted a variation of the study he made with regular candles and instead of the Heikin Ashi candles over the regular candles he just had the plot of the HA candles. When i hide my candles it hides the regular candles. I'd like to to the HA candles and just keep the plot visible... New to this thread, sorry if i'm having a hard time explaining/following along.

appreciate it in advance.
 
Hi VictusJogi sorry to keep bothering you...

1) I did what you said and setup 3 separate custom watchlist columns with 5M, 15M and 30M with the script from page 2 post #28 which is pictured below.


*(I tried to use the MTF watchlist on page 10 post #183 with no luck because if I set the aggregation higher than 5M it said "secondary aggregation period can not be higher than primary" so I did'nt use that.)


2) Maybe I am just confused because of the numerous updates and changes or me not the sharpest tool in the shed, probably the latter...so on my chart I used the most recent HA smoothing script found on page 7 post #134 for the upper and the lower...(I had to split the code in 2 having the lower code start at:"#Multi-Time Frame Script for the lower chart")

**Here are 2 examples with my chart set to 5M and the watchlist set to 5 mins with a RED THUMBS DOWN but when you look at the 5M lower TF (#6) it has a green dot not red)

Ex #1)


Ex #2)




3) And I threw in the scan criteria ( that I got from you) being used for shits and giggles...



I am ready to jump out my 1st story window in about a minute (luckily my house is only 1 story) if I can't figure this out!! It's driving me insane! Thanks in advance for all your time and patience helping me out thanks!!!!
@Joseph Patrick 18...Its totally alright... I hve been in your shoe and its really frustrating..I know..but trust me you will get it.. Dont overwhelm yourself..I knw there is lot of knowledge to be consumed and we cant learn everything in a day (atleast not me, haha)..
Here, this should help..

1) RV(Relative Column)
http://tos.mx/1ocVtz7

MTF Watch list columns:
2) 5 mins
http://tos.mx/Srq6kZP

3) 15 mins
http://tos.mx/hqalaH3

4) 30 mins
http://tos.mx/R5mryEP

5)1 Hour
http://tos.mx/mh5CZB2

6)RSM
http://tos.mx/S7p8Kgs

7)Buy/Sell
http://tos.mx/NierZPo


If you can, buy BTD indicator, @BenTen has done an amazing job on it.
 
Hey Joe, Thank you for the response. So for the chart, I saw RickK posted a variation of the study he made with regular candles and instead of the Heikin Ashi candles over the regular candles he just had the plot of the HA candles. When i hide my candles it hides the regular candles. I'd like to to the HA candles and just keep the plot visible... New to this thread, sorry if i'm having a hard time explaining/following along.

appreciate it in advance.
Hi TraderCee32 if I'm following you correctly, you're referring to post #102 by RickK...

Just save the script into a study then "edit studies" click on gear icon the do what I have in the picture below just to show the plot with no candles...but I think you want the plot and the regular candles...and if that is the case then do what I have in pic below but just change the "Hide Candles" to NO.

Hope this helps if not just let me know and I'll try to help you best I can. Thanks np...

 
@Joseph Patrick 18...Its totally alright... I hve been in your shoe and its really frustrating..I know..but trust me you will get it.. Dont overwhelm yourself..I knw there is lot of knowledge to be consumed and we cant learn everything in a day (atleast not me, haha)..
Here, this should help..

1) RV(Relative Column)
http://tos.mx/1ocVtz7

MTF Watch list columns:
2) 5 mins
http://tos.mx/Srq6kZP

3) 15 mins
http://tos.mx/hqalaH3

4) 30 mins
http://tos.mx/R5mryEP

5)1 Hour
http://tos.mx/mh5CZB2

6)RSM
http://tos.mx/S7p8Kgs

7)Buy/Sell
http://tos.mx/NierZPo


If you can, buy BTD indicator, @BenTen has done an amazing job on it.
Thanks so much for taking the time to help me out!! I really appreciate it...I keep learning new things every day thanks to BenTen, Cos251, Diazlaz etc and everyone else who has been so kind and patient with me. I plan on joining this week and am excited to check it out and seriously delve into the community. Thanks again.
Joe
 
/ES, NQ and /RTY. But, like @BonBon I am struggling a bit with exits (and chop). As everyone is, I'm looking for an instrument that has more steady movement and fewer indiscriminate surges in the opposite direction. I'm looking forward to her next post.

Also, I've been testing with different settings. Using fibonacci numbers as a guide (I learned this somewhere), I've been trying to set the indicator and the accompanying TEMA line to different values. Started with 34, then to 21 and even 13 to see if it would help with fast scalping. I haven't concluded anything yet.

Consider the image below.
Hi Rick can you share the above chart setup with a thinkorswim share link?
 
@Joseph Patrick 18...Its totally alright... I hve been in your shoe and its really frustrating..I know..but trust me you will get it.. Dont overwhelm yourself..I knw there is lot of knowledge to be consumed and we cant learn everything in a day (atleast not me, haha)..
Here, this should help..

1) RV(Relative Column)
http://tos.mx/1ocVtz7

MTF Watch list columns:
2) 5 mins
http://tos.mx/Srq6kZP

3) 15 mins
http://tos.mx/hqalaH3

4) 30 mins
http://tos.mx/R5mryEP

5)1 Hour
http://tos.mx/mh5CZB2

6)RSM
http://tos.mx/S7p8Kgs

7)Buy/Sell
http://tos.mx/NierZPo


If you can, buy BTD indicator, @BenTen has done an amazing job on it.
Hi, okay I set it up just like you helped me do...my question which I am not understanding is outlined in the picture. Again I'm sorry but I'm not quite understanding the watchlist in unison with the upper and lower HA smoothed setup. Thanks
Joe

 
I am new to this indicator and I do like this , will be testing out today . I have a question on the difference between the actual candle and the HA smoothered candle. When i get a reversal with a price, the actual candle price is way lower than what the bubble is showing. is this right?

image

 
I am new to this indicator and I do like this , will be testing out today . I have a question on the difference between the actual candle and the HA smoothered candle. When i get a reversal with a price, the actual candle price is way lower than what the bubble is showing. is this right?

image

Hi Rocky20..the actual Japanese candle in your picture is the actual price of ADSK and the HA Smoothed candle is an "average" of the price for that 15 minute time frame. Hope that helps
 
Hi, okay I set it up just like you helped me do...my question which I am not understanding is outlined in the picture. Again I'm sorry but I'm not quite understanding the watchlist in unison with the upper and lower HA smoothed setup. Thanks
Joe

Try this script... Its a watchlist column... Save this script and update it in 5,15,30,1 hour...

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);
 
Try this script... Its a watchlist column... Save this script and update it in 5,15,30,1 hour...

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);
Hi, here is the script that I have already plugged into the 5, 15,30,1hr timeframes on my watchlist like in the picture in my last post. I just compared this to what you just posted and it's identical no?


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);

What I am not comprehending is if you look at my last post:

1) When I am looking at the MTF watchlist and I have a GREEN thumbs UP in the 5M watchlist should that or should that not coincide with the lower study, and that lower study should have a GREEN DOT to coincide with the GREEN thumbs UP??


Look at pic below #1, #2 and #3 all have Green Thumbs up and if you follow the arrows to the corresponding lower study time slots of 5M, 15M, 30M timeslots for lower study they all have RED DOTS. The only one that correctly correlates is #4 which is a GREEN thumbs UP with a GREEN DOT.


What am I not getting?? Thanks again for trying to help me I appreciate it!

 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
552 Online
Create Post

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

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.

How do I get started?

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.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top