GP, For me buy means ema10 goes above ema200 and vice versa.
eventB=Hold(Cross(EMA(C,10),EMA(C,200)),13); eventS=Hold(Cross(EMA(C,200),EMA(C,10)),13); Since, I may miss the exact bar when cross happens, I wanted to check for the last 13 bars. I would like to know when this cross has happend, is it in the current bar or in 13 bars ago. BarBB=BarsSince(eventB); BarSS=BarsSince(eventS); Ema10 is either above or below Ema200. Assume, there is a buy cross in the current bar, Ema10 went above Ema200. Just one bar before the buy cross naturally, Ema 10 is below Ema200. How long Ema10 was below Ema200 before giving the buy cross BarsBeforeBuyCross = BarsBeforeSellCross = Hope, I have expressed clearly. Warm Regards. --- In [email protected], "gp_sydney" <[EMAIL PROTECTED]> wrote: > > What is "sell mode"? > > And by "buy cross", do you mean the actual cross bar or any of the 13 > held bars? > > GP > > > --- In [email protected], "K. Karunakaran" <osp2osp@> wrote: > > > > Number of bars it was in sell mode just before the buy cross and vice > > versa. > > > > --- In [email protected], "gp_sydney" <gp.investment@> > > wrote: > > > > > > > number Of bars it was down, just before the buy cross > > > > > > What does this mean? What's "it", and what do you mean by "down"? > > > > > > Regards, > > > GP > > > > > > > > > --- In [email protected], "K. Karunakaran" <osp2osp@> wrote: > > > > > > > > Hi, > > > > > > > > eventB=Hold(Cross(EMA(C,10),EMA(C,200)),13); > > > > eventS=Hold(Cross(EMA(C,200),EMA(C,10)),13); > > > > > > > > BarBB=BarsSince(eventB); - to know how many bars since the recent > > > > cross > > > > BarSS=BarsSince(eventS); - to know how many bars since the recent > > > > cross > > > > > > > > BeforeBuyCross= number Of bars it was down, just before the buy > > cross > > > > BeforeSellCross= number Of bars it was up, just before the sell > > cross > > > > > > > > > > > > Filter=eventB OR eventS; > > > > > > > > AddColumn( DateTime(), "Date", formatDateTime ); = the Date AND > > time > > > > when the Cross Happend > > > > > > > > ----------------------------- > > > > > > > > Except the first two lines everything seems to be wrong, please > > help > > > > me. > > > > > > > > Warm Regards. > > > > > > > > K Karunakaran > > > > > > > > > >
