Retrieving ATR of a Foreign Ticker

Hello All,

I am working on a TS where I need to retrieve ATR values of a ticker which is both (A) a foreign ticker and (b) from a higher timeframe in relation to the one traded.

As I understand, allowed DataFields for Foreign/SetForeign are O, H, L, C, V, OI and Aux 1/2.

After running some tests, I am coming to the conclusion that to retrieve ATR values of a Foreign ticker I will need to retrieve O, H, L and C and then run a custom made ATR function over the data (assuming that I will not be able to run the built-in ATR function in this context).

Before pushing this solution, I was wondreing if this is the best way forward.

I would appreciate any input. Many thanks, and regards.

Fava

SetForeign( "ForeignTickereHere" );
foreign_atr = ATR(20);
RestorePriceArrays();
4 Likes

many thanks for input.