hi,
pls find the attached code. i record the bar shift ( xBar = iBars(NULL,0) ) after OrderSend(). then before opening new position, check if xBar==iBars(NULL,0).
hth,
stephen
Files:
engulfingea2.mq4
4 kb
Be careful
Hi
Be careful. It's configured for 0.1 lot and an order of 5 lots was oppened
Files:
engulfingea2_0911_a.htm
13 kb
sangmane:
hi,
hi,
pls find the attached code. i record the bar shift ( xBar = iBars(NULL,0) ) after OrderSend(). then before opening new position, check if xBar==iBars(NULL,0).
hth,
stephenThank you Stephen,
It works properly now. I am playing with patterns now. Just trying to figure out the pattern that will work with formula where 20 pips TP and 20 Pips SL and TP occurrence is greater.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I am developing and EA that is based on Enqulfing Candle Pattern. Also trying other patterns. At the moment i have problem with EA, its currently opens many orders per candle. It only should open one order per candle, per pattern occurrence. Please help me to solve it.
I have added a function called NumberOfBarOpenLastPos which prohibits from making another trade on the same bar, but it still opens several positions on the one bar