Skip to content
Algo Trade Analytics Docs

barmerge - Pine Script Constants

Constants under the barmerge namespace.

NameTypeDescription
barmerge.gaps_offconst barmerge_gapsMerge strategy for requested data. Data is merged continuously without gaps, all the gaps are filled with the previous nearest existing value.
barmerge.gaps_onconst barmerge_gapsMerge strategy for requested data. Data is merged with possible gaps (na values).
barmerge.lookahead_offconst barmerge_lookaheadMerge strategy for the requested data position. Requested barset is merged with current barset in the order of sorting bars by their close time. This merge strategy disables effect of getting data from “future” on calculation on history.
barmerge.lookahead_onconst barmerge_lookaheadMerge strategy for the requested data position. Requested barset is merged with current barset in the order of sorting bars by their opening time. This merge strategy can lead to undesirable effect of getting data from “future” on calculation on history. This is unacceptable in backtesting strategies, but can be useful in indicators.