And someone said it takes just a few minutes
You need to define the 4 MAs for different TFs
As he had posted only the chart and not his code, i just gave the code for scan
Maybe Manoj can post the complete code with MAs and Scan. . .
Happy
TimeFrameSet(in5Minute);
TF5min20EMA=EMA(C,20);
TimeFrameRestore();
TimeFrameExpand(TF5min20EMA, in5Minute, mode=expandFirst);
TimeFrameSet(in15Minute);
TF15min20EMA=EMA(C,20);
TimeFrameRestore();
TimeFrameExpand(TF15min20EMA, in15Minute, mode=expandFirst);
TimeFrameSet(30*in1Minute);
TF30min20EMA=EMA(C,20);
TimeFrameRestore();
TimeFrameExpand(TF30min20EMA, 30*in1Minute, mode=expandFirst);
TimeFrameSet(inHourly);
TF60min20EMA=EMA(C,20);
TimeFrameRestore();
TimeFrameExpand(TF60min20EMA, inHourly, mode=expandFirst);
highestEMA=
IIf((TF5min20EMA>=TF15min20EMA) AND
(TF5min20EMA>=TF30min20EMA) AND
(TF5min20EMA>=TF60min20EMA),
TF5min20EMA,
IIf((TF15min20EMA>=TF30min20EMA) AND
(TF15min20EMA>=TF60min20EMA),
TF15min20EMA,
IIf((TF30min20EMA>=TF60min20EMA),
TF30min20EMA,TF60min20EMA)));
lowestEMA=
IIf((TF5min20EMA<=TF15min20EMA) AND
(TF5min20EMA<=TF30min20EMA) AND
(TF5min20EMA<=TF60min20EMA),
TF5min20EMA,
IIf((TF15min20EMA<=TF30min20EMA) AND
(TF15min20EMA<=TF60min20EMA),
TF15min20EMA,
IIf((TF30min20EMA<=TF60min20EMA),
TF30min20EMA,TF60min20EMA)));
allEMAsNear=((lowestEMA*1.01)>=highestEMA); /* tweak this number
to find what works for the scrip */
Filter=allEMAsNear;
//AddColumn(lowestEMA,"L-ema");
//AddColumn(highestEMA,"H-ema");
AddColumn(TF5min20EMA,"5minTF-20ema");
AddColumn(TF15min20EMA,"15minTF-20ema");
AddColumn(TF30min20EMA,"30minTF-20ema");
Sir, this was the code Raghuveer has written, but It is not giving the desired result.
As mentioned in the code, the multiplication factor needs to be changed for every scrip.
I could not make changes in the code as I did not understand what to do.
I will try to incorporate your code and see if it gives the result what I am trying to achieve .
Thanks for the help sir.