A good portion of my readers use MultiCharts and the similarities between their PowerLanguage and EasyLanguage is almost indistinguishable. However, I came across a situation where one my clients was getting different values between an indicator function call and the actual plotted indicator when using Multi-Data.
Here is the code that didn’t seem to work, even though it was programmed correctly in TradeStation.
Pretty simple – so what is the problem. Data aliasing was utilized in the Vars: section – this keeps the indicator from being calculated on the time frame of data1. Its only calculated on the data2 time frame – think of data1 being a 5 min. chart and data2 a 30 min. chart. I discovered that you have to also add data aliasing to not just the variables used in the indicator function but also to the function call itself. This line of code fixed the problem:
See that! Just add Data2 to the end of the function call. This verifies in TradeStation and compiles in MC with no problems.