Page 19 of 66

Re: Already Converted TradingView Indicators to MT4 Indicators

Posted: Tue Dec 06, 2022 11:39 am
by Jackson Doh
kvak wrote: Tue Dec 06, 2022 10:22 am Hello, Interesting indicator...... I corrected some things whats I know.
You use old averages function, no strict and most of them have array error. I replace some strict averages functions.
Corrected mtf. Look on Icustom and interpolation. old version freez terminal.
Corrected button, old version not delete lines....
You forget line 342 to activated autowidth for candles.

For plotpoint havent idea for now, but I will look on it....
Image
Hey kvak,
I can't believe you posted this today! I was only working this file yesterday. So glad you fixed the array out of range issue on the EMA derivative averages as couldn't work out how to fix it. I saw the MTF was crashing the terminal with MaType amongst other references missing from the iCustom.

I looked at the original from TV and thought the candles weren't printing on the band cross like they maybe should, so I changed the code around line 540 to 580 and replaced with this:

Code: Select all

state[i] = (i<(Bars-2) ? (Close[i]>HOTT[i]) ? 1 : (Close[i]<LOTT[i]) ? -1 : ((Close[i]>LOTT[i]) && (Close[i]<HOTT[i])) ? 2 : state[i+1] : 0);
I just hashed out the original codes and got rid of the "state [ i ] = -2". They can be easily reinstated. I also added alerts to this.


Please download the indicators 2 posts below. The MTF wasn't working here. Sorry


On a separate note, thanks for covering the G Channel mtf request. I'm still learning mtf so used diffmerge with your update against the original to help understand it better.
Cheers, JD.

Re: Already Converted TradingView Indicators to MT4 Indicators

Posted: Tue Dec 06, 2022 11:55 am
by Jackson Doh
Jackson Doh wrote: Tue Dec 06, 2022 11:39 am Hey kvak,
I can't believe you posted this today! I was only working this file yesterday. So glad you fixed the array out of range issue on the EMA derivative averages as couldn't work out how to fix it. I saw the MTF was crashing the terminal with MaType amongst other references missing from the iCustom.

I looked at the original from TV and thought the candles weren't printing on the band cross like they maybe should, so I changed the code around line 540 to 580 and replaced with this:

Code: Select all

state[i] = (i<(Bars-2) ? (Close[i]>HOTT[i]) ? 1 : (Close[i]<LOTT[i]) ? -1 : ((Close[i]>LOTT[i]) && (Close[i]<HOTT[i])) ? 2 : state[i+1] : 0);
I just hashed out the original codes and got rid of the "state [ i ] = -2". They can be easily reinstated. I also added alerts to this.

Image


HOTT_LOTT_005 (alerts) 1.1.mq4
HOTT_LOTT_005 (alerts) 1.1.ex4

On a separate note, thanks for covering the G Channel mtf request. I'm still learning mtf so used diffmerge with your update against the original to help understand it better.
Cheers, JD.
Ahh, seems I messed up the mtf in my update. I'll try to fix it

Re: Already Converted TradingView Indicators to MT4 Indicators

Posted: Tue Dec 06, 2022 12:02 pm
by Jackson Doh
Jackson Doh wrote: Tue Dec 06, 2022 11:55 am Ahh, seems I messed up the mtf in my update. I'll try to fix it
MTF appears to be working OK now on this one. Apologies for not testing the original thoroughly.

Re: Already Converted TradingView Indicators to MT4 Indicators

Posted: Tue Dec 06, 2022 7:27 pm
by Jackson Doh
Jackson Doh wrote: Tue Dec 06, 2022 12:02 pm MTF appears to be working OK now on this one. Apologies for not testing the original thoroughly.
HOTT_LOTT_005 (alerts) 1.11.mq4
HOTT_LOTT_005 (alerts) 1.11.ex4
I must have been half asleep when I posted the above. I forgot to copy in a couple of sections for the alerts. Apologies, JD.

Re: Already Converted TradingView Indicators to MT4 Indicators

Posted: Tue Dec 06, 2022 7:32 pm
by mrtools
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.

Re: Already Converted TradingView Indicators to MT4 Indicators

Posted: Tue Dec 06, 2022 10:55 pm
by moey_dw
mrtools wrote: Tue Dec 06, 2022 7:32 pm
The HOTT LOTT is based off Anıl Özekşi's OTT - Optimized Trend Tracker.
Man lovely work Mrtoolz & Jacks....... good channel indicator & it is working superb thx guys!!!

Re: Already Converted TradingView Indicators to MT4 Indicators

Posted: Wed Dec 07, 2022 2:07 am
by Jedidiah
:In Love:

Re: Already Converted TradingView Indicators to MT4 Indicators

Posted: Wed Dec 07, 2022 3:50 am
by moey_dw
honje19960321 wrote: Wed Dec 07, 2022 2:07 am :In Love:
Love dis old school xard look...... 🤗🤗🤗

Re: Already Converted TradingView Indicators to MT4 Indicators

Posted: Wed Dec 07, 2022 5:28 am
by Chickenspicy
https://www.tradingview.com/v/d5aDAQwH/d5aDAQwH

I know there are fractal indicators already but could anyone possibly make them look like this one? With gratitude

Re: Already Converted TradingView Indicators to MT4 Indicators

Posted: Wed Dec 07, 2022 5:39 am
by mrtools
chickensword wrote: Wed Dec 07, 2022 5:28 am https://www.tradingview.com/v/d5aDAQwH/d5aDAQwH

I know there are fractal indicators already but could anyone possibly make them look like this one? With gratitude
Image
The link is not working.