工作已完成
指定
Outline: An alert is triggered where there are ‘X’ number of consecutive increasing macd values. Or there are ‘X’ number of consecutive decreasing macd values. And price has to cross the EMA. Apply this to 4 time frames.
Requirements:
· Price in relation to exponential moving average, is the trigger ( eg 25EMA; value range is 1-99)
· MACD values are Fast EMA eg. 12 (range is 1-999); Slow EMA eg.26 (range is 1-999).
· .
· If macd value has been going down for ‘X’ consecutive bars eg 8 (range is 1-50), then look for price to move across EMA ( allow me to select alert trigger: 1. either intra-bar price is greater or equal to EMA, or 2. Closing price is greater or equal to EMA).
· If macd value has been going up for ‘X’ consecutive bars eg 8 (range is 1-50), then look for price to move across EMA ( allow me to select alert trigger: 1. either intra-bar price is less than or equal to EMA, or 2. Closing price is less than or equal to EMA).
·
· Once there is a trigger, I do not want another trigger for ‘Y’ bars [range is 1-50]
· .
· I want to choose 4 time frames, so they all operate on the chart simultaneously. The values will all be the same. ie. EMA, X, Y, MACD, trigger choice.
· I want the trigger to give choice of sound alert Y/N, and email notification Y/N.
· .
· Trigger gets cancelled once the macd direction changes, and the counting starts again until it reaches the ‘X’ consecutive bars in the new direction. See screenshot attached – the vertical line on left is the beginning of 8 consecutive lower macd values. Line at A is the 8th bar, but there is no Close at or above the ema until B, but there is not a trigger for alert since the macd value has increased the bar before (see macd colour change.) If the intra-day bar choice is selected, the alert may have been triggered on the first or second bars after A.