the op didn't work...
Sample hour didn't work. Almost as soon as I opened the Platform and the market opened, it placed trades.
I know what you mean, and yes, I didn't think clear enough. The EA always check back for the price at the last sample hour (which may be yesterday) as a basis. Probably not the right thing. Hmm, after the weekend it's even more strange. I suppose, when you start the EA, it should only consider trading into the future, and it shouldn't look back to yesterday.... all this just because I wanted to avoid that it keeps runtime state
ralphy..won't this EA that you wrote work?...just enter in zero's for TS and BE..
Possibly. Probably. But I updated this EA to have an "enabling period limit" so that it should only consider a trade that number of hours after the sample time. All in post #2. This also made it look better at my cursory backtest; didn't even bottom it out.
Also, in case the copyright notice stopped anyone, I've now made this a Public domain software. Go for it.
Btw. In fairness: I didn't write that EA. I merely made a small correction.
I thought the EA was only supposed to initiate the trade at exactly 07:00 GMT ??
So why the 'enabling period limit' option?
On the BackTest it opens when ever it feels like ??
As I read it, the method was to make a trade when or after that price has moved 40 pips away from the 7am price. So it all depends on when that happens, which in theory can be at any time after 7am, up to the next day 7am (and even after that). arsenic786 didn't give any expiration, though maybe there is something implied.
But, you are right in that arsenic786 did express the method in terms of pending orders, whereas I made the EA use market orders attempting to implement the pending order trades. There is a difference, maybe significant, so the EA does not implement the exact method, although it attempts to execute the exact trades that the method proposes.
What does this mean?
But I updated this EA to have an "enabling period limit"
Oh, well, it was a good try. The backtest shows multiple trades in one day, so something isn't right.