The implementation of sym() is EFS2 seems flawed. To demonstrate what I am talking about, you may apply the attached testing script and apply it on 1min chart of "6E H8".
When the secondary symbol is set to "ES H8", the minute info of Bar -1 printed out for both "6E H8" and "ES H8" are the same for all historical bars. Then during the realtime updating period ( getCurrentBarIndex(0 == 0 ), the values of minute(-1) and m may be different. This happens when the new bar of "6E H8" is created eariler than that of "ES H8" ( the first tick of "6E h8" comes earlier than that of "ES h8"), otherwise the printed out values are the same.
However in my opinion, EFS2 engine should be able to allign all old bars of different symbols using sym(). In the about example, no matter whether ES H8 bar 0 exists or not, when minuteArray.getValue(-1) is called, it should always return the correct value. Otherewise sym() only works to align historical bars, and when doing realtime update, it is no different from using getValue("Minute", -1, 0, "ES H8,1").
The reason I am pointing out this is when the trading decision is made at the beginning of each new bar based on the inficators values at the end of previous bar, if the secondary symbol's tick comes later then the primary symbol, then the inficator value of the secondary symbol would actually be one bar older than it is intended, while in backtesting or after fact study, everything is aligned perfectly by sym() and such design flaw can not be noticed.
When the secondary symbol is set to "ES H8", the minute info of Bar -1 printed out for both "6E H8" and "ES H8" are the same for all historical bars. Then during the realtime updating period ( getCurrentBarIndex(0 == 0 ), the values of minute(-1) and m may be different. This happens when the new bar of "6E H8" is created eariler than that of "ES H8" ( the first tick of "6E h8" comes earlier than that of "ES h8"), otherwise the printed out values are the same.
However in my opinion, EFS2 engine should be able to allign all old bars of different symbols using sym(). In the about example, no matter whether ES H8 bar 0 exists or not, when minuteArray.getValue(-1) is called, it should always return the correct value. Otherewise sym() only works to align historical bars, and when doing realtime update, it is no different from using getValue("Minute", -1, 0, "ES H8,1").
The reason I am pointing out this is when the trading decision is made at the beginning of each new bar based on the inficators values at the end of previous bar, if the secondary symbol's tick comes later then the primary symbol, then the inficator value of the secondary symbol would actually be one bar older than it is intended, while in backtesting or after fact study, everything is aligned perfectly by sym() and such design flaw can not be noticed.
Comment