I'm trying to make an indicator which references multiple instruments.
So far, the code is really simple.
protected override void CalcBar(){
// indicator logic
var i1 = BarsOfData(1);
var i2 = BarsOfData(2);
var ins1Val = i1.Close[0];
var ins2Val = i2.Close[0];
}
The line "var i2 = BarsOfData(2)" gives me an "Error in application" exception.
Attached is a screenshot of the instruments I'm using.
What am I doing wrong here?
Error using BarsOfData [SOLVED]
-
- Posts: 5
- Joined: 20 Sep 2013
- Has thanked: 1 time
-
- Posts: 5
- Joined: 20 Sep 2013
- Has thanked: 1 time
Re: Error using BarsOfData [SOLVED]
I found the answer to this here:
viewtopic.php?f=19&p=97924#p97924
viewtopic.php?f=19&p=97924#p97924