Kaufman AMA break out EA - page 8

 

canEnterNewTrade when times span midnight

When the time spans midnight (00:00) canEnterNewTrade will fail.

StrToTime converts the extern (start/end) time after appending it to the current time Time[0]

datetime ts = StrToTime(TimeToStr(Time[0],TIME_DATE)+st1);

If the end time te resolves to a datetime > ts, then there is no problem.

The check below catches conditions when te < ts; but, instead of subtracting a day's worth of seconds, you probably want to add the number to te

if (te<ts) te -= 24*60*60;

if (te<ts) te += 24*60*60;

works in tests so far

 

...

Kaufman AMA breakout files

Up to date file are going to be kept on this post

 

...

adeo

You are right, but actually the problem is more consternating than that.

Let me explain : let suppose that the starting time is 22:00 and ending time is 02:00. If we subtract, then orders will be entered from 00:00 to 02:00 of the current day and will be omitted from 22:00 to 00:00. If we add, then the orders will be entered from 22:00 to 00:00 and will be omitted from 00:00 to 02:00. So the solution is (as I see it) to have both, and have done it so in the updated version of the EA. Now it covers both case and will trade for a correct time. Also, now it will trade as it should even on time frames >= daily (it is checking TimeCurrent() now and not Time[0])

Updated the post with it (this one : https://www.mql5.com/en/forum/180383 ) with the version that works as described above. Let me know how it works now in the tests

adeo:
When the time spans midnight (00:00) canEnterNewTrade will fail.

StrToTime converts the extern (start/end) time after appending it to the current time Time[0]

datetime ts = StrToTime(TimeToStr(Time[0],TIME_DATE)+st1);

If the end time te resolves to a datetime > ts, then there is no problem.

The check below catches conditions when te < ts; but, instead of subtracting a day's worth of seconds, you probably want to add the number to te

if (te<ts) te -= 24*60*60;

if (te<ts) te += 24*60*60;

works in tests so far
 
mladen:
...

Kaufman AMA breakout files

Up to date file are going to be kept on this post
newdigital:
Just want to quote it as it is very important because this EA is the first step to so called EA of the EAs (old senior elite members know this good idea so this EA is the first step to do so).

Dear Friends!

Is there a nmc-version of this EA?

Im just curious about the "EA of the EAs" - is there an EA like this? Or is this a project ongoing? All the best!

Simon

 
simon_json:

Dear Friends!

Is there a nmc-version of this EA?

Im just curious about the "EA of the EAs" - is there an EA like this? Or is this a project ongoing? All the best!

Simon

Simon

Here is a nmc of version 0.12 : kaufman_ama_breakout_-_ea_0.12_nmc.mq4

 
Test a couple of months , with settings stated in the first post.
Files:
 

Hi Everybody, I am trying to install kaufman EA to my MT4 but i couldn't, it says "Tester: Cannot load expert..".. how i can fix it? anybody able to use this EA?


KK

Reason: