glaz

Slow Heiken Ashi

2641 14 615
Period= Length of the slow HA
Fastend and Slowend = just calculations for the Kama function no need to change those.
Signal= Shows/Hides the triangles
Remove from Favorite Scripts Add to Favorite Scripts
study("Slow Heiken Ashi",overlay=true,precision=0)
//by Glaz.
//KAMA function
p=input(6,title='Period')
fastend=input(0.666,step=0.001)
slowend=input(0.0645,step=0.0001)
kama(close,amaLength)=>
    diff=abs(close[0]-close[1])
    signal=abs(close-close[amaLength])
    noise=sum(diff, amaLength)
    efratio=noise!=0 ? signal/noise : 1
    smooth=pow(efratio*(fastend-slowend)+slowend,2)
    kama=nz(kama[1], close)+smooth*(close-nz(kama[1], close))
    kama

//Slow Heiken Ashi
hakamaper=1/2
Signal=input(true)
Om=sma(open,p)
Hm=sma(high,p)
Lm=sma(low,p)
Cm=sma(close,p)
vClose=(Om+Hm+Lm+Cm)/4
vOpen= kama(vClose[1],hakamaper)
vHigh= max(Hm,max(vClose, vOpen))
vLow=  min(Lm,min(vClose, vOpen))

// Plots
vcolor= vOpen>vClose ?red:green
plotcandle(vOpen,vHigh,vLow,vClose,color=vcolor)

//signals
plotchar(Signal?(cross(vOpen,vClose) and vOpen[1]<vClose[1]?vHigh:na):na,char='▼',color=white,transp=0,location=location.absolute)
plotchar(Signal?(cross(vOpen,vClose) and vOpen[1]>vClose[1]?vLow:na):na,char='▲',color=white,transp=0,location=location.absolute)

//http://www.wisestocktrader.com/indicators/3110-heikein-ashi-smooth-trading-system
Alphaoptions
2 years ago
How do we turn off the default candles to be able to display as you have them?
Reply
glaz Alphaoptions
2 years ago
The same way you hide an indicator.
Reply
Alphaoptions glaz
2 years ago
Learned something new thanks! As we work with it will lowering the period make it faster and vice versa? Thanks for sharing another great script!
Reply
wingchan13 PRO glaz
2 years ago
Sorry, I am still not knowing How to turn off the default candles to be able to display as you have them, sorry about my foolishness, can you teach me how to make/hide it??
thanks¬¬
Reply
glaz wingchan13
2 years ago
Lets say you add an indicator to your chart and then later you want to remove it, you just click at the X next to the name of it.
its the same with the candles, e.g. next to the pairs name Australian Dollar/USD it has a button to show/hide.
Reply
Cyberdyne
a year ago
This is really called Heikin Ashi Smoothed.
Reply
glaz Cyberdyne
a year ago
Probably :) i have the link with the easylanguage source code at the end of the script and it was under the name "Heikein Ashi Smooth trading system"
Reply
limal2000
a year ago
Hi Glaz, This Slow Heiken Ashi can be use for any stock or just for Australian Dollar/U.S. Dollar (FX:AUDUSD) forex?
Reply
anmpatel
7 months ago
wow...what a nice system....
but how should we enter and exit...?? price close below/above? or change in color of close candle?? i.e. if candle close red then exit long and enter short??
pl throw some light...
thanks.
Reply
johnd64
5 months ago
Just found this. Beautiful work!
Reply
mykb PRO
5 months ago
Hi, could you please tell what close in the kama function will return. (as hakamaper = 1/2, and kama(vClose, hakamaper))
Reply
HumayunBajwa PRO
4 months ago
how could one decide tp and sl using this strategy .
Reply
Hi Glaz.
Love this script. Nice job.
Just a litter contribution . Add this couples of lines in order to have the signal Alert.

short= cross(vOpen,vClose) and vOpen<vClose?vHigh:na
long= cross(vOpen,vClose) and vOpen>vClose?vLow:na
alertcondition(short,title='Short Signal', message='Short Signal')
alertcondition(long,title='Long Signal', message='Long Signal')
Reply
Nice work! Thanks a lot.
Reply
Ideas Scripts Chart
United States
United Kingdom
India
España
France
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Account and Billing Sign Out