RealTest User Guide
RealTest User Guide

 

 

 

 

 

Category

Cross-Sectional Functions

Description

#Fill is a special Data Section tag that looks like a cross-sectional function name but is not one.

This tag specifies that a Data item should replace NaN values in the calculated data array for this item by carrying the last non-NaN value forward. It works on any Data item, whether an ordinary calculated formula or a #DataValueFile item (for which it carries the last value found in the CSV file forward across bar dates that had no value).

#DVFFill is a backward-compatible synonym for #Fill. These tags were originally supported only for DataValueFile items (as #DVFFill and #DVFPad); since version 2.0.31.6 they work for any Data item, and either spelling may be used with either item type.

Example

IndexTrend: #Fill Extern($$SPX, C > MA(C, 200))

If the formula cannot be calculated, e.g. for US holiday bars when calculating it for a non-US symbol, the prior value is carried forward. 

Notes

If #Fill were not specified, IndexTrend would be NaN on US holiday bars when referencing it from a non-US symbol.

See #Pad for an alternative way to replace NaN values.

See DataValueFile Items for more about using this tag with a DataValueFile item.

 

 

 

 

Copyright © 2020-2026 Systematic Solutions, LLC