Ok... For future reference, if you are sharing code don't just use a shared link, either also post the code itself or a standard hyperlink like you just posted... Everyone isn't comfortable having to install code just to see it...Nope ... It's the study shared in https://usethinkscript.com/threads/smoothed-heikin-ashi-for-thinkorswim.216/ ..... I added arrows
# TS_HeikinAshiSmoothed
# http://www.thinkscripter.com
# [email protected]
# Last Update 30 June 2013
### YOU MUST HAVE THE STYLE SETTING FIT STUDIES ENABLED ###
#hint: The style setting Fit Studies must be enabled tou use these bars.
input period = 21;
input hideCandles = NO;
input candleSmoothing = {default Valcu, Vervoort};
DefineGlobalColor("RisingMA", color.uptick);
DefineGlobalColor("FallingMA", color.downtick);
#DefineGlobalColor("RisingMA", color.cyan);
#DefineGlobalColor("FallingMA", color.yellow);
input movingAverageType = {default TEMA, Exponential, Weighted, Hull, Variable, SIMPLE};
def openMA;
def closeMA;
def highMA;
def lowMA;
switch (movingAverageType) {
case Simple:
openMA = compoundValue(1, Average(open, period), open);
closeMA = compoundValue(1, Average(close, period), close);
highMA = compoundValue(1, Average(high, period), high);
lowMA = compoundValue(1, Average(low, period), low);
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 Weighted:
openMA = compoundValue(1, WMA(open, period), open);
closeMA = compoundValue(1, WMA(close, period), close);
highMA = compoundValue(1, WMA(high, period), high);
lowMA = compoundValue(1, WMA(low, period), low);
Case Hull:
openMA = compoundValue(1, HullMovingAvg(open, period), open);
closeMA = compoundValue(1, HullMovingAvg(close, period), close);
highMA = compoundValue(1, HullMovingAvg(high, period), high);
lowMA = compoundValue(1, HullMovingAvg(low, period), low);
case variable:
openMA = compoundValue(1, VariableMA(open, period), open);
closeMA = compoundValue(1, VariableMA(close, period), close);
highMA = compoundValue(1, VariableMA(high, period), high);
lowMA = compoundValue(1, VariableMA(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);
}
hidePricePlot(hideCandles);
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) ;
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);
}
plot o = haopen;
o.hide();
def haLow = min(lowMA, haOpen);
def haHigh = max(highMA,haOpen);
AddChart(high = haHigh, low = haLow, open = o, close = haclose, type = ChartType.CANDLE, growColor = GlobalColor("RisingMA"), fallColor = GlobalColor("FallingMA"), neutralColor = color.gray);
def haopen1 = if haopen>haclose
then HAopen
else double.nan;
def HAhigh1 = if haopen>=haclose
then hahigh
else double.nan;
def HAlow1 = if haopen>=haclose
then halow
else double.nan;
AddChart(high = haHigh1, low = haLow1, open = haopen1, close = haclose, type = ChartType.CANDLE, growColor = GlobalColor("FallingMA"), fallColor = GlobalColor("RisingMA"), neutralColor = color.gray);
def BullishChange = if ( haclose - haopen ) >= 0 and ( haclose[1] - haopen[1] ) <= 0 then yes else no;
def BearishChange = if ( haclose - haopen ) <= 0 and ( haclose[1] - haopen[1] ) >= 0 then yes else no;
plot Bullish = BullishChange;
Bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
Bullish.SetDefaultColor(Color.CYAN);
Bullish.SetLineWeight(2);
plot Bearish = BearishChange;
Bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_Down);
Bearish.SetDefaultColor(Color.CYAN);
Bearish.SetLineWeight(2);
So an update - I have been using this TTP Clone for 2 weeks now and having great success - even on 1 min timeframe - I enter on 3rd candle, use brackets on Tradovate for SL & TPThank you for sharing the code for this indicator - is that really all that TTP is doing with their $2000 product (admittedly - they do have training videos and heatmap etc)
Also - I see the initial period is set to 30 - is that the optimum setting for intraday trading?
Thank you
Hi, 1) do you recommend Trendtraderpro trading software ? 2) how do get the TTP Clone on TOSSo an update - I have been using this TTP Clone for 2 weeks now and having great success - even on 1 min timeframe - I enter on 3rd candle, use brackets on Tradovate for SL & TP
I don't use TTP Software and don't recommend spending $1500 for an indictor which seems to behave like a Smoothed HA - I am using the code at the top of this thread - which you can get into TOS under Studies->Edit Studies->CreateHi, 1) do you recommend Trendtraderpro trading software ? 2) how do get the TTP Clone on TOS
Hi - thank you for your comment - could you elaborate as to why this is better than the HA code posted at the beginning of this thread?@Mikew Check this , we have better system than this https://usethinkscript.com/posts/55520/
Join useThinkScript to post your question to a community of 21,000+ developers and traders.
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
Repaints Cup and Handle Indicator for ThinkorSwim | Indicators | 23 | ||
The Ultimate Buy and Sell Indicator for ThinkOrSwim | Indicators | 5 | ||
Z-Score Probability Indicator for ThinkOrSwim | Indicators | 29 | ||
HTF PO3 Indicator For ThinkOrSwim | Indicators | 40 | ||
Market Bias (CEREBR) Indicator for ThinkOrSwim | Indicators | 13 |
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.