Hi,
i have a own indicator. Its based on the Donchian Channel.
In programming a own indicator i cant choose the Donchian Channel indicator. Therefore i create my own DC indicator:
PointHigh = HIGHEST[n] (HIGH)
PointLow = LOWEST[n](LOW)
Return PointHigh AS "HIGH", PointLow AS "LOW"
Here is my own indicator, but the calculating time is very bad…i wrote a java program to calculate my indicator its much more faster. Therefore i think i make a mistake in prorealtime?
myHIGH, myLOW = CALL "DC Own"[perioden]
result = 0
resultIndikator = 0
FOR i = 0 TO perioden DO
IF myHigh[i] > myHigh[i+1] THEN
result = result + 1
ENDIF
IF myLow[i] < myLow[i+1] THEN
result = result + 1
ENDIF
NEXT
IF result > mindestWert THEN
resultIndikator = 1
ELSE
resultIndikator = -1
ENDIF
return resultIndikator
Has anyone a idea to improve the calculating time?
Thanks!
Hi,
We are all expecting fairly soon a new engine allowing “call” to be much faster than its current snail pace. In the meantime whenever possible avoiding “call”, by copying and pasting the called code in the calling code, will go a long way to improve speed (worth having a look at pages 23-24-25, especially p25, of following manual with some examples) https://www.prorealtime.com/en/pdf/probacktest_c1491462069c.pdf
You can also increase speed of your program replacing this kind of FOR/NEXT loop by using SUMMATION of boolean variables results.