manually change the time for each order (left on the control panel)

Created at 27 Sep 2016, 16:41
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
TR

tradermatrix

Joined 24.07.2012

manually change the time for each order (left on the control panel)
27 Sep 2016, 16:41


   [Parameter("Moving Average Type1", DefaultValue = MovingAverageType.TimeSeries)]
        public MovingAverageType MovingAverageType1 { get; set; }

        [Parameter("Period1", DefaultValue = 8)]
        public int Period1 { get; set; }

        /////////////////////////////////////////////////////////////////////////////////

        [Parameter("Moving Average Type2", DefaultValue = MovingAverageType.Simple)]
        public MovingAverageType MovingAverageType2 { get; set; }

        [Parameter("Period2", DefaultValue = 10)]
        public int Period2 { get; set; }

        //////////////////////////////////////////////////////////////////////////////////        

        [Parameter("Moving Average Type3", DefaultValue = MovingAverageType.Exponential)]
        public MovingAverageType MovingAverageType3 { get; set; }

        [Parameter("Period3", DefaultValue = 14)]
        public int Period3 { get; set; }

        //////////////////////////////////////////////////////////////////////////////////////        

        [Parameter("Moving Average Type4", DefaultValue = MovingAverageType.Triangular)]
        public MovingAverageType MovingAverageType4 { get; set; }

        [Parameter("Period4", DefaultValue = 21)]
        public int Period4 { get; set; }

        //////////////////////////////////////////////////////////////////////////////////////////        

        [Parameter("Moving Average Type5", DefaultValue = MovingAverageType.VIDYA)]
        public MovingAverageType MovingAverageType5 { get; set; }

        [Parameter("Period5", DefaultValue = 54)]
        public int Period5 { get; set; }

        /////////////////////////////////////////////////////////////////////////////////////////////  

  private MovingAverage _movingAverage1;
        private MovingAverage _movingAverage2;
        private MovingAverage _movingAverage3;
        private MovingAverage _movingAverage4;
        private MovingAverage _movingAverage5;

    protected override void OnStart()
        {
           
            _movingAverage1 = Indicators.MovingAverage(MarketSeries.Close, Period1, MovingAverageType1);
            _movingAverage2 = Indicators.MovingAverage(MarketSeries.Close, Period2, MovingAverageType2);
            _movingAverage3 = Indicators.MovingAverage(MarketSeries.Close, Period3, MovingAverageType3);
            _movingAverage4 = Indicators.MovingAverage(MarketSeries.Close, Period4, MovingAverageType4);
            _movingAverage5 = Indicators.MovingAverage(MarketSeries.Close, Period5, MovingAverageType5);

}

  

  

Hello
with this code that I use for a martingale (step) for each order loser, I can change the settings;
"Periiod and Moving Average Type"
my wishes would be to change the deadlines for each opening a new trade ...
for example;
the first order (Moving Average Type1) opens with a time of 1 minute
if it loses the second order (Moving Average Type2) opens with 1 time 5 min
then 45 min, then for 1 hour, then 4 hours ........

how to write the code? that allows me to change the time (and if possible to be able to manually change the time for each adjustment, left on the control panel)

cordially

  


@tradermatrix