BelParticipant
New
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.
You 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:
test = rsi[14]
result = average[7](test)
return result
BelParticipant
New
Ok 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!
BelParticipant
New
Looks like i got it! Thanks once again Nicolas 🙂
BelParticipant
New
Hello 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.
A=close>open
B=close<open
C=summation[20](A+B)
D=summation[50](A+B)
Hello friends. I’m trying to code a simple indi to do this
Then please start a new topic for a new question/request.
BelParticipant
New
Didn’t want to clutter but will do next time. Cheers.
Didn’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!