| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| HELP WITH ERROR 4107 https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=2914 |
Page 4 of 18 |
| Author: | fx800 [ Wed Aug 14, 2013 12:25 pm ] |
| Post subject: | Re: HELP WITH ERROR 4107 |
ok. thanks. |
|
| Author: | fx800 [ Thu Aug 15, 2013 4:41 pm ] |
| Post subject: | Re: HELP WITH ERROR 4107 |
Still getting error 130, invalid stops, despite using buffer of 10 pips. Very odd. Does anyone know of a recent ea using pending orders ? I could have a look at its pending order code. |
|
| Author: | ewinner [ Thu Aug 15, 2013 9:25 pm ] |
| Post subject: | Re: HELP WITH ERROR 4107 |
Have you tried just sending the trade without a SL or TP? |
|
| Author: | fxdaytrader [ Fri Aug 16, 2013 2:14 am ] |
| Post subject: | Re: HELP WITH ERROR 4107 |
I just tried to see if it works - implemented the code in another script of mine to see if it fires out a pending. and it does. I assume your problem could be the orderexpiration-time. It seems you have to append * 60 to the code. Another problem could the minimum expiry-minutes be, I read it should be at least 11 mins at http://forum.mql4.com/4992 Code: Select all |
|
| Author: | fx800 [ Fri Aug 16, 2013 4:33 am ] |
| Post subject: | Re: HELP WITH ERROR 4107 |
Thanks for helping. Will try without SL and TP. |
|
| Author: | fx800 [ Fri Aug 16, 2013 4:53 am ] |
| Post subject: | Re: HELP WITH ERROR 4107 |
Thanks for your help. I will try adding *60 to the pending expiry code and see. The odd thing is that the same pending expiry code works when added to Steve's GDAY MK2 EA. How do you explain that apart from the fact that the InsertStopLoss and InsertTakeProfit codes are slightly different in GDAY and it does not have the function "void CheckTpSlAreCorrect(int type)" Anyway, will try the *60 first. Having said that, I have tried commenting out the pending expiry line, and the same error persisted. Besides, Dietcoke's pending expiry code works perfectly well in another of my ea without the *60. In fact, after Dietcoke very kindly provided his modification, I found out that Steve's shell ea already has the pending expiry code which has been commented out as most of his ea's uses buyopen and sellopen. The code in question is attached below Code: Select all |
|
| Author: | fxdaytrader [ Fri Aug 16, 2013 4:54 am ] |
| Post subject: | Re: HELP WITH ERROR 4107 |
See attached script (belongs to Empty4/experts/scripts), relevant are the parts between //pending stuff, for testing purposes - just send sellstop order and //end pending stuff, for testing purposes - just send sellstop order I removed (nearly) all of the stuff not needed here. The script just sends a sellstop-order (works fine at my Empty4). Look at the code for details |
|
| Author: | fx800 [ Fri Aug 16, 2013 10:08 am ] |
| Post subject: | Re: HELP WITH ERROR 4107 |
Thank you very much. You are most kind. |
|
| Author: | fx800 [ Fri Aug 16, 2013 11:43 am ] |
| Post subject: | Re: HELP WITH ERROR 4107 |
Added the following modification to bool SendSingleTrade and waiting for the next order. Code: Select all |
|
| Author: | fx800 [ Fri Aug 16, 2013 12:47 pm ] |
| Post subject: | Re: HELP WITH ERROR 4107 |
The same error 130. Setting SL and TP to zero does not help either. However, removing the pending expiry code altogether works but cannot set how many bars the pending order is for. I would prefer to set the PO for one bar only. NOW WE KNOW THE PROBLEM IS WITH THE PENDING ORDER EXPIRY CODE. Code: Select all |
|
| All times are UTC | Page 4 of 18 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|