Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.
From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.
Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
Elite Section
Get access to private discussions, specialized support, indicators and trading systems reported every week.
Advanced Elite Section
For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
Hello all, first of all I've searched this site for an answer to my question and not found a clear answer.
I'm using Expert Advisor Builder for Meta Trader 4 Expert Advisor Builder for MetaTrader 4 to create an EA. The problem I have is that the EA opens a trade whenever:
A. the defined rules for opening a trade at the beginning of a new bar (ex. 1 hour) are true.
AND
B. if a trade opened as a result of the above has closed, and the defining bar (ex. 1 hour) is still active.
I'd like to know how to script or define additional rules so the EA will not continually open trades, within the same bar, if a trade had already been opened based upon the rules. I guess another way to state it is how do limit the EA to opening no more than one trade per hour or defined time frame or bar.
Thanks in advance to anyone who can offer a clear concise solution.
The Stamp will limit you 1 trade / bar. Hope this help.
Regards,
David
__________________
"All through time, people have basically acted and reacted the same way in the market as a result of: greed, fear, ignorance, and hope. That is why the numerical formations and patterns recur on a constant basis." - Jesse Lauriston Livermore
Yes. MT4 restart may cause it to fire up another trade if it happened within the same hour. However, this can avoid complication of having different magic number every hour. Such as:
Magic + 13 hour = 18000 + 13 = 18013
If current hour is 14:00, magic number had automatically changed to 18014. Trailing stop not function until next day's 13:00. No worries, this is not a debate. May be you prefer changing magic number.
Regards,
David
__________________
"All through time, people have basically acted and reacted the same way in the market as a result of: greed, fear, ignorance, and hope. That is why the numerical formations and patterns recur on a constant basis." - Jesse Lauriston Livermore