Trabalho concluído
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Termos de Referência
Supply and Demand ZONE Forex Indicator
I want you to design a MT4 forex indicator for supply and demand zone.
HOW TO DETERMINE DEMAND ZONE
1. Count the number of specified candles.
a. For Long Term = Count 1000 candles (This should be a variable value I can change)
b. For Medium Term = Count 250 candles (This should be a variable value I can change)
c. For Short Term = Count 100 candles (This should be a variable value I can change)
2. From the candle counts, determine the candle with the LOWEST LOW, then drawn a green horizontal line from that point to the current candle
a. If the lowest low is a BEAR CANDLE, then draw the second horizontal green line from the OPEN of this candle to the current candle
b. If the lowest low is a BULL CANDLE, then draw the second horizontal green line from the OPEN of bear candle beside the bull candle to the current candle
c. If the lowest low is a BULL CANDLE, and this bull candle is in between 2 bear candles, then draw the second horizontal green line from the OPEN of bear candle with the higher OPEN to the current candle
3. Once the first and second horizontal lines are drawn, then shade the whole region between both lines as the green zone or demand zone.
4. In the demand zone show the time frame
5. In the demand zone, count and show the number of candles that touch and pass through the demand zone
6. This is applicable to the long term, medium term and short term.
HOW TO DETERMINESUPPLY ZONE
1. Count the number of specified candles.
a. For Long Term = Count 1000 candles (This should be a variable value)
b. For Medium Term = Count 250 candles (This should be a variable value)
c. For Short Term = Count 100 candles (This should be a variable value)
2. From the candle counts, determine the candle with the HIGHEST HIGH, then drawn a red horizontal line from that point to the current candle
a. If the highest high is a BULL CANDLE, then draw the second horizontal red line from the OPEN of this candle to the current candle
b. If the highest high is a BEAR CANDLE, then draw the second horizontal red line from the OPEN of bull candle beside the bear candle to the current candle
c. If the highest high is a BEAR CANDLE, and this bear candle is in between 2 bull candles, then draw the second horizontal red line from the OPEN of bull candle with the lower OPEN to the current candle
3. Once the first and second horizontal line are drawn, then shade the whole region as the red zone or supply zone.
4. In the supply zone show the time frame
5. In the supply zone, count and show the number of candles that touch and pass through the supply zone
6. This is applicable to the long term, medium term and short term.
Feature and inputs of these indicators
1. When a new candle enters the demand or supply zone, send a pop-up notification.
2. If the price leaves the demand or supply zone, send a pop-up notification.
3. The indicator should have 2-time frames inputs.
a. Higher Timeframe = (True/False)
b. Lower Timeframe = (True/False)
4. If Higher timeframe and lower time frames are TRUE, then a chart will show supply and demand of higher time frame and lower time frame on the same chart of a currency pair and vice versa.
5. If there are two demand zones or supply zones on the same chart, the shade of one color should the lighter than the other. E.g Demand Zone color od Higher timeframe could be dark green while the color of the lower time frame will be dark green.