stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

ChangeTheColor EA
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=221
Page 7 of 24
Author:  ROBST3R [ Tue Jan 17, 2012 9:18 am ]
Post subject:  Re: ChangeTheColor EA

alot of failed orders because trade context is busy!

1Hour timeframe
Author:  fxshadow [ Tue Jan 17, 2012 9:20 am ]
Post subject:  Re: ChangeTheColor EA

magft wrote:
fxshadow wrote:I get trade context errors. Can these orders be programmed to retry?
Strange, it is programmed to retry 10 times. Which criminal are you using this on and what timeframe and settings?

Just a note to anyone having issues, please let me know the criminal, timeframe and attach your set file for me to check.

Regards

Mike
Cowboy IBFX US, 1Hr TF
Author:  magft [ Tue Jan 17, 2012 10:26 am ]
Post subject:  Re: ChangeTheColor EA

ROBST3R wrote:alot of failed orders because trade context is busy!

1Hour timeframe
The errors are due to multiple trades being sent to broker at the same time, nothing to do with the EA, as you are running on multiple pairs. If it was a multi-pair trader this wouldnt happen, or if you run multiple copies of Empty4 to spread the number of pairs.

If you look some, if not all the trades will be placed, if not you can edit the code and change the max number of retries look for

Code: Select all

//Matt's O-R stuff
int 	         O_R_Setting_max_retries 	= 10;
Hope this helps

Mike
Author:  magft [ Tue Jan 17, 2012 10:51 am ]
Post subject:  Re: ChangeTheColor EA

Updated first post as George spotted a bloop in DoneForTheDay code.

Thanks George for your help.

Mike
Author:  ROBST3R [ Tue Jan 17, 2012 11:48 am ]
Post subject:  Re: ChangeTheColor EA

Thnx for the update Mike.

You are still working on the useopenoppositetrade function?

Thnx,

Robert
Author:  Smoochie88 [ Tue Jan 17, 2012 1:35 pm ]
Post subject:  Re: ChangeTheColor EA

Hi, I am new here and into the Foreign Exchange scene. It's very fun and I'm very enthusiastic about it.

Am I doing it right?
ss_Empty4.png
Was wondering if Markets.com is the right broker. Also do you recommend 1H timeframe? Does it make a big difference in automated trading with the use of this bot?

Thanks for your response, and thank you for your work creating and designing this.

edit: possible solution for error 146?http://articles.mql4.com/141
Author:  magft [ Tue Jan 17, 2012 2:39 pm ]
Post subject:  Re: ChangeTheColor EA

magft wrote:
ROBST3R wrote:alot of failed orders because trade context is busy!

1Hour timeframe
The errors are due to multiple trades being sent to criminal at the same time, nothing to do with the EA, as you are running on multiple pairs. If it was a multi-pair trader this wouldnt happen, or if you run multiple copies of Empty4 to spread the number of pairs.

If you look some, if not all the trades will be placed, if not you can edit the code and change the max number of retries look for

Code: Select all

//Matt's O-R stuff
int 	         O_R_Setting_max_retries 	= 10;
Hope this helps

Mike
Just noticed that i put the wrong variable for retries, you need to change

Code: Select all

int            RetryCount = 10;//Will make this number of attempts to get around the trade context busy error.
This will try 10 times with 100ms wait in between, i am running 6 tfs on EU at the moment and i am seeing trade context errors so i'm going to try 20 retries.

BTW currently have 53pips after 1 hr from M5 trade, M15 still going at 34pips and H1 trade at 6pips. The M30 was giving the trade context error so never entered, H4 and D1 no trades yet. I started test at 14:30 GMT today using OOTB but with candle TS and ATR filter on.

Mike
Author:  reinier [ Tue Jan 17, 2012 2:53 pm ]
Post subject:  Re: ChangeTheColor EA

I am facing many times error 130 stop can not be set.
As a result the trade is openen without a stop loss.
But I am using default settings and not set any figures for the stop.
Can you please advise

2012.01.17 15:52:04 ChangeTheColor EURNZD,M5: Alert: EURNZD SL/TP order modify failed with error(130): invalid stops
2012.01.17 15:52:04 ChangeTheColor EURNZD,M5: EURNZD SL/TP order modify failed with error(130): invalid stops
2012.01.17 15:52:04 stdlib EURNZD,M5: loaded successfully
2012.01.17 15:52:04 ChangeTheColor EURNZD,M5: open #5639604 sell 0.01 EURNZD at 1.5915 ok
Author:  magft [ Tue Jan 17, 2012 3:02 pm ]
Post subject:  Re: ChangeTheColor EA

reinier wrote:I am facing many times error 130 stop can not be set.
As a result the trade is openen without a stop loss.
But I am using default settings and not set any figures for the stop.
Can you please advise

2012.01.17 15:52:04 ChangeTheColor EURNZD,M5: Alert: EURNZD SL/TP order modify failed with error(130): invalid stops
2012.01.17 15:52:04 ChangeTheColor EURNZD,M5: EURNZD SL/TP order modify failed with error(130): invalid stops
2012.01.17 15:52:04 stdlib EURNZD,M5: loaded successfully
2012.01.17 15:52:04 ChangeTheColor EURNZD,M5: open #5639604 sell 0.01 EURNZD at 1.5915 ok
That will be that the last colour change is the SL by default and this is too close to price, i am looking into using freeze level to stop the error and i might make it an option to add freezelevel on to price to make sure a SL is set. This will be in next release.

In the meantime you could set a SL to the min stop of broker and turn off UseLastColorChangeSL.

Hope this helps

Mike
Author:  magft [ Tue Jan 17, 2012 3:14 pm ]
Post subject:  Re: ChangeTheColor EA

Any other requests for next release?

Rob, i will look into the opening a new trade in opposite direction function.

Anyone opposed to me removing the Stoch filter? I personally find the ATR a better filter from tests but if anyone is using it i will leave it in, just trying to remove extra bits i added during testing with Rob.

I am looking into reducing cpu overhead by adding synergy into EA, i need to do thorough testing to make sure i dont break anything in the process so this will be a major release.

Regards

Mike
All times are UTC Page 7 of 24