Topics
29 Aug 2014, 22:57
 3
 4102
 6
17 Aug 2014, 20:49
 0
 2769
 2
Replies

gregschr
05 May 2015, 22:44

I'd like to see price alerts lines that can be changed simply by dragging them on the chart.


@gregschr

gregschr
04 Feb 2015, 04:45

I think I figured this out. By introducing a seam between my indicator and the Indicator class I can now override the MarketSeries getter and setter (and any other properties or methods) in my unit tests.  When the indicator is running normally in cAlgo, the MarketSeries data from the Indicator class is returned as usual.

    public class IndicatorSeam : Indicator
    {
		private MarketSeries _marketSeries;
		public virtual new MarketSeries MarketSeries
		{
			get
			{
				if ( _marketSeries == null ) return base.MarketSeries;
				else return _marketSeries;
			}
			set { _marketSeries = value; }
		}
		public override void Calculate(int index)
		{
			// Do nothing here
		}
    }

    [Indicator("Swing Strength", IsOverlay = true, TimeZone = TimeZones.CentralStandardTime, AccessRights = AccessRights.FileSystem)]
    public class _SwingStrength : IndicatorSeam
    {
          ...
    }

 


@gregschr

gregschr
20 Sep 2014, 13:58

I agree. It could also be used for other Parameters like line and text colors or a moving average type. For example"

public enum MovingAverageType
{
EMA,
HMA,
SMA,
WMA,
}
[Parameter("MAType", DefaultValue = EMA)]
public MovingAverageType MAType{ get; set; }


@gregschr

gregschr
19 Sep 2014, 09:06

MB Trading Desktop Pro has this capability.


@gregschr