I am trying to incorporate a higher time frame, 360 min ADX indicator into a startegy. I have read through the threads and tried a few different things but keep getting errors when compiling. I am not sure what I am missing. I have probably confused the issue, I believe it should be Add(ADX,PeriodType.Minute, 360); but that didn't work either.
any help appreciated.
thanks raef
protectedoverridevoid Initialize()
{
Add(Instrument, PeriodType.Minute, 360);
Add(ADX(Adx));
SetProfitTarget("", CalculationMode.Ticks, Target);
SetStopLoss("", CalculationMode.Ticks, Stop, false);
CalculateOnBarClose = true;
}
///<summary>
/// Called on each bar update event (incoming tick)
///</summary>
protectedoverridevoid OnBarUpdate()
{
// Condition set 1
if (ADX(BarsArray[1], 360)(Adx)[1] > 30
&& CrossBelow(EMA(Emafast), EMA(Emaslow), 2))
Comment