Loading

COPYGEO

gts geo

The COPYGEO function forces the location elements of a GTS onto others. COPYGEO expects two parameters on the stack. First input is GTS or a gts list: those series(s) will have their location overwritten by the one of the second GTS parameter. Geo information will be copied only if they are present in the second paramaters on the same tick otherwise it keep the existing location. See COMMONTICKS to keep only commonticks before calling COPYGEO.

COPYGEO is available since version 1.0.0.

See also

Signatures

Examples

NEWGTS 'test' RENAME 100 NaN NaN NaN 10 ADDVALUE 200 NaN NaN NaN 9 ADDVALUE 300 NaN NaN NaN 8 ADDVALUE 400 NaN NaN NaN 7 ADDVALUE 500 NaN NaN NaN 6 ADDVALUE 700 NaN NaN NaN 5 ADDVALUE 800 NaN NaN NaN 4 ADDVALUE 900 NaN NaN NaN 3 ADDVALUE // As this tick doesn't exist in the second series, its location are kept in result 1000 0 0 NaN 2 ADDVALUE 1100 NaN NaN NaN 1 ADDVALUE // Create a GTS with locations NEWGTS 'geo' RENAME 100 0.0 1.0 NaN 0 ADDVALUE 200 1.0 0.0 NaN 0 ADDVALUE 500 2.0 0.0 NaN 0 ADDVALUE // As this tick doesn't exist in the first series, it's not inserted 600 0.0 2.0 NaN 0 ADDVALUE 800 1.0 1.2 NaN 0 ADDVALUE COPYGEO