if (BarsInProgress == 0) { // Do something } if (BarsInProgress == 1) { // Do something }
public class WhichIndicatorCalls : Indicator { coolGuestIndicator GUEST1 = null; anotherCoolGuestIndicator GUEST2 = null; protected override void OnStateChange() { if (State == State.SetDefaults) { Description = @"Enter the description for your new custom Indicator here."; Name = "WhichIndicatorCalls"; Calculate = Calculate.OnEachTick; } else if (State == State.DataLoaded) { GUEST1 = coolGuestIndicator("foo"); GUEST2 = anotherCoolGuestIndicator("bar"); } } protected override void OnBarUpdate() { if (CurrentBar < 0)return; //Is there a way to listen for update events from GUEST1 or GUEST2? if(GUEST1){ //do stuff here in the Hosting indicator for GUEST1 } if(GUEST2){ //do stuff here in the Hosting indicator for GUEST2 } } }
Comment