Any body now if their STC Indicator - A Better MACD [SHK] for mt4? I have code for tradingview but i need mt4 verion can any one help convert this
Code: Select all
//@version=4
//[SHK] STC colored indicator
//https://www.tradingview.com/u/shayankm/
study(title="[SHK] Schaff Trend Cycle (STC)", shorttitle="STC", overlay=false)
EEEEEE=input(12,"Length")
BBBB=input(26,"FastLength")
BBBBB=input(50,"SlowLength")
AAAA(BBB, BBBB, BBBBB) =>
fastMA = ema(BBB, BBBB)
slowMA = ema(BBB, BBBBB)
AAAA = fastMA - slowMA
AAAA
AAAAA(EEEEEE, BBBB, BBBBB) =>
AAA=input(0.5)
var CCCCC = 0.0
var DDD = 0.0
var DDDDDD = 0.0
var EEEEE = 0.0
BBBBBB = AAAA(close,BBBB,BBBBB)
CCC = lowest(BBBBBB, EEEEEE)
CCCC = highest(BBBBBB, EEEEEE) - CCC
CCCCC := (CCCC > 0 ? ((BBBBBB - CCC) / CCCC) * 100 : nz(CCCCC[1]))
DDD := (na(DDD[1]) ? CCCCC : DDD[1] + (AAA * (CCCCC - DDD[1])))
DDDD = lowest(DDD, EEEEEE)
DDDDD = highest(DDD, EEEEEE) - DDDD
DDDDDD := (DDDDD > 0 ? ((DDD - DDDD) / DDDDD) * 100 : nz(DDDDDD[1]))
EEEEE := (na(EEEEE[1]) ? DDDDDD : EEEEE[1] + (AAA * (DDDDDD - EEEEE[1])))
EEEEE
mAAAAA = AAAAA(EEEEEE,BBBB,BBBBB)
mColor = mAAAAA > mAAAAA[1] ? color.new(color.green,20) : color.new(color.red,20)
plot(mAAAAA,color=mColor, title="STC",linewidth=2)
ul=plot(25,color=color.new(color.gray,70))
ll=plot(75,color=color.new(color.gray,70))
fill(ul,ll,color=color.new(color.gray,96))
If any one can help that would be good.
Here link to source website
https://www.tradingview.com/script/WhRR ... -MACD-SHK/
Thanks.