Exponential average error in indicator?
Forums › ProRealTime English forum › ProBuilder support › Exponential average error in indicator?
- This topic has 22 replies, 5 voices, and was last updated 5 years ago by pieroim.
-
-
10/30/2019 at 9:38 AM #111612
Hi all,
I took this indicator from a purchased book, but unfortunately in compiling it gives me an error .. I tried various ways to solve the error, but I can’t understand what’s wrong with this code.
In particular I think I have identified the error in the ExponentialAverage.. I tried to pass “nn” after a Round function thinking it could be a problem with the format of the numbers, but nothing.
The code according to the author of the book must work, he also inserted several examples of graphs with this indicator .. but it doesn’t go..
Indicator..123456789101112131415161718192021222324if Barindex < 2 thenBU = CloseelseBU = BU[1]-BU[2]/3.414+(1/3.414)*CloseendifSignal = BUNoise = CloseSigmaSignal = STD[PP](Signal)SigmaNoise = STD[PP](Noise)a = SigmaSignal/SigmaNoisen = (2/a)-1if n < 0 thennn = 1elsenn = nendif//roundedROCvalue = ROUND(nn)MB = ExponentialAverage[nn](Close)Return MB COLOURED(0,250,0)10/30/2019 at 10:22 AM #111626Use more meaningful titles when creating a new topic. Thank you 🙂
What error is reported? you can attach a picture of the error message.
10/30/2019 at 10:36 AM #11163010/30/2019 at 10:43 AM #11163310/30/2019 at 10:54 AM #11163610/30/2019 at 11:01 AM #111638Use pp = 20 (default value for STD) and the Indicator appears to work, but appears to follow Price profile??
SigmaSignal = STD[20](Signal)
SigmaNoise = STD[20](Noise)Hi, I set it directly in the function, but I have the same error..
Prorealtime v.11.1 – 1.8.0_45
10/30/2019 at 11:19 AM #111641I have not used v11 so far. I don’t know what that error is.
10/30/2019 at 11:27 AM #11164210/30/2019 at 12:10 PM #11164510/30/2019 at 12:12 PM #111646[17]..
this is the last tested with the same error
123456789101112131415161718192021if Barindex < 2 thenBU = CloseelseBU = BU[1]-BU[2]/3.414+(1/3.414)*CloseendifSignal = BUNoise = CloseSigmaSignal = STD[17](Signal)SigmaNoise = STD[17](Noise)a = SigmaSignal/SigmaNoisen = (2/a)-1if n < 0 thennn = 1elsenn = nendifMB = ExponentialAverage[nn](Close)Return MB COLOURED(0,250,0)10/30/2019 at 12:20 PM #11164810/30/2019 at 12:26 PM #11164910/30/2019 at 12:32 PM #11165010/30/2019 at 12:41 PM #11165310/30/2019 at 12:57 PM #111654 -
AuthorPosts
Find exclusive trading pro-tools on