Old good code for Chande's Trendscore indicator to be fixed
Forums › ProRealTime English forum › ProBuilder support › Old good code for Chande's Trendscore indicator to be fixed
- This topic has 4 replies, 3 voices, and was last updated 6 years ago by Nicolas.
-
-
11/24/2017 at 9:36 AM #53799
Hi,
I have this code for Chande’s Trendscore indicator which worked very well with old versions of prorealtime but gives error with the new. I dont know how to adjust the formula.
Can anyone help please?
Thanks
Andrea
Once False = 0
Once True = 1
Once Noft = -1
Once PI = 3.141592653If False = True and Noft = False and Not True Then
endifP2=Round(3 * PI)
AB=P2 + 1TS=False
C=False
P1=AB
P3=10
P4=100Noft = Noft + True and Not False
For Q=1 to P1 Do
If Close >= Close[P2 – C] Then
TS=TS+1
endif
c=c+True
NextC=False
For Q=True to P1 Do
If close<close[P2-c] Then
TS=TS-True
Endif
c=c+True
nextTT= TriangularAverage[P3](TS)
TV=TriangularAverage[P4](TS)If Barindex<P2 Then
TS=undefined
TV=undefined
TT=undefined
EndifReturn TS Coloured(100,25,250) as “Slow”,TT Coloured(250,10,250) as “Quick”,TV Coloured(155,255,0) as “Median Line”
11/24/2017 at 9:46 AM #53803Please use the “Insert PRT code” identified by “<>” on the grey bar above your text when posting, to make your code more readable:
123456789101112131415161718192021222324252627282930313233343536373839404142434445Once False = 0Once True = 1Once Noft = -1Once PI = 3.141592653If False = True and Noft = False and Not True ThenendifP2=Round(3 * PI)AB=P2 + 1TS=FalseC=FalseP1=ABP3=10P4=100Noft = Noft + True and Not FalseFor Q=1 to P1 DoIf Close >= Close[P2 – C] ThenTS=TS+1endifc=c+TrueNextC=FalseFor Q=True to P1 DoIf close<close[P2-c] ThenTS=TS-TrueEndifc=c+TruenextTT= TriangularAverage[P3](TS)TV=TriangularAverage[P4](TS)If Barindex<P2 ThenTS=undefinedTV=undefinedTT=undefinedEndifReturn TS Coloured(100,25,250) as "Slow",TT Coloured(250,10,250) as "Quick",TV Coloured(155,255,0) as "Median Line"Roberto
11/27/2017 at 9:02 AM #54068The code is giving error because of the wrong copy/paste of quotation marks on the last line. I changed the code from Roberto in the above post to be perfectly usable. Let us know if it still doesn’t work for you.
1 user thanked author for this post.
12/02/2017 at 2:57 PM #54537Hi Nicolas,
thanks for your answer. I tried again but the cose indicates always the same error at each false or true variables.
12/04/2017 at 1:18 PM #54690Sorry, I haven’t well read the code at the first glance, this is fixed:
123456789101112131415161718192021222324252627282930313233343536373839404142434445Once fFalse = 0Once tTrue = 1Once Noft = -1Once PI = 3.141592653//If fFalse = 1 and Noft = False and Not True Then//endifP2=Round(3 * PI)AB=P2 + 1TS=fFalseC=fFalseP1=ABP3=10P4=100Noft = Noft + tTrue and Not fFalseFor Q=1 to P1 DoIf Close >= Close[P2 - C] ThenTS=TS+1endifc=c+tTrueNextC=fFalseFor Q=tTrue to P1 DoIf close<close[P2-c] ThenTS=TS-tTrueEndifc=c+tTruenextTT= TriangularAverage[P3](TS)TV=TriangularAverage[P4](TS)If Barindex<P2 ThenTS=undefinedTV=undefinedTT=undefinedEndifReturn TS Coloured(100,25,250) as "Slow",TT Coloured(250,10,250) as "Quick",TV Coloured(155,255,0) as "Median Line" -
AuthorPosts
Find exclusive trading pro-tools on