MTF MA
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]; } } }
Replies
banbeng
11 Nov 2012, 18:18
RE: 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.
@banbeng
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
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