public OrderTrigger(OrderTriggerType triggerType, bool repeating, List <string> watchedUnitIds = null, List <UnitOrder> awaitedStandingOrders = null, float belowStrengthPercent = 9999, FactionName triggerFaction = FactionName.NEUTRAL, int activateOnTurn = -1) { this.TriggerType = triggerType; this.Repeating = repeating; this.WatchedUnitIds = watchedUnitIds; this.AwaitedStandingOrders = awaitedStandingOrders; this.BelowStrengthPercent = belowStrengthPercent; this.TriggerFaction = triggerFaction; this.ActivateOnTurn = activateOnTurn; }
public static string ToDeribitString(this OrderTriggerType triggertype) { switch (triggertype) { case OrderTriggerType.none: return(null); case OrderTriggerType.index_price: return("index_price"); case OrderTriggerType.mark_price: return("mark_price"); case OrderTriggerType.last_price: return("last_price"); default: throw new Exception(); } }