I am struggling with the following problem:
An indicator-method is returning a List of a locally defined structure.
That works well inside the indicator.
When calling the same from a strategy, which has exactly the same locally defined structure, it fails saying it cannot convert from one list to another.
Can you, please, advise what the reason may be for this?
Does the complier not allow this (IEnumeral casting required?)?
How to do this best alternatively, if strategy and indicator shall use the same list & structure definitions?
Hope the description makes sense.
Thank you for your support !
Matthias
Strategy:
public struct CalcResultStruc {
public double lv_myAdditionalTime1_sma;
public int lv_Total_Points; };
private List<CalcResultStruc> mycalcResultList = new List<CalcResultStruc>();
// Calling indicator method
mycalcResultList = my_ACH.Calculate_ACH(mycalcResultList);
Indicator:
public struct CalcResultStruc {
public double lv_myAdditionalTime1_sma;
public int lv_Total_Points; };
// local method
private List<CalcResultStruc> Calculate_ACH(List<CalcResultStruc> calcResultList) {
// do something
return calcResultList;
Comment