Simple Price action EA

2020.06.26 Indicators Experts

Specification

Indicator to be created :

Price Action candle :

Input : Number of previous candles to compare  to determine price action candle.

Variable name: No_previous_Candle_price_action

Rules :

When a candle is closed above previous < No_previous_Candle_price_action>  days candle high then it is called Buy Price action candle

When a candle is closed below previous < No_previous_Candle_price_action>  days candle Low then it is called Sell Price action candle

*closed , this rule is checked only once at close of candle.

https://charts.mql5.com/25/246/audusd-d1-fxcm-australia-pty-2.png


Right hand side Legend :

Price Action : Buy Price action Candle/Sell Price action candle/No Price action formed.

 

Pin Bar:

  • Length of candle = absolute(high-low)

Body of Candle = absolute (Open-close)

Input: no_of_past_candle_pinbar

Bullish pin bar

Rule 1: Body of candle should be formed above 60% Length of candle.

Rule 2: length of Tail (wick or shadow) should be more than 60% of length of candle.

Rule 3: low of tail should be lower than previous < no_of_past_candle_pinbar > candles.

We are not checking colour (bullish or bearish) nature of candle to determine bullish pin bar.

Bearish pin bar

Rule 1: Body of candle should be formed blow 60% Length of candle.

Rule 2: length of Tail (wick or shadow) should be more than 60% of length of candle.

Rule 3: High of tail should be higher than previous < no_of_past_candle_pinbar >

We are not checking colour (bullish or bearish nature) of candle to determine bullish pin bar.

Mark Pin bar candle with different colour in chart.

https://charts.mql5.com/25/247/audusd-d1-fxcm-australia-pty.png


Legend:

Candle Length: High Price -low price: <Value>

Body of Candle: Close price -open: Absolute value

Length of Candle: length of tail

 

Area to Trade:

Input: Time frame (1w/1d/4hr) Drop down menu

Zig zag parameter is used (default 5,3,2),

Last low of zig zag (V shape is formed by Zig Zag parameter) candle tail area (Low to close area) is considered as Buy Trade zone.

Last high of zig zag (V shape is formed by Zig Zag parameter) candle nose area (High to open are) is considered as Resistance.

 

Resistance price area to be marked with RED colour till current candle.

Support Price area to be marked with Green Colour till current candle.

https://charts.mql5.com/25/246/audusd-d1-fxcm-australia-pty.png



EA Logic:

 

Indicator to use:Zig Zag,ATR, Timeframe to trade (1hr/1 day,1 week etc) - Drop down, Volume to trade .


Trade initiation


Sell Trade :

 

Last Closed candle should be  traded in trade zone and closed below trade zone.

Last closed candle should be bearish pin bar candle or sell price action candle.

Risk (current trade price to Stoploss)< n times of reward (reward = absolute(current price - previous zig zag low))


https://charts.mql5.com/25/247/gbpusd-mn1-fxcm-australia-pty.png

 

Stop loss line:

We draw two stop loss as per below logic:

When a Sell price action candle or bearish pin bar is formed, high of that candle is marked as stoploss. This line needs to be checked at close of each candle and need to redraw till trade is active. This stoploss line is called End of day stoploss.

When a Sell  price action candle or bearish pin bar is formed, Intraday stoploss is calculated as “High of bullish pin bar candle or high of sell price action candle” + n times of ATR value of last closed candle) n here is input

 


Stoploss logic Execution.

When a candle is closed above End of day stoploss or when a price reach is intraday stoploss , whichever happens first is stoploss.

 

 

Trade closure.

 

Risk is calculated when trade is opened , only once for a trade

Risk = Absolute ( trade open price -Stoploss price )

Tarde closure Price =trade price - n times of risk

 




Buy Trade :

 

Last Closed candle be  traded in trade zone and   closed above trade zone.

Last closed candle should be bullish pin bar candle or Buy price action candle.

Risk (current trade price to Stoploss)< n times of reward (reward = current price - previous zig zag high)



current price to buy target price). 

Stop loss line:

We draw two stop loss as per below logic:

When a Buy price action candle or bullish pin bar is formed, Low of that candle is marked as stoploss. This line needs to be checked at close of each candle and need to redraw till trade is active. This stoploss line is called End of day stoploss.

When a Buy price action candle or bullish pin bar is formed, Intraday stoploss is calculated as “Low of bullish pin bar candle or Buy price action candle” - n times of ATR value of last closed candle) n here is input

 

 

Stoploss logic Execution.

When a candle is closed below End of day stoploss or when a price reach is intraday stoploss , whichever happens first is stoploss.

 

 

Trade closure.

 

Risk is calculated when trade is opened , only once for a trade

Risk = Absolute ( trade open price -Stoploss price )

Tarde closure Price =trade price + n times of risk

 


Responded

1
Developer 1
2020.06.26
Rating
5
(17)
Projects
25
8%
Arbitration
4
0% / 50%
Overdue
6
24%
Working
2
Developer 2
2020.06.26
Rating
5
(15)
Projects
15
27%
Arbitration
0
Overdue
4
27%
Working
3
Developer 3
2020.06.26
Rating
4.87
(46)
Projects
56
11%
Arbitration
9
0% / 78%
Overdue
7
13%
Loaded
4
Developer 4
2020.06.26
Rating
5
(26)
Projects
53
28%
Arbitration
3
33% / 0%
Overdue
13
25%
Busy
5
Developer 5
2020.06.26
Rating
5
(8)
Projects
12
8%
Arbitration
8
0% / 63%
Overdue
9
75%
Busy
6
Developer 6
2020.06.26
Rating
5
(2)
Projects
1
100%
Arbitration
2
0% / 0%
Overdue
0
Working
7
Developer 7
2020.06.26
Rating
4.88
(16)
Projects
20
30%
Arbitration
3
33% / 67%
Overdue
6
30%
Working
8
Developer 8
2020.06.26
Rating
5
(6)
Projects
8
0%
Arbitration
1
0% / 100%
Overdue
3
38%
Working
9
Developer 9
2020.06.26
Rating
4.87
(117)
Projects
138
41%
Arbitration
30
7% / 77%
Overdue
20
14%
Free
10
Developer 10
2020.06.26
Rating
4.85
(78)
Projects
138
30%
Arbitration
29
28% / 45%
Overdue
44
32%
Working
11
Developer 11
2020.06.26
Rating
4.92
(212)
Projects
347
66%
Arbitration
9
56% / 0%
Overdue
87
25%
Free
12
Developer 12
2020.06.29
Rating
4.86
(57)
Projects
125
32%
Arbitration
7
14% / 71%
Overdue
32
26%
Free

Project information

Budget
30 - 80 USD
For the developer
27 - 72 USD
Deadlines
from 4 to 10 day(s)