Your interactive trading laboratory!
 • 
4 users online

Bug report: ATR block model not using external symbol qualifier

Hey, could use confirmation on this bug report. I build a simple block model with an Indicator compare to Indicator using ATR(50) looking one day back, and add the qualifier block for Indicator Symbol set to SPY (or anything). When I run this model, no matter what I change the external symbol (SPY) to, it never changes the backtest results. When I Open as C# Code Model, the C# model behaves the same way it gives me this code:

externalSymbol = GetHistory(bars, "SPY");
indicator = new ATR(bars, 50);
Plot(indicator);
indicator1 = new ATR(bars, 50); 

But of course that should be

externalSymbol = GetHistory(bars, "SPY");
indicator = new ATR(externalSymbol, 50);
Plot(indicator);
indicator1 = new ATR(externalSymbol, 50); 

Other indicators that I've tried seem to be working, so this seems an isolated to ATR code problem.

Attachment

Cancel

Responses

Good morning bitfool, indeed, you're 100% correct. The issue has already been resolved and I'll work on getting the next build out this weekend. Thanks for the catch!

Good morning bitfool, indeed, you're 100% correct. The issue has already been resolved and I'll work on getting the next build out this weekend. Thanks for the catch!

By the way, I really love the block building models and Open as C# because it fills in the gaps in examples in the inline help. I just create a simple block model, convert, and see what the code says. This is how, for example, I found that ROC uses percentages instead of decimals (ie, 1.0 instead of 0.01) which is what seems common in other software packages.

By the way, I really love the block building models and Open as C# because it fills in the gaps in examples in the inline help. I just create a simple block model, convert, and see what the code says. This is how, for example, I found that ROC uses percentages instead of decimals (ie, 1.0 instead of 0.01) which is what seems common in other software packages.
Forum Tips

Please sign in if you want to participate in our forum.

Our forum uses Markdown syntax to format posts.

To embed code snippets, enclose them in [CODE][/CODE] tags.