Re: Already Converted TradingView Indicators to MT4 Indicators

181
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.
These users thanked the author Jackson Doh for the post (total 3):
Chickenspicy, Jedidiah, kvak


Re: Already Converted TradingView Indicators to MT4 Indicators

182
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
These users thanked the author Jackson Doh for the post:
Jedidiah

Re: Already Converted TradingView Indicators to MT4 Indicators

183
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.
These users thanked the author Jackson Doh for the post (total 2):
Jedidiah, Akela

Re: Already Converted TradingView Indicators to MT4 Indicators

184
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.
These users thanked the author Jackson Doh for the post:
Jedidiah

IndicatorRe: Already Converted TradingView Indicators to MT4 Indicators

185
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.


LikeRe: Already Converted TradingView Indicators to MT4 Indicators

186
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!!!
These users thanked the author moey_dw for the post:
Jackson Doh
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 👈

Re: Already Converted TradingView Indicators to MT4 Indicators

187
:In Love:
Attachments
These users thanked the author Jedidiah for the post (total 3):
moey_dw, Chickenspicy, RodrigoRT7
Be patient therefore, brethren, until the coming of the Lord. Behold, the husbandman waiteth for the precious fruit of the earth: patiently bearing till he receive the early and latter rain.
Behold, we account them blessed who have endured. You have heard of the patience of Job, and you have seen the end of the Lord, that the Lord is merciful and compassionate.


Who is online

Users browsing this forum: Abdi, Amazon [Bot], Applebot [Crawler], Bing [Bot], ChatGPT [Bot], dienone, Grapeshot [Bot], IBM oBot [Bot], Jonex1995, kvak, losajoca, TCT_bx and 97 guests