Andrew Abraham Trend Trader Indicator
Forums › ProRealTime English forum › ProBuilder support › Andrew Abraham Trend Trader Indicator
- This topic has 10 replies, 3 voices, and was last updated 6 years ago by Vonasi.
-
-
10/05/2018 at 6:05 PM #82099
ProRealCode Indicator Link: http://tinyurl.com/yd8cbnz6
In the first line of the code of Andrew Abraham Trend Trader, something is missing (See image attached):
Operators are Missing in this line1avrTR = weightedaverage[Length](AverageTnueRange[l](close))When two functions are placed in a statement, there is usually an operator between the functions. in this case, weightedaverage[Length](AverageTnueRange[l] need to tell the parser what action to perform. In the (AverageTnueRange[l](close)) I expected a delimiter so the parser would know when the function name was ended and the (close) property would be assigned.
If the language that is using this doesn’t need the above, a phrase explaining the action the line is intending to produce would be helpful. As it is, I don’t have a clue, without considerable random testing as to what was intended, and even then, my assumption would be based on visual reflection of the image shown above the code area.
Any help as to what the first line intended and how the close in the ATR parathesis is intending will be appreciated.
Thanks.
10/05/2018 at 6:15 PM #82104I’m not sure that I fully understand your problem but I will try to help.
If you download the ITF file from your link and import the strategy then you will get full functionality. If you just cut and paste the code then the variable LENGTH is not defined so just add a first line to the code of:
1Length = 21 // Or whatever value you want.On a seperate note I see that you have typed AverageTnueRange instead of AverageTrueRange but I assume this is just a typo?
10/05/2018 at 6:42 PM #82108<< If you download the ITF file from your link and import the strategy then you will get full functionality. >>
I don’t know how to download the indicator or where to look other than the page referenced above.
You are right about the typo.
I wasn’t looking for the “Length” parameter. Instead, I was hoping to get the missing operators, like + – / * etc. inserted in line 1.
In the AverageTrueRange part of line 1, there is no delimiter like a comma that separates the (AverageTrueRange[l](close)) function from the assigning property (close) that is contained with the parathesis of that part of line 1.
Thank you for your reply.
10/05/2018 at 7:11 PM #82109I would plsce [1] after CLOSE, instead of where it is now in line 1.
10/05/2018 at 7:20 PM #82111Can you write the entire line in a way that shows the operators and the offsets as they should be for error-free execution in the program that would execute the line?
Missing operators and offset line11 avrTR = weightedaverage[Length](AverageTnueRange[l](close))If no operators are missing in line, please tell me how the two functions know how to interact if the code line doesn’t make it clear?
As for the Close, how does the AverageTrueRange know the (close) is a parameter reference with it being delimited from the function name?
Thank you for the response.
10/05/2018 at 7:32 PM #82116I’d write it
1avrTR = weightedaverage[Length](AverageTrueRange(close[1]))or the equivalent
1avrTR = weightedaverage[Length](AverageTrueRange(close)[1])Moreover, AverageTrueRange is not written AverageTnueRange.
10/05/2018 at 7:36 PM #82117Sorry, the problem was just AverageTrueRange is not written AverageTnueRange.
Ignore the rest!
10/05/2018 at 9:36 PM #821321avrTR = weightedaverage[Length](AverageTrueRange(close)[1])If the above is correct, the parser recognizes the two functions will add, and when a property follows a function the item is the function’s influencer.
Is that how I should understand the code?
Thanks again for the support.
10/05/2018 at 11:40 PM #82134The code in line 1 was correct, do NOT modify it, just make the correction as I pointed out, this is the correct line as posted in the library
1avrTR = weightedaverage[Length](AverageTrueRange[1](close))10/06/2018 at 4:33 AM #8213610/06/2018 at 6:23 AM #82137I don’t know how to download the indicator or where to look other than the page referenced above.
The answers to how to import and export are all on the page you provided the link for.
-
AuthorPosts
Find exclusive trading pro-tools on