New article Price Action. Automating the Engulfing Pattern Trading Strategy has been published:
This article describes a process of creating an Expert Advisor for
MetaTrader 4 based on the Engulfing pattern, as well as the pattern
recognition principle, rules of setting pending orders and stop orders.
The results of testing and optimization are provided for your
All Forex traders come across the Price
Action at some point. This is
not a mere chart analysis technique but the entire system for defining
the possible future price movement direction. In this article, we will
analyze the Engulfing pattern and create an Expert Advisor which will
follow this pattern and make relevant trading decisions based on it.
We have previously examined the automated trading with Price Action patterns, namely the Inside Bar trading, in the article Price Action. Automating the Inside Bar Trading Strategy.
The Engulfing pattern is when the body
and shadows of a bar completely engulf the body and shadows of the
previous bar. There are two types of patterns available:
Fig. 1. Types of pattern shown on the chart
Author: Dmitry Iglakov
This article was very helpful for me as a newbie too.
I noticed you included extern int Slippage = 2. I have a few questions about that.
I tested your EA with Slippage = 2, as well as 0, and got the same result. My demo account is with New York based FXCM, which uses a 5 decimal place point. OrderSend wants an int for its Slippage parameter and your EA doesn't modify the 2 in any way.
Does OrderSend interpret the 2 to equal 2 pips (.00020) or 2 tenths of a pip (.00002)?
Does the backtesting process in a demo account even do anything with that extern int Slippage or does it ignore it?
My next question is: what is the practical difference between slippage and the Deviation setting in Tools|Options|Trade? The default is 10 pips. The User Guide describes this Deviation field:
MQL4 Reference|OrderSend describes the Slippage parameter:
[in] Maximum price slippage for buy or sell orders."
Do the extern int Slippage code and the Deviation setting do the same thing? If so, why put the Slippage code in the EA? Is there a difference between how the MetaTrader and broker handle extern int Slippage = 2 and Deviation = 2 ? If they are different numbers does one take precedence over the other? Do I need that extern int Slippage code at all? If I can/should try to regulate the acceptable amount of slippage I think I'd rather do it in extern so I more easily change it in the parameters dialog rather than going into the Options|Trade tab. But what if the Deviation setting doesn't match the Slippage parameter?
Do either or both of these influence the result differently depending on whether it is a market order or a limit order or a stop order?
Thanks for any insight
Do you have an indicator of this ? engulfing indicator that marks the bar puts a line for the stop and target
or or mutli time frame indicator of engulfing bars