MTF MA

Created at 05 Sep 2012, 17:53
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!
MI

misado

Joined 31.08.2012

MTF MA
05 Sep 2012, 17:53


Please could you say me what is necessary to get the EMA below as a MTF-EMA.


Thanks in advance

Mike

using System;
using cAlgo.API;
using cAlgo.API.Indicators;

namespace cAlgo.Indicators
{
    [Indicator(IsOverlay = true)]
    public class DoubleEMA : Indicator
    {
        [Output("EMA1", Color=Colors.Yellow)]
        public IndicatorDataSeries EMA1 { get; set; }
        [Output("EMA2", Color=Colors.Red)]
        public IndicatorDataSeries EMA2 { get; set; }
                
        [Parameter(DefaultValue = 3)]
        public int Period1 { get; set; }
        [Parameter(DefaultValue = 15)]
        public int Period2 { get; set; }
        
        
		private ExponentialMovingAverage ema1;
		private ExponentialMovingAverage ema2;
		
		protected override void Initialize()
        {
            ema1 = Indicators.ExponentialMovingAverage(MarketSeries.Close,Period1);
            ema2 = Indicators.ExponentialMovingAverage(MarketSeries.Close,Period2);
        }
		
        public override void Calculate(int index)
        {
            EMA1[index]=ema1.Result[index];
            EMA2[index]=ema2.Result[index];
        }
    }
}




@misado
Replies

qualitiedx2
06 Sep 2012, 16:41

Actually

You can use multi-timeframe indicator over your original chart by just changing the parameters of the second indicator.

 

For example:

EURUSD 1 HOUR with 40 PERIOD EMA = EURUSD 4 HOUR with 10 PERIOD EMA

or

EURUSD 1 MINUTE with 20 PERIOD EMA = EURUSD 5 MINUTES 4 PERIOD EMA

 

hope that helped.that's the best solution for me, for now


@qualitiedx2

admin
06 Sep 2012, 16:44

Hi,

If by MTF you mean multi time-frame EMA then i can tell you that this is something that we are currently working on.

Therefore, ability to write a multi-timeframe indicator will soon be possible.

 


@admin

banbeng
11 Nov 2012, 18:18

RE: Hi,
admin said:

If by MTF you mean multi time-frame EMA then i can tell you that this is something that we are currently working on.

Therefore, ability to write a multi-timeframe indicator will soon be possible.

 

if I want to create a program that works with timeframe 5 minutes and uses indicators such as moving average 1 day (pivot ect) ON THE SAME SYMBOL
can I do it?

@banbeng

admin
12 Nov 2012, 10:20

Hello,

 

At the time being no you cannot. You will be able to use a method to calculate a different timeframe indicator in the future. 

 

 


@admin

cAlgo_Fanatic
17 Sep 2013, 11:58 ( Updated at: 23 Jan 2024, 13:16 )

Please see: [Multi-symbol robots and indicators] & Multi-timeframe robots/indicators 


@cAlgo_Fanatic