I am trying to port my EL codes to MC.NET but I got some problems.
1. How to get the BarInterval in MC.NET?
2. How to access data of the second instrument? In EL we can use the keyword data2 e.g. value1 = Average(Highest(high,20),15) of data2
BarInterval and data2 [SOLVED]
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: BarInterval and data2
With1. How to get the BarInterval in MC.NET?
Code: Select all
Bars.Info.Resolution.Size
Code: Select all
Output.WriteLine(string.Format("Close data1: {0}, close data2: {1}",
Bars.Close.Value,
BarsOfData(2).Close.Value));
Code: Select all
Close data1: 1,23794, close data2: 0,79157
Close data1: 1,23798, close data2: 0,79166
Close data1: 1,23784, close data2: 0,79154
Close data1: 1,23823, close data2: 0,79187
Close data1: 1,2386, close data2: 0,79195
Close data1: 1,23869, close data2: 0,79194
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: BarInterval and data2 [SOLVED]
Hello BS135,I am trying to port my EL codes to MC.NET but I got some problems.
1. How to get the BarInterval in MC.NET?
2. How to access data of the second instrument? In EL we can use the keyword data2 e.g. value1 = Average(Highest(high,20),15) of data2
An equivalent to EL keyword "data2" in .Net is "(this, 2)".
Code: Select all
Average mAvg = new Average( this, 2 );