Floor trader indicator

MQL4 Indicators Converting

Job finished

Execution time 4 days

Specification

I need a simple indicator. Inputs are 2 EMA. The indicator runs on open candle. Checks back the last N candle(N max 10).
Gives 3 values for BUY(0/1/2) and 3 values for SELL(0/1/2 ) in histogram.
Buy 1:
(From candle0 to t candle N any candle Open is >= EMA2)   AND
(From candle0 to t candle N any candle Low <= EMA2)         AND 
(From candle0 to t candle N any candle Close is >= EMA2)  
Buy 2:
(From candle0 to t candle N any candle Open is >= EMA1)   AND
(From candle0 to t candle N any candle Low <= EMA1)         AND 
(From candle0 to t candle N any candle Close is >= EMA1)  
Sell  1:
(From candle0 to t candle N any candle Open is <= EMA2)   AND
(From candle0 to t candle N any candle High is  >= EMA2)    AND 
(From candle0 to t candle N any candle Close is <= EMA2)  
  Sell  2:
(From candle0 to t candle N any candle Open is <= EMA1)   AND
(From candle0 to t candle N any candle High is  >= EMA1)    AND 
(From candle0 to t candle N any candle Close is <= EMA1)  
There are 2 filters for signals:
Filter 1:
In Buy direction ( EMA1(0) >= EMA1(1))  AND  ( EMA2(0) >= EMA2(1))  
Insell direction   EMA1(0) <= EMA1(1)  AND  EMA2(0) <= EMA2(1) 
Filter 2:
In Buy direction EMA1 >= EMA2
Insell direction   EMA1<= EMA2 
Calculation decimals are rounded to 4 decimals. So for example 1.45634 = 1.45633 in calculations. 

Responded

1
Developer 1
Rating
(130)
Projects
210
40%
Arbitration
90
20% / 43%
Overdue
85
40%
Free
2
Developer 2
Rating
(319)
Projects
571
35%
Arbitration
83
31% / 45%
Overdue
206
36%
Free
3
Developer 3
Rating
(208)
Projects
297
54%
Arbitration
0
Overdue
1
0%
Free
Published: 6 codes

Project information

Budget
30+ USD
Deadline
to 10 day(s)