Arrays related bugs
Forums › ProRealTime English forum › ProBuilder support › Arrays related bugs
- This topic has 17 replies, 3 voices, and was last updated 4 days ago by LucasBest.
-
-
12/30/2024 at 12:47 PM #241950
Look, even if i add an other condition to check if the first array have been updated, it leads to the same error even if i check if the index of the first array is filled with “isset” instruction… That means that the array is temporarly updated then deleted to come back to previous situation according to the real close at the end of the bar!
=> Thus the only way to prevent this bug if to send the variable index into an other variable (temp) which then will occurs only at the end of the bar, preventing the code to reach an index of the first array that have not been permanently filled yet.Array's BUG123456789101112131415161718192021Once RSILen = 14Once prd = 1Once pBcTi = -1Once pBmTi = -1src = RSI[RSILen](close)If src[prd] = lowest[2*prd+1](src) thenpBcTi=pBcTi+1$pBcT[pBcTi]= Barindex-1if pBcTi > 2 and isset($pBcT[pBcTi]) thenif src[barindex-$pBcT[pBcTi-1]] <= src[barindex-$pBcT[pBcTi-2]] and src[barindex-$pBcT[pBcTi-1]] <= src[barindex-$pBcT[pBcTi]] thenpBmTi=pBmTi+1$pBmT[pBmTi]= $pBcT[pBcTi-1]drawpoint($pBcT[pBcTi-1],src[barindex-$pBcT[pBcTi-1]],3) coloured("red",100)endifendifendifReturn src12/30/2024 at 12:51 PM #241951I tried also using Lastset instruction… It does not solve the problem either!
Array's BUG123456789101112131415161718192021Once RSILen = 14Once prd = 1Once pBcTi = -1Once pBmTi = -1src = RSI[RSILen](close)If src[prd] = lowest[2*prd+1](src) thenpBcTi=pBcTi+1$pBcT[pBcTi]= Barindex-1if lastset($pBcT) > 2 thenif src[barindex-$pBcT[pBcTi-1]] <= src[barindex-$pBcT[pBcTi-2]] and src[barindex-$pBcT[pBcTi-1]] <= src[barindex-$pBcT[pBcTi]] thenpBmTi=pBmTi+1$pBmT[pBmTi]= $pBcT[pBcTi-1]drawpoint($pBcT[pBcTi-1],src[barindex-$pBcT[pBcTi-1]],3) coloured("red",100)endifendifendifReturn src12/30/2024 at 1:05 PM #241952But things get even stranger here below…
Sticky Array's BUG.123456789101112131415161718192021Once RSILen = 14Once prd = 1Once pBcTi = -1Once pBmTi = -1src = RSI[RSILen](close)If src[prd] = lowest[2*prd+1](src) thenpBcTi=pBcTi+1$pBcT[pBcTi]= Barindex-1temp = pBcTiif temp > 2 thenif src[barindex-$pBcT[pBcTi-1]] <= src[barindex-$pBcT[pBcTi-2]] and src[barindex-$pBcT[pBcTi-1]] <= src[barindex-$pBcT[pBcTi]] thenpBmTi=pBmTi+1$pBmT[pBmTi]= $pBcT[pBcTi-1]drawpoint($pBcT[pBcTi-1],src[barindex-$pBcT[pBcTi-1]],3) coloured("red",100)endifendifendifReturn srcCan you explain that ? 🙂
-
AuthorPosts