However, according to the wiki page and the help in the PowerLanguage editor: a) Category values range from 0 to 14, and b) Futures should return a zero. In backtesting and the data on which the functions where developed, the Category reserved word returned indeed a zero.
For example
Code: Select all
if (LastBarOnChart_s = True) then begin
if (BarStatus(1) = 2) then
Print(TimeNow, " Category: ", category,
" SymbolName: ", getsymbolname, " Exchange: ", ExchListed);
end;
Code: Select all
11-04_14:20:03 Category: 18.00 SymbolName: FESX Exchange: EUREX
-----
Edit:
It seems that the Category reserved word returns 18 when the instrument is a custom future, and the correct zero value when the instrument is a single futures contract:
Code: Select all
11-04_14:41:43 Category: 18.00 SymbolName: FGBL Exchange: EUREX
11-04_14:42:53 Category: 0.00 SymbolName: M6AM2 Exchange: CME
11-04_14:43:50 Category: 18.00 SymbolName: FESX Exchange: EUREX
11-04_14:44:19 Category: 18.00 SymbolName: FGBL Exchange: EUREX
11-04_14:45:02 Category: 18.00 SymbolName: ES Exchange: CME