EMA HasCrossedAbove
Created at 16 Aug 2018, 10:38
US
EMA HasCrossedAbove
16 Aug 2018, 10:38
Hi
I want to use HasCrossedAbove methord for last index. Please can you help me to do that.
Please see the below for my coding. please correct me
MovingAverage _ema5 = Indicators.MovingAverage(Price, 5, MovingAverageType.Exponential);
WeightedMovingAverage _Wma = Indicators.WeightedMovingAverage(Price, 14);
if( _ema5.Result.HasCrossedAbove(_Wma.Result, 0))
{
}
thanks
PanagiotisCharalampous
16 Aug 2018, 12:01
Hi usdissanayake@gmail.com,
Thanks for posting in our forum. You can change your if statement to the following
This will check if EMA has crossed WMA during the previous bar.
Best Regards,
Panagiotis
@PanagiotisCharalampous