RSI and Stochastics Values
Forums › ProRealTime English forum › ProOrder support › RSI and Stochastics Values
- This topic has 7 replies, 5 voices, and was last updated 1 year ago by Lisandro77.
-
-
03/10/2022 at 12:37 PM #189741
In code, when you want to define conditions based on specific numeric values of RSI or stochastics like %K, how do you express these values? I mean, if you want to say 80% do you type 80 or 0.8 in code? I am a newbie and couldn’t find the answer in the manuals…
03/10/2022 at 1:20 PM #189744Hello,
80
Doc from here can be accessed from “help” menu above, it has terms search: https://www.prorealcode.com/prorealtime-documentation/
Example for RSI, says between 0 and 100: https://www.prorealcode.com/documentation/rsi/
1 user thanked author for this post.
03/10/2022 at 3:11 PM #18976406/26/2022 at 7:29 PM #196160Good morning, I’m trying to do the following and I can’t do it, could someone help me? I am trying to obtain a Simple Moving Average, of the closing prices but only when the Stochastic is Oversold, and it does not give me any results.
For example, if the stock go oversold, and stay oversold for 8 bars, calculate the simple average of only those 8 bars. Thank you very much for any help you can give me.
123456789101112131415161718192021TIMEFRAME (1DAY)maximo = highest[14](high)minimo = lowest[14](low)oscilador = (close - minimo) / (maximo - minimo) * 100REM Deducimos el %K y %D del estocásticolineaK = average[6](oscilador)lineaD = average[4](lineaK)lineastochmin = 22lineastochmax = 80if (lineaK < lineastochmin) thencta = 1 + cta[1]elsecta = 0endifmsstochsvta=Average[cta](close)return msstochsvta as "msstoch", close as "close", cta as "cta"06/26/2022 at 9:35 PM #196162Hi @Lisandro77
if (lineaK < lineastochmin) then
cta = cta + 1
else
cta = 1
endif2 users thanked author for this post.
06/26/2022 at 10:02 PM #19616406/26/2022 at 10:07 PM #19616606/29/2022 at 7:14 PM #196399Thank you JS very much! It has been very useful to me..! Regards!
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on