INDI FOR HALFTREND TRIPLE
Forums › ProRealTime English forum › ProBuilder support › INDI FOR HALFTREND TRIPLE
- This topic has 10 replies, 2 voices, and was last updated 7 years ago by LUCASSEN.
-
-
03/21/2017 at 7:53 PM #29352
Hello everyone
Nicolas has made the half trend triple indicator, it is a great indicator, is het possibel , to make a indicator with the difference between half trend 3 – half trend 2 (FROM THE HALF TREND TRIPLE INDI)
If anyone can do this, i am very grateful (maby Nicolas)
best greeting to all and happy trading
03/22/2017 at 2:02 PM #2944703/22/2017 at 2:26 PM #2945103/22/2017 at 5:34 PM #2947603/22/2017 at 7:09 PM #29491Hallo Nicolas, it is the bottem one, it likes similair to your indicator, but seperated from the chart, what you think, sall i shared op the forum ?
I have another question for you, since, i have pro 10,3, i get no good picture from the steponemoreaverage, it is at the bottem of the chart, i tried, your comment to put line 15 to it but ik get the message syntax error line 85,teken 1,put the syntax from this rule in , but you have already don that ; RETURN enz ………
What do i wrong????????
Greetings Lucassen
03/22/2017 at 7:18 PM #2949503/22/2017 at 7:52 PM #29501About your HalfTrend difference indicator, yes for sure you can share it for everyone to benefit from your idea. Please share it in the Library, thank you.
For the “step one more average” indicator, please post the code here and what you are wanting to do with it, it’s easier for me to help like this instead of downloading and importing each file everyone is sharing on forums..
03/22/2017 at 8:40 PM #29510//PRC_step one more average | indicator
//12.12.2016
//Nicolas @ http://www.prorealcode.com
//Sharing ProRealTime knowledge
//converted and adapted from MT4 version//Length = 25
//Speed = 3.0
//Adaptive = true;
//Sensitivity = 0.5 // Sensivity Factor
//StepSize = 50 // Step Size periodLength = Max(Length,1)
Speed = Max(Speed,-1.5)
if barindex > length then (this line i added to here)line 15
price = average[1](customclose)//adaptive period
averagePeriod = Length
if adaptive=1 and averagePeriod > 1 then
minPeriod = averagePeriod/2.0
maxPeriod = minPeriod*5.0
endPeriod = round(maxPeriod)
signal = Abs((price-stored[endPeriod]))
noise = 0.00000000001for k=1 to endPeriod do
noise=noise+Abs(price-stored[k])
averagePeriod = round(((signal/noise)*(maxPeriod-minPeriod))+minPeriod)
nextendiftconst=Speedalpha = (2.0+tconst)/(1.0+tconst+averagePeriod)e1 = e1 + alpha*(price-e1)
e2 = e2 + alpha*(e1-e2)
v1 = 1.5 * e1 – 0.5 * e2
e3 = e3 + alpha*(v1 -e3)
e4 = e4 + alpha*(e3-e4)
v2 = 1.5 * e3 – 0.5 * e4
e5 = e5 + alpha*(v2 -e5)
e6 = e6 + alpha*(e5-e6)
v3 = 1.5 * e5 – 0.5 * e6stored=price//step function
//iStepMa(Sensitivity,iATR(NULL,0,StepSize,i),1.0,thigh,tlow,Close[i],i);
Sensitivity = max(Sensitivity,1*pointsize)
ATRStepSize=averagetruerange[StepSize]
Step = max(ATRStepSize,1*pointsize)
size = sensitivity*Step
phigh = v3
plow = v3[7]
stepMulti = 1.0
workStepsmax = phigh+2.0*size*stepMulti
workStepsmin = plow-2.0*size*stepMulti
workSteptrend = workSteptrend[1]
pprice = customclose
if (pprice>workStepsmax[1]) then
workSteptrend = 1
endif
if (pprice<workStepsmin[1]) then
workSteptrend = -1
endif
if (workSteptrend = 1) then
if (workStepsmin < workStepsmin[1]) then
workStepsmin=workStepsmin[1]
endif
result = workStepsmin+size*stepMulti
color = 1
endifif (workSteptrend = -1) then
if (workStepsmax > workStepsmax[1]) then
workStepsmax=workStepsmax[1]
endif
result = workStepsmax-size*stepMulti
color = -1
endifRETURN result coloured by color as “OMA step” ( here i get the syntax error, line 85 , fill syntax for this rule in)i get only the indicator on the AEX INDEX ON SHARES the indicator is at zero line flat03/23/2017 at 9:32 AM #29556Please find below the fixed code. If you add an IF statement, you need to close it with an ENDIF too. I only added an ENDIF at the end of the code before RETURN.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374//PRC_step one more average | indicator//12.12.2016//Nicolas @ www.prorealcode.com//Sharing ProRealTime knowledge//converted and adapted from MT4 versionLength = 25Speed = 3.0Adaptive = 1Sensitivity = 0.5 // Sensivity FactorStepSize = 50 // Step Size periodLength = Max(Length,1)Speed = Max(Speed,-1.5)if barindex > length then // (this line i added to here)line 15price = average[1](customclose)//adaptive periodaveragePeriod = Lengthif adaptive=1 and averagePeriod > 1 thenminPeriod = averagePeriod/2.0maxPeriod = minPeriod*5.0endPeriod = round(maxPeriod)signal = Abs((price-stored[endPeriod]))noise = 0.00000000001for k=1 to endPeriod donoise=noise+Abs(price-stored[k])averagePeriod = round(((signal/noise)*(maxPeriod-minPeriod))+minPeriod)nextendiftconst=Speedalpha = (2.0+tconst)/(1.0+tconst+averagePeriod)e1 = e1 + alpha*(price-e1)e2 = e2 + alpha*(e1-e2)v1 = 1.5 * e1 - 0.5 * e2e3 = e3 + alpha*(v1 -e3)e4 = e4 + alpha*(e3-e4)v2 = 1.5 * e3 - 0.5 * e4e5 = e5 + alpha*(v2 -e5)e6 = e6 + alpha*(e5-e6)v3 = 1.5 * e5 - 0.5 * e6stored=price//step function//iStepMa(Sensitivity,iATR(NULL,0,StepSize,i),1.0,thigh,tlow,Close[i],i);Sensitivity = max(Sensitivity,1*pointsize)ATRStepSize=averagetruerange[StepSize]Step = max(ATRStepSize,1*pointsize)size = sensitivity*Stepphigh = v3plow = v3[7]stepMulti = 1.0workStepsmax = phigh+2.0*size*stepMultiworkStepsmin = plow-2.0*size*stepMultiworkSteptrend = workSteptrend[1]pprice = customcloseif (pprice>workStepsmax[1]) thenworkSteptrend = 1endifif (pprice<workStepsmin[1]) thenworkSteptrend = -1endifif (workSteptrend = 1) thenif (workStepsmin < workStepsmin[1]) thenworkStepsmin=workStepsmin[1]endifresult = workStepsmin+size*stepMulticolor = 1endifif (workSteptrend = -1) thenif (workStepsmax > workStepsmax[1]) thenworkStepsmax=workStepsmax[1]endifresult = workStepsmax-size*stepMulticolor = -1endifendifRETURN result coloured by color as "OMA step"03/23/2017 at 10:52 AM #2956104/06/2017 at 10:49 AM #31235 -
AuthorPosts
Find exclusive trading pro-tools on