Convert the Half Trend Indicator to Pine for use in Trading View
// HalfTrend PRC indicator 10.03.2017
lowpricei = Lowest[Amplitude](low)
highpricei = Highest[Amplitude](high)
lowma = average[Amplitude](low)
highma = average[Amplitude](high)
if barindex>Amplitude then
if(nexttrend=1) then
maxlowprice=Max(lowpricei,maxlowprice)
if(highma<maxlowprice and Close<Low[1]) then
trend=1.0
nexttrend=0
minhighprice=highpricei
endif
endif
if(nexttrend=0) then
minhighprice=Min(highpricei,minhighprice)
if(lowma>minhighprice and Close>High[1]) then
trend=0.0
nexttrend=1
maxlowprice=lowpricei
endif
endif
if(trend=0.0) then
if(trend[1]<>0.0) then
up=down[1]
else
up=Max(maxlowprice,up[1])
endif
down=0.0
else
if(trend[1]<>1.0) then
down=up[1]
else
down=Min(minhighprice,down[1])
endif
up=0.0
endif
endif
if up>0 then
halftrend = up
color = 1
else
halftrend = down
color = -1
endif
cc = customclose
ma = average [p,m](halftrend)
return cc as " cc " , halftrend coloured by color as "Half Trend" , ma as " ma ht "
// Variables :
// Amplitude = 2
// p = 6
// m = 2 pondérée
MT4 code is attached pls check out .
It’s possible to make free conversions from other platforms to ProRealTime.
For other conversions apply through the paid services at https://www.prorealcode.com/trading-programming-services/
Thsnk you 🙂
Welcome to the forums.
Do not quote in your posts unnecessarily – it is quite obvious that you were replying to Roberto as he was the only other person in the Topic! Please re-read the forum rules regarding using quotes.
Roberto has already answered your question. Conversion to PRT Code is free. Conversion from PRT Code is a paid for service. Use the link Roberto posted to ask about this service.
HOW TO GET FREE CODE CCONVERTION
HOW TO GET FREE CODE CCONVERTION
ASK FOR A CONVERSION FROM TRADINGVIEW TO PRT AND NOT FROM PRT TO TRADINGVIEW – THAT’S HOW!
Your question has now been answered three times.
I have deleted your last ‘junk’ post.
If you keep asking the same question over and over again then it will be considered as spam and your account closed.
Capital letters are considered shouting and should not be used in forums to ask a question by the way.
My profile name is lucky singh Pls change to this.
You changed it yourself. Your account will still be in the name of ‘xxx’ but your profile name is now ‘xxx’.
Moderators have better things to do than edit your old posts to remove mentions of ‘xxx’ just because you chose to change your user name. For example there is a glass of wine left in the bottle that really needs drinking. 🙂