lets make an easy example:
If EMA100 > SMA200 = uptrend
else downtrend.
so basicly:
if (emaSeries[0]>smaSeries[0])
currentTrend=(int)TREND.LONG;
else if (emaSeries[0]<smaSeries[0])
currentTrend=(int)TREND.SHORT;
if(swingBefore!=-1 && (swingBefore!=currentSwing))
{
//Trendchange
}
so:
{
Do something???
}
if(swingBefore!=-1 && (swingBefore!=currentSwing))
{
Reset???
}
how to tackle this?
Comment