myVariable2 = SomeOtherIndicator(Param1, Param2).InfoNeeded2[0];
myVariable3 = SomeOtherIndicator(Param1, Param2).InfoNeeded3[0];
If the following were added to access a prior bar's data...
From what I understand of C#, I believe I should instead...
1. Create an instance of the SomeOtherIndicator
2. Initialize the new instance
3. Access its public variables as necessary... as in this format...
public class MyStrategy: Strategy
{
private int myVariable2 = 0;
private int myVariable3 = 0;
SomeOtherIndicator MyInstanceOfSomeOtherIndicator;
{
protected override void OnBarUpdate()
{
myVariable2 = MyInstanceOfSomeOtherIndicator.InfoNeeded2;
myVariable3 = MyInstanceOfSomeOtherIndicator.InfoNeeded3;
The above assumes that SomeOtherIndicator has a Constructor which will allow the initial parameters to be initialized.
Do I have it right? Thanks in advance.
Comment