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

HELP WITH ERROR 4107
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=2914
Page 7 of 18
Author:  fx800 [ Mon Aug 19, 2013 9:22 am ]
Post subject:  Re: HELP WITH ERROR 4107

fxdaytrader wrote:Hm, as I mentioned before, it seems that on my Empty4 everything works as desired.
The trade some hours ago was placed, with the minimum expiration time (11 minutes), because the other calculation went wrong because of the timeframe=0 problem (see my previous post).

But no errors at all. 8-)
That is good news. Thanks for you effort. Hope you had a smashing weekend.
Author:  fxdaytrader [ Mon Aug 19, 2013 10:36 am ]
Post subject:  Re: HELP WITH ERROR 4107

See the latest version attached. Use on H4 timeframe. 8-)

Please have a look to the code (short instructions in the header) / find my changes/mods when searching 'fxdaytrader' in the code.
Most important: When setting AllowMultipleReEntries=true the robot will take multiple re-entry trades, regardless if opentrades==0 !

Set LoadCustomMASettings=false if you want the original settings (see what the functions loads: scroll to the end of file and have a look)

Further you can choose the timeframe for ma-stacking (I set it to 60, you may change that).

If you want to use the debug-feature for pending trade, set usedebug=true (I set it to false because on my terminal everything seems to work now).

TO DO: close pendings/stop trading on friday / sleep when market is closed / utc time
Author:  fx800 [ Mon Aug 19, 2013 10:50 am ]
Post subject:  Re: HELP WITH ERROR 4107

fxdaytrader wrote:See the latest version attached. Use on H4 timeframe. 8-)

Please have a look to the code (short instructions in the header) / find my changes/mods when searching 'fxdaytrader' in the code.
Most important: When setting AllowMultipleReEntries=true the robot will take multiple re-entry trades, regardless if opentrades==0 !

Set LoadCustomMASettings=false if you want the original settings (see what the functions loads: scroll to the end of file and have a look)

Further you can choose the timeframe for ma-stacking (I set it to 60, you may change that).

If you want to use the debug-feature for pending trade, set usedebug=true (I set it to false because on my terminal everything seems to work now).

TO DO: close pendings/stop trading on friday / sleep when market is closed / utc time
Thanks, fxdaytrader.

Will set up demo with the latest update.
Author:  fx800 [ Tue Aug 20, 2013 3:40 am ]
Post subject:  Re: HELP WITH ERROR 4107

fx8000 wrote:
fxdaytrader wrote:See the latest version attached. Use on H4 timeframe. 8-)

Please have a look to the code (short instructions in the header) / find my changes/mods when searching 'fxdaytrader' in the code.
Most important: When setting AllowMultipleReEntries=true the robot will take multiple re-entry trades, regardless if opentrades==0 !

Set LoadCustomMASettings=false if you want the original settings (see what the functions loads: scroll to the end of file and have a look)

Further you can choose the timeframe for ma-stacking (I set it to 60, you may change that).

If you want to use the debug-feature for pending trade, set usedebug=true (I set it to false because on my terminal everything seems to work now).

TO DO: close pendings/stop trading on friday / sleep when market is closed / utc time
Thanks, fxdaytrader.

Will set up demo with the latest update.
I am still getting error 130. Have set debug to true. Will post the log file when it happens again.

However, despite the error130, the ea did send the pending order which was later triggered.

Demo is with E-Global.
Author:  fxdaytrader [ Tue Aug 20, 2013 4:46 am ]
Post subject:  Re: HELP WITH ERROR 4107

:o wow, yes, please post the details (experts tab/journal) - because I do not understand it, I got no errors and everything works.
Author:  fx800 [ Tue Aug 20, 2013 5:14 am ]
Post subject:  Re: HELP WITH ERROR 4107

fxdaytrader wrote::o wow, yes, please post the details (experts tab/journal) - because I do not understand it, I got no errors and everything works.
Excellent news. Which broker are you using ? I could set up a demo and use a trade copier.

Is there a free trade copier around that is not blocked by Metaquotes ? I understand Metaquotes have blocked MT4i trade copier.

I am using H1 TF to get more trade entries. All TF settings set to = 0.
Author:  fx800 [ Tue Aug 20, 2013 9:04 am ]
Post subject:  Re: HELP WITH ERROR 4107

Error 130

2013.08.20 10:00:56 Bob and Shelley Again.v1o.PendingOrders.fxdaytrader 19-8-2013 2 EURCAD,H1: EURCAD Bob and Shelley Again.v1o.PendingOrders.fxdaytrader 19-8-2013 2 OP_BUYSTOP order send failed with error(130): invalid stops

2013.08.20 10:00:56 Bob and Shelley Again.v1o.PendingOrders.fxdaytrader 19-8-2013 2 GBPCAD,H1: GBPCAD Bob and Shelley Again.v1o.PendingOrders.fxdaytrader 19-8-2013 2 OP_BUYSTOP order send failed with error(130): invalid stops

Pending orders not sent.
Author:  fxdaytrader [ Tue Aug 20, 2013 9:35 am ]
Post subject:  Re: HELP WITH ERROR 4107

Great, thank you very much for the logfile - It seems that there is a problem with the takeprofit-line drawn for stackingtrades (the error occurs in the countopentrades-function).
I will check and fix that (did not had a look to it yet, overlooked it, ...).

btw - see attached the screenshot of the pending order sent today, expiration time etc. works as desired ;)
BASA-buystop-gbpusd.png
Author:  fx800 [ Tue Aug 20, 2013 9:43 am ]
Post subject:  Re: HELP WITH ERROR 4107

fxdaytrader wrote:Great, thank you very much for the logfile - It seems that there is a problem with the takeprofit-line drawn for stackingtrades (the error occurs in the countopentrades-function).
I will check and fix that (did not had a look to it yet, overlooked it, ...).

btw - see attached the screenshot of the pending order sent today, expiration time etc. works as desired ;)
BASA-buystop-gbpusd.png
Danke, Fxdaytrader !

You are doing a great job and are making good progress. I am sure your effort will be rewarded ten fold.

I am doing very well manually with the strategy and pending orders. Very few failed entry.

I trade price action with Nial Fuller's course, always enter with pending orders. If price has no momentum, it will not clear the next bar high/low. This principle is true more often than not.

So far the ea has taken two trades, both in profit.
Author:  fxdaytrader [ Tue Aug 20, 2013 10:31 am ]
Post subject:  Re: HELP WITH ERROR 4107

Regarding your 130-error try the following please:

In the CountOpenTrades()-function look for that line (must be line number ~2507):

Code: Select all

if (MaxTradesAllowed > 1)
That code replace with this:

Code: Select all

if (OrderComment()==StackTradeComment && MaxTradesAllowed > 1 && (OrderType()==OP_BUY || OrderType()==OP_SELL)) //fxdaytrader
I am not 100% sure if it helps, but I think it is worth a try. 8-)

In your logfile I found another error:
cannot open file 'C:\FOREX Empty4\E-GLOBAL\experts\Bob and Shelley Again.v1o.PendingOrders.fxdaytrader 19-8-2013 2.ex4', expert was not reloaded


The way I try to solve that kind of problems when I download a new mq4-file: Copy the mq4-file in the desired directory (e.g. experts/). Then load another file from your Empty4 (rightclick - edit) in the editor, press F5 key to compile (it seems that all files will be re-compiled, or at least the files where no .ex4 exists) ...
All times are UTC Page 7 of 18