public override MarketEnteringComponentResult CanEnter(ITradingObject tradingObject)
        {
            var result = new MarketEnteringComponentResult();

            var metric = (RebreakoutRuntimeMetric)_metricProxy.GetMetric(tradingObject);

            if (metric.Rebreakout)
            {
                result.Comments = string.Format("Rebreakout: {0:0.0000}, Interval: {1}", metric.CurrentHighest, metric.IntervalSinceLastBreakout);
            }

            result.CanEnter = metric.Rebreakout;
            return(result);
        }
        public override MarketEnteringComponentResult CanEnter(ITradingObject tradingObject)
        {
            var result = new MarketEnteringComponentResult();

            var metric = (BreakoutAndReturnRuntimeMetric)_metricProxy.GetMetric(tradingObject);

            if (metric.Triggered)
            {
                result.Comments = string.Format(
                    "Breakout: {0:0.0000}, LowestPrice: {1:0.0000}",
                    metric.LatestBreakoutPrice,
                    metric.LowestPriceAfterBreakout);

                result.CanEnter = true;
            }

            return(result);
        }
        public override MarketEnteringComponentResult CanEnter(ITradingObject tradingObject)
        {
            var result = new MarketEnteringComponentResult();

            var metric = (BounceRuntimeMetric)_bounceMetricProxy.GetMetric(tradingObject);

            if (metric.Values[0] > 0.0)
            {
                result.Comments = string.Format(
                    "Lowest:{0:0.000}; Current:{1:0.000}; BouncePercentage:{2:0.000}%",
                    metric.LowestPrice,
                    metric.BouncePrice,
                    metric.BouncePercentage);

                result.CanEnter = true;
            }

            return(result);
        }