Since the CCI crossed above 200, find the number of situations when the the CCI has been falling continously.
Initialize(){
Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Hash, "LongSmoothPullback"));
}
onBarUpdate(){
if(CrossAbove(CCI(14),200,1)){
tradeDirection =MarketPosition.Long;
Plot0.Set(1);
RecentCCI200CrossAbove=CurrentBar;
}
LongSmoothPullback.Set(MRO(delegate{return ((Rising(CCI(14))) ) ;},0,CurrentBar-RecentCCI200CrossAbove ));
}
i seem to be not getting any values. any ideas where my logic could have gone wrong.
Comment