Re: Already Converted TradingView Indicators to MT4 Indicators

191
chickensword wrote: Wed Dec 07, 2022 8:26 am Was too good to be true sadface
Ut bot/ Linear regression candle
Only looks profitable
This is the linear regression candles; think I need more information on the UT Bot.
These users thanked the author mrtools for the post (total 2):
Chickenspicy, RodrigoRT7


Re: Already Converted TradingView Indicators to MT4 Indicators

192
mrtools wrote: Wed Dec 07, 2022 2:24 pm This is the linear regression candles; think I need more information on the UT Bot.
Image
Thank you!, I found them almost like heikin smoothed

I have no idea what Ut bot is made of either, it’s atr and then something else I don’t know if it’s an average of something
Like the supertrend or step averages

Looks like Ema cross atr stop
These users thanked the author Chickenspicy for the post:
RodrigoRT7
0 + 0 = 0
Infinite / Infinite = 1
1 way to Heaven & it matters

Re: Already Converted TradingView Indicators to MT4 Indicators

195
mrtools wrote: Tue Dec 06, 2022 7:32 pm HIGH and LOW Optimized Trend Tracker HOTT LOTT

The HOTT LOTT is based off Anıl Özekşi's OTT - Optimized Trend Tracker.

This particular version has two lines of Optimized Trend Tracker which uses the HIGHEST price values (HOTT) and LOWEST price values (LOTT). The difference with this version is that the OTT uses a CLOSE price.

Guys I don't think this part is right for the upper channel

Code: Select all

if (MaType==ma_vidya)  valH[i]        = iVidya(MathMax(iHigh(NULL,0,iHighest(NULL,0,(int)PriceH,HLPeriod,i)),iHigh(NULL,0,iHighest(NULL,0,(int)PriceL,HLPeriod,i))),MaLength,VidyaSmoothPeriod,i,0);
      else  valH[i]        = iCustomMa(MaType,MathMax(iHigh(NULL,0,iHighest(NULL,0,(int)PriceH,HLPeriod,i)),iHigh(NULL,0,iHighest(NULL,0,(int)PriceL,HLPeriod,i))),MaLength,i,Bars,0);
and this for the lower channel

Code: Select all

if (MaType==ma_vidya)  valL[i] = iVidya(MathMin(iLow(NULL,0,iLowest(NULL,0,(int)PriceH,HLPeriod,i)),iLow(NULL,0,iLowest(NULL,0,(int)PriceL,HLPeriod,i))),MaLength,VidyaSmoothPeriod,i,1);
	  else valL[i] = iCustomMa(MaType,MathMin(iLow(NULL,0,iLowest(NULL,0,(int)PriceH,HLPeriod,i)),iLow(NULL,0,iLowest(NULL,0,(int)PriceL,HLPeriod,i))),MaLength,i,Bars,1);

I did something like this

Code: Select all

double hi   = high[ArrayMinimum(high,HLPeriod,i)];
      double lo   =  low[ArrayMinimum( low,HLPeriod,i)];
         wrk[r].valH = iCustomMa(MaType,hi,MaLength,i,rates_total,0);
         wrk[r].valL = iCustomMa(MaType,lo,MaLength,i,rates_total,1);
unless I am missing something please let me now, anyway, did a version too.
Image
Thank you MrTools and Kvak for picking up on this. I had indeed corrected already some errors since then but was still aiming to debug more before posting an update.

Only saw your efforts this morning (after the daily download mention) and I yet need to drop it on a chart this evening, but MrTools can you check 1 thing:

You indicated you have incorporated the iVidya into the iCustomMa call, which sounds fine but you provide the following code:

Code: Select all

      double hi   = high[ArrayMinimum(high,HLPeriod,i)];
      double lo   =  low[ArrayMinimum( low,HLPeriod,i)];
         wrk[r].valH = iCustomMa(MaType,hi,MaLength,i,rates_total,0);
         wrk[r].valL = iCustomMa(MaType,lo,MaLength,i,rates_total,1);
Pls confirm but I reckon the High should be looking for the maximum and therefore look like this:

Code: Select all

      double hi   = high[ArrayMaximum(high,HLPeriod,i)];
      double lo   =  low[ArrayMinimum( low,HLPeriod,i)];
         wrk[r].valH = iCustomMa(MaType,hi,MaLength,i,rates_total,0);
         wrk[r].valL = iCustomMa(MaType,lo,MaLength,i,rates_total,1);
Also curious how the VidyaSmoothPeriod is handled now that the Vidya is incorporated in the iCustom call. Will see that tonight.

Furthermore, and again I need to see how it is handled this evening when I drop the indie on a chart, but I think it is lost in this latest version given that you are calling the arrays "high" and "low" which normally means you have replaced the "start"-function by the "OnCalculate"-function, which in turn would mean that the HOTTLOTT has lost the functionality (at least the one I added) of using the open and close as well as the high and low to create the channels. Is this deduction correct?

Nonetheless thank you both for pushing this one along quicker than I have managed thus far, much appreciated.

Cheers, Norbert
These users thanked the author nwesterhuijs for the post (total 3):
Chickenspicy, Jedidiah, Jackson Doh


Re: Already Converted TradingView Indicators to MT4 Indicators

197
nwesterhuijs wrote: Wed Dec 07, 2022 3:40 pm Thank you MrTools and Kvak for picking up on this. I had indeed corrected already some errors since then but was still aiming to debug more before posting an update.

Only saw your efforts this morning (after the daily download mention) and I yet need to drop it on a chart this evening, but MrTools can you check 1 thing:

You indicated you have incorporated the iVidya into the iCustomMa call, which sounds fine but you provide the following code:

Code: Select all

      double hi   = high[ArrayMinimum(high,HLPeriod,i)];
      double lo   =  low[ArrayMinimum( low,HLPeriod,i)];
         wrk[r].valH = iCustomMa(MaType,hi,MaLength,i,rates_total,0);
         wrk[r].valL = iCustomMa(MaType,lo,MaLength,i,rates_total,1);
Pls confirm but I reckon the High should be looking for the maximum and therefore look like this:

Code: Select all

      double hi   = high[ArrayMaximum(high,HLPeriod,i)];
      double lo   =  low[ArrayMinimum( low,HLPeriod,i)];
         wrk[r].valH = iCustomMa(MaType,hi,MaLength,i,rates_total,0);
         wrk[r].valL = iCustomMa(MaType,lo,MaLength,i,rates_total,1);
Also curious how the VidyaSmoothPeriod is handled now that the Vidya is incorporated in the iCustom call. Will see that tonight.

Furthermore, and again I need to see how it is handled this evening when I drop the indie on a chart, but I think it is lost in this latest version given that you are calling the arrays "high" and "low" which normally means you have replaced the "start"-function by the "OnCalculate"-function, which in turn would mean that the HOTTLOTT has lost the functionality (at least the one I added) of using the open and close as well as the high and low to create the channels. Is this deduction correct?

Nonetheless thank you both for pushing this one along quicker than I have managed thus far, much appreciated.

Cheers, Norbert
Hi Norbert,

In the vidya the smooth period is built in, in the function it was done this way to make it easier when included in the averages. Can be done the other way but when you have a bunch of different averages with more than period and price values, it can be a major pain if you want to include them as well.

Shouldn't matter whether you use "start" function or "OnCalculate" function you still have built in price arrays, only difference I have found is in "OnCalculate" function they are not capitalized, that's the only difference I have found. Posting a new version, where you can choose either hi/lo mode and if that is shut off you can choose whatever combination of the 30+ averages for the channel, the other prices are there for whatever price you want for breakout of the channel mode, some prefer a different price method for the channel breakout.

Again, THANKS for your version. Snapshot is using hl/lo mode off and using Heiken Ashi better formula open/close.
These users thanked the author mrtools for the post (total 11):
josi, oskar656, Jedidiah, Chickenspicy, kvak, thomdel, alexm, Jackson Doh, 太虚一毫, RodrigoRT7, SijjiN

Re: Already Converted TradingView Indicators to MT4 Indicators

199
respected sir kvak please convert these indicator in mt4
https://www.tradingview.com/script/Et6Y ... Index-LUX/

Code: Select all

// This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) https://creativecommons.org/licenses/by-nc-sa/4.0/
// © LuxAlgo

//@version=5
indicator("Squeeze Index [LuxAlgo]", "Squeeze Index [LuxAlgo]")
//------------------------------------------------------------------------------
//Settings
//-----------------------------------------------------------------------------{
conv   = input(50, 'Convergence Factor')

length = input(20)

src = input(close)

//Style
col_0 = input(#ffeb3b, 'Gradient'
  , inline = 'inline0'
  , group = 'Style')
  
col_1 = input(#ff5d00, ''
  , inline = 'inline0'
  , group = 'Style')
  
col_2 = input(#ff1100, ''
  , inline = 'inline0'
  , group = 'Style')

//-----------------------------------------------------------------------------}
//Squeeze index
//-----------------------------------------------------------------------------{
var max = 0.
var min = 0.

max := nz(math.max(src, max - (max - src) / conv), src)
min := nz(math.min(src, min + (src - min) / conv), src)
diff = math.log(max - min)

psi = -50 * ta.correlation(diff, bar_index, length) + 50

//-----------------------------------------------------------------------------}
//Plots
//-----------------------------------------------------------------------------{
css1 = color.from_gradient(psi, 0, 80, col_0, col_1)
css2 = color.from_gradient(psi, 80, 100, css1, col_2)

plot_0 = plot(psi, 'PSI', psi > 80 ? na : css2)
plot(psi, 'Dots', psi > 80 ? css2 : na, style = plot.style_cross)

plot_1 = plot(80, display = display.none, editable = false)

fill(plot_0, plot_1, psi < 80 ? na : color.new(#ff1100, 80))

hline(80)

//-----------------------------------------------------------------------------}
Attachments
These users thanked the author muhammadfarooq for the post:
Jedidiah
exness is scam broker. avoid Exness

Re: Already Converted TradingView Indicators to MT4 Indicators

200
if you have a profitable strategy from it then i'll do it

muhammadfarooq wrote: Sun Dec 18, 2022 1:52 am respected sir kvak please convert these indicator in mt4
https://www.tradingview.com/script/Et6Y ... Index-LUX/

Code: Select all

// This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) https://creativecommons.org/licenses/by-nc-sa/4.0/
// © LuxAlgo

//@version=5
indicator("Squeeze Index [LuxAlgo]", "Squeeze Index [LuxAlgo]")
//------------------------------------------------------------------------------
//Settings
//-----------------------------------------------------------------------------{
conv   = input(50, 'Convergence Factor')

length = input(20)

src = input(close)

//Style
col_0 = input(#ffeb3b, 'Gradient'
  , inline = 'inline0'
  , group = 'Style')
  
col_1 = input(#ff5d00, ''
  , inline = 'inline0'
  , group = 'Style')
  
col_2 = input(#ff1100, ''
  , inline = 'inline0'
  , group = 'Style')

//-----------------------------------------------------------------------------}
//Squeeze index
//-----------------------------------------------------------------------------{
var max = 0.
var min = 0.

max := nz(math.max(src, max - (max - src) / conv), src)
min := nz(math.min(src, min + (src - min) / conv), src)
diff = math.log(max - min)

psi = -50 * ta.correlation(diff, bar_index, length) + 50

//-----------------------------------------------------------------------------}
//Plots
//-----------------------------------------------------------------------------{
css1 = color.from_gradient(psi, 0, 80, col_0, col_1)
css2 = color.from_gradient(psi, 80, 100, css1, col_2)

plot_0 = plot(psi, 'PSI', psi > 80 ? na : css2)
plot(psi, 'Dots', psi > 80 ? css2 : na, style = plot.style_cross)

plot_1 = plot(80, display = display.none, editable = false)

fill(plot_0, plot_1, psi < 80 ? na : color.new(#ff1100, 80))

hline(80)

//-----------------------------------------------------------------------------}
Image
These users thanked the author ionone for the post:
Sepo


Who is online

Users browsing this forum: Amazon [Bot], Jimmy, Majestic-12 [Bot], mrtools, rudiarius, SijjiN and 104 guests