Hello traders and coders,
I don't know if I'm in the right section, but I would like to know if someone could translate this code (Trading view) in MQ4?
Its a sort of Heiken ashi but with less noise.
Regards,
//
study(title="Humble LinReg Candles", shorttitle="LinReg Candles", format=format.price, precision=4, overlay=true)
signal_length = input(title="Signal Smoothing", type=input.integer, minval = 1, maxval = 200, defval = 11)
sma_signal = input(title="Simple MA (Signal Line)", type=input.bool, defval=true)
lin_reg = input(title="Lin Reg", type=input.bool, defval=true)
linreg_length = input(title="Linear Regression Length", type=input.integer, minval = 1, maxval = 200, defval = 11)
bopen = lin_reg ? linreg(open, linreg_length, 0) : open
bhigh = lin_reg ? linreg(high, linreg_length, 0) : high
blow = lin_reg ? linreg(low, linreg_length, 0) : low
bclose = lin_reg ? linreg(close, linreg_length, 0) : close
r = bopen < bclose
signal = sma_signal ? sma(bclose, signal_length) : ema(bclose, signal_length)
plotcandle(r ? bopen : na, r ? bhigh : na, r ? blow: na, r ? bclose : na, title="LinReg Candles", color= color.green, wickcolor=color.green, bordercolor=color.green, editable= true)
plotcandle(r ? na : bopen, r ? na : bhigh, r ? na : blow, r ? na : bclose, title="LinReg Candles", color=color.red, wickcolor=color.red, bordercolor=color.red, editable= true)
plot(signal, color=color.white)
Re: Heiken Ashi Type Indicators
292Think this is pretty close.legat12 wrote: Tue Aug 24, 2021 6:51 pm Hello traders and coders,
I don't know if I'm in the right section, but I would like to know if someone could translate this code (Trading view) in MQ4?
Its a sort of Heiken ashi but with less noise.
Regards,
//
study(title="Humble LinReg Candles", shorttitle="LinReg Candles", format=format.price, precision=4, overlay=true)
signal_length = input(title="Signal Smoothing", type=input.integer, minval = 1, maxval = 200, defval = 11)
sma_signal = input(title="Simple MA (Signal Line)", type=input.bool, defval=true)
lin_reg = input(title="Lin Reg", type=input.bool, defval=true)
linreg_length = input(title="Linear Regression Length", type=input.integer, minval = 1, maxval = 200, defval = 11)
bopen = lin_reg ? linreg(open, linreg_length, 0) : open
bhigh = lin_reg ? linreg(high, linreg_length, 0) : high
blow = lin_reg ? linreg(low, linreg_length, 0) : low
bclose = lin_reg ? linreg(close, linreg_length, 0) : close
r = bopen < bclose
signal = sma_signal ? sma(bclose, signal_length) : ema(bclose, signal_length)
plotcandle(r ? bopen : na, r ? bhigh : na, r ? blow: na, r ? bclose : na, title="LinReg Candles", color= color.green, wickcolor=color.green, bordercolor=color.green, editable= true)
plotcandle(r ? na : bopen, r ? na : bhigh, r ? na : blow, r ? na : bclose, title="LinReg Candles", color=color.red, wickcolor=color.red, bordercolor=color.red, editable= true)
plot(signal, color=color.white)
- These users thanked the author mrtools for the post (total 4):
- Krunal Gajjar, legat12, RodrigoRT7, talaate
Re: Heiken Ashi Type Indicators
293This is an attempt to translate the tradeview Heiken ashi rsi. Indicator has divergence and limit bars to hopefully make it lighter on the computer.
Re: Heiken Ashi Type Indicators
294waoww super nice indi mrtoos........... pls can u give us option to select color for levels!!!mrtools wrote: Thu Sep 16, 2021 1:42 pm This is an attempt to translate the tradeview Heiken ashi rsi. Indicator has divergence and limit bars to hopefully make it lighter on the computer.
Official Forex-station GIF animator at your service 
See a GIF with Forex-station.com on it? I probably made it
The best divergence indicator in the world.
Real news exists: Infowars.com
See a GIF with Forex-station.com on it? I probably made it
The best divergence indicator in the world.
Real news exists: Infowars.com
Re: Heiken Ashi Type Indicators
295This is a superb indicator. A new RSI Divergence with additional Heiken Ashi in the subwindow which can be used to gauge trendsmrtools wrote: Thu Sep 16, 2021 1:42 pm This is an attempt to translate the tradeview Heiken ashi rsi. Indicator has divergence and limit bars to hopefully make it lighter on the computer.

Re: Heiken Ashi Type Indicators
296Added the level color option.moey_dw wrote: Thu Sep 16, 2021 10:46 pm waoww super nice indi mrtoos........... pls can u give us option to select color for levels!!!![]()
Re: Heiken Ashi Type Indicators
297
HI MIKE MRTOOLS MADE THE INDICATOR IN POST ABOVE.......... U TRY IT YET OR??mikew6051 wrote: Thu Sep 16, 2021 1:49 am could this ha rsi oscillator indicator from trading view be converted into mt4?
beast............ thx bro mrtoolz it is the rsi that rsi traders must now use bcos u can use as a normal rsi but with heiken ashi thrown in............



Official Forex-station GIF animator at your service 
See a GIF with Forex-station.com on it? I probably made it
The best divergence indicator in the world.
Real news exists: Infowars.com
See a GIF with Forex-station.com on it? I probably made it
The best divergence indicator in the world.
Real news exists: Infowars.com
Re: Heiken Ashi Type Indicators
298hi mr.tools
great indicator thanks. the updated version with color for me it is showing nothing any instructions please?
Thankyou!!
Don't fight the market let it reveal its tricks, then strike with precision. 
Re: Heiken Ashi Type Indicators
299Are you getting any errors in your terminal/experts or terminal/journal tabs?ujtrader wrote: Sat Sep 18, 2021 2:00 am hi mr.tools
great indicator thanks. the updated version with color for me it is showing nothing any instructions please?
Thankyou!!
Re: Heiken Ashi Type Indicators
300it only show empty in offline charts...no error it says loaded successfullymrtools wrote: Sat Sep 18, 2021 2:40 am Are you getting any errors in your terminal/experts or terminal/journal tabs?
Don't fight the market let it reveal its tricks, then strike with precision. 