Forums › ProRealTime English forum › ProRealTime platform support › Centralization of queries and suggestions on ProRealTime › Reply To: Centralization of queries and suggestions on ProRealTime
10/19/2017 at 10:38 AM
#49918
I suggest to add a function BARID[n]() to return the BarIndex where a condition is verified within the last n bars (from the first bar loaded if brackets are missing), examples:
1 2 3 4 5 |
x = BARID[200](close > close[10]) //return the number of the bar where the closing price was greater than that of 10 bars before x = BARID[20](lowest[30](low)) //return the number of the bar where that lowest price is found x = BARID[100](12920) //return the number of the bar where that price (DAX in this case) was most recently touched x = BARID[100](average[5] CROSSES OVER average[10])//return the number of the bar where the last crossing occurred x = BARID(min(10870,close)) //return the number of the bar where the minimum between the two prices is met (could be the current bar, of course) |