Hello everybody,
I would like to know if it is possible to make statistical analysis with Pro Real Time.
As an example: I would like to analyse a sample of 3000 candle, calculating the probability of having a bullish candle after a sequence of 4 bearish candle has occurred.
Is that possibile?
Thanks in advanced for any kind of support
Yes of course, it is only an incremental count of this occurrence.
For this specific purpose, the code would be as follow:
c = summation[4](close<open)=4
if c[1]=1 and close>open then
count=count+1
endif
return count
Didn’t test it, let us know if it works correctly.
Hello Nicolas,
thanks for answer.
I am quite new with the syntax of Pro Real Time, so I don’t understand what’s going on.
I checked the Summation function in the Documentation and it looks like to return a value (“Sums the selected price over the last N periods.”). But in your script c is an array…
Also – let see if I understand – this script starts the computation at the first candle available on the cart arriving to the last one. Is that right?
And instead returning a kind of panel / window, with the stats inside, it shows the result of every single candle analyzed using the indicator line.
Thanks again, I really appreciate it.