Trabalho concluído
Termos de Referência
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