MQL Program for custom indicator
The intent is to have three 5mm diameter circles or other shapes appear on a MT4 currency chart (preferably in the upper left corner) indicating alignment of a trading situation between the H1, H4 and D1 charts.
(Could be large arrows (green up arrow, red down arrow, blue sideways arrow) but need to be easily identifiable and unique)
Each circle indicating a trading condition for that currency pair based on the close from three different timeframes. ie.e the last close of the H1, H4 and D1 charts.
Each circle to indicate the following timeframes -
Left Circle (1 Hour)
Middle Circle (4 Hour)
Right Circle (1 Day)
Each circle to indicate a trading condition by changing colour -
Green (Buy)
Red (Sell)
Blue (Flat).
Five selectable Moving Averages based on closing price of H1, H4, D1 charts are tested along with a CCI for a CCI_Period.
The trading condition rules are based on last bar close for that circles timeframe (i.e. H1, H4, D1) with price compared to moving averages supported by a price (trend) oscillator.
Logic is
For each Time_frame circle (ie. H1, H4, D1)
Draw a circle
Rising on chart - Buy (Green colour Circle)
if (Close > (Moving Average 1) and
Close > (Moving Average 2) and
Close > (Moving Average 3) and
Close > (Moving Average 4) and
Close > (Moving Average 5) and
(Moving Average 1) > (Moving Average 2) and
(Moving Average 2) > (Moving Average 3) and
(Moving Average 3) > (Moving Average 4) and
(Moving Average 4) > (Moving Average 5) and
CCI(CCI_Period) > 0)
Falling on Chart - Sell (Red colour Circle)
if (Close < (Moving Average 1) and
Close < (Moving Average 2) and
Close < (Moving Average 3) and
Close < (Moving Average 4) and
Close < (Moving Average 5) and
(Moving Average 1) < (Moving Average 2) and
(Moving Average 2) < (Moving Average 3) and
(Moving Average 3) < (Moving Average 4) and
(Moving Average 4) < (Moving Average 5) and
CCI(CCI_Period) > 0)
else Flat (Blue colour Circle)
*/
//--------------------------------------------------------------------------------------------------------------------
This is a simple indicator, i can make it in only one day, the important thing about working with me is that you get my contact information and we can work together in other indicators and EAs.
Thanks a lot, i wait your answer.