However, I have an indicator called Current10MinsOHL() to calculated the same for only 10 minutes. But I now need it to be variable on 20 minutes and 5 minutes as well as 10 minutes.
So rather than hard code the time span, it needs a property, Minutes, to set how many minutes to track the current OHL.
Currently in the initialize method, I call the Add() method like the examples:
Add(Current10MinsOHL());
However, if I make this indicator property driven, can the Add function work this way instead?
CurrentOHL slowOHL = new CurrentOHL();
slowOHL.Minutes = slowMinutes; // from a property
Add( slowOHL );
CurrentOHL medOHL = new CurrentOHL(10);
medOHL.Minutes = medMinutes; // from a property
Add( medOHL );
CurrentOHL fastOHL = new CurrentOHL(10);
fastOHL.Minutes = fastMinutes; // from a property
Add( fastOHL );
Or will it get confused expecting a single instance of CurrentOHL();
Sincerely,
Wayne
Comment