I am trying to create an indicator which will be used in Market Analyzer to trigger an alert when conditions specified are present: previous bar crossing three EMA's. Calculated on bar close. Relationship between EMA's, their shape or slope irrelevant. Following the teachings in the help manual I wrote the script:
// plot below by replacing 'Close[0]' with your own formula.
Plot0.Set((Close[1] > Open[1]
&& Open[1] < EMA(4)[1]
&& Close[1] > EMA(4)[1]
&& Open[1] < EMA(8)[1]
&& Close[1] > EMA(8)[1]
&& Open[1] < EMA(21)[1]
&& Close[1] > EMA(21)[1]) ? 1 : 0);
It went smoothly thru compile process and indicator shows in indicator list, however it will not plot on chart nor trigger alert in Market Analyzer. In MA it just prints current price instead 1's for true, 0's for false. I've attached two screen images to illustrate.Kindly please advise...
Comment