code a moving average applied to any other indicator?
Forums › ProRealTime English forum › ProBuilder support › code a moving average applied to any other indicator?
- This topic has 7 replies, 3 voices, and was last updated 5 years ago by Vonasi.
-
-
12/07/2018 at 7:37 AM #86485
Good morning fam.
I’m able to code simple stuff that shows buy/sell conditions on chart using simple call function but would like to know how to code moving average which is applied to another indicator. Can anyone suggest what the code should look like?
Still early morning here so pardon if my question doesn’t make much sense:)
Best regards.
12/07/2018 at 8:54 AM #86488You can “inject” any data serie in another indicator.
In the below example, the variable “test” is containing RSI data serie, this variable is then pass through a simple moving average:
12345test = rsi[14]result = average[7](test)return result1 user thanked author for this post.
12/07/2018 at 11:53 AM #86505Ok thanks Nicolas got it working. I want to add now IF RSI[14] is lower then Average[7] (for example) then DRAWARROWUP(barindex,low)coloured(212,66,244) if not then vice-versa, but can’t find the correct way to do it. One more help would be appreciated. Still a green boy in coding land but learning quickly!
12/07/2018 at 12:13 PM #8650912/11/2018 at 10:31 AM #86774Hello friends. I’m trying to code a simple indi to do this:
- If the day closes up, movement = 1, otherwise movement = -1.
- Sum movement over the last 20 days.
- UDIDSRI is the % rank of today’s sum, compared to the last 50 days of sums.
Not sure how to make the comparison, any help would be appreciated. Thank you.
1234A=close>openB=close<openC=summation[20](A+B)D=summation[50](A+B)12/11/2018 at 10:43 AM #86785Hello friends. I’m trying to code a simple indi to do this
Then please start a new topic for a new question/request.
12/13/2018 at 7:08 PM #8705212/13/2018 at 7:17 PM #87053Didn’t want to clutter
New topics are not clutter but just help to keep every thing relevant and easy to search for by other forum users in the future. Going off topic in a thread means that no one will ever be able to find the useful information that might be in the new discussion.
It is better to have 100 different topics cluttering up the place than one topic with 100 different discussions hidden in it!
-
AuthorPosts
Find exclusive trading pro-tools on