Can anyone code this simple EA? - page 3

To add comments, please log in or register
Michael B
3377
Michael B  

the op didn't work...

matrixebiz
1733
matrixebiz  

Sample hour didn't work. Almost as soon as I opened the Platform and the market opened, it placed trades.

ralphronnquist
420
ralphronnquist  

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

Michael B
3377
Michael B  

ralphy..won't this EA that you wrote work?...just enter in zero's for TS and BE..

ES

https://www.mql5.com/en/forum/177788

ralphronnquist
420
ralphronnquist  

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.

ralphronnquist
420
ralphronnquist  
ElectricSavant:
ralphy..won't this EA that you wrote work?...just enter in zero's for TS and BE..

ES

https://www.mql5.com/en/forum/177788

Btw. In fairness: I didn't write that EA. I merely made a small correction.

matrixebiz
1733
matrixebiz  
ralph.ronnquist:
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.

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 ??

ralphronnquist
420
ralphronnquist  

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.

Michael B
3377
Michael B  

RR,

What does this mean?

But I updated this EA to have an "enabling period limit"

matrixebiz
1733
matrixebiz  

Oh, well, it was a good try. The backtest shows multiple trades in one day, so something isn't right.

To add comments, please log in or register