I know how to get reference of the first three bars in a chart:
firstBar = bar_index == 0 secondBar = bar_index == 1 thirdBar = bar_index == 2