Hi,
I am working on an Exploration using Wavetrend Indicator and I need some guidance on a step. Now I have set a Filter to capture the crossovers of the Wavetrend 1 & 2 to provide the results.
Issue: I need another Filter to capture signals only when the crossover happens between -50 & -60 for BUY and SELL when crossover is between 50 and 60. Since I am very new to Amibroker, I am not able to figure out how to capture the crossover value since the output is only in 1 and 0.
N1=ChannelPeriod;
N2=AvgPeriod;
AvgPrice=Avg; // Typical Price = (H + L + C)/3
ESA = Wilders(AvgPrice,N1);
D = Wilders(abs(AvgPrice-ESA),N1);
CI = (AvgPrice-ESA)/(0.015*D);
WT1 = EMA(CI,N2);
WT2 = MA(WT1,4);
Buy= Cross(WT1,WT2);
Sell= Cross(WT2,WT1);
Filter = Buy OR Sell;
AddColumn(O,"Open",1.2,fgcolor=IIf(Buy,colorWhite,colorWhite),bkcolor=IIf(Buy,colorGreen,colorRed));
AddColumn(C,"Close",1.2,fgcolor=IIf(Buy,colorWhite,colorWhite),bkcolor=IIf(Buy,colorGreen,colorRed));
AddColumn(V,"Volume",1,fgcolor=IIf(Buy,colorWhite,colorWhite),bkcolor=IIf(Buy,colorGreen,colorRed));
//AddColumn(WT1,"WaveTrend 1",1);
//AddColumn(WT2,"WaveTrend 2",1);
AddColumn(IIf(Buy,'B','S'),"Signal",formatChar,fgcolor=IIf(Buy,colorWhite,colorWhite),bkcolor=IIf(Buy,colorGreen,colorRed));
AlertIf(Buy,"SOUND c:\\Windows\\Media\\tada.wav","Audio Alert",1);
AlertIf(Sell,"SOUND c:\\Windows\\Media\\tada.wav","Audio Alert",2);
I would really appreciate any help on this. Thanks.