Posted 6/14/2008 20:41:20
|
|
|
|
| How can I retrieve the date time of the specific bar at LookBack(0) within my indicator? The indicator derives from SeriesCalcSimple and has one series input (another indicator). I'm trying to reset the indicator on new day. thx
DoQ_Indicators "better is the enemy of good enough"
|
|
Posted 6/14/2008 22:10:09
|
|
|
|
I've been able to get access to RE components not normally exposed in the ISeries by setting constructor parameters. Maybe something like this will work for you...
[Indicator ...]
[SeriesInputAttribute("input 1", 1, Value = "...")]
[SeriesInputAttribute("input 2", 1, Value = "...")]
public class SomeIndicator : SeriesCalculatorBaseWithValues
{
private RList<BarData> _bars;
[ConstructorArgument("Bars list", ConstructorArgumentType.UserDefined)]
public SomeIndicator(RList<BarData> bars) : base(2) { _bars=bars; }
...
}
Cheers!
Mark
|
|
Posted 6/14/2008 22:34:16
|
|
|
|
mark0419 (6/14/2008) I've been able to get access to RE components not normally exposed in the ISeries by setting constructor parameters. Maybe something like this will work for you...
[Indicator ...] [SeriesInputAttribute("input 1", 1, Value = "...")] [SeriesInputAttribute("input 2", 1, Value = "...")] public class SomeIndicator : SeriesCalculatorBaseWithValues { private RList<BarData> _bars; [ConstructorArgument("Bars list", ConstructorArgumentType.UserDefined)] public SomeIndicator(RList<BarData> bars) : base(2) { _bars=bars; } ... }
Cheers! Mark
Interesting, thanks Mark.
DoQ_Indicators "better is the enemy of good enough"
|
|
Posted 6/15/2008 23:01:19
|
|
|
|
| That's a good solution Mark. FYI, you don't really need the ConstructorArgument and SeriesInput attributes in this case. They are only used if you are going to drag the indicator onto a chart, or in DnD system building mode. But if you are passing an RList to the constructor, you can't do this anyway. Daniel
|
|
|
|