| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| GridRange EA https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=1398 |
Page 1 of 1 |
| Author: | mast83 [ Sun Jan 20, 2013 12:06 pm ] |
| Post subject: | GridRange EA |
Dear fellow members, I'm trying learn how to write programs via MQL4. Currently I'm working on a project called GridRange EA. I've never learned how to write programs and so I'd like to ask if you can help me to finish this EA. The rules which the EA has to work are the following ones: --> This EA tries to perform in a Range and reaches it's TP. When TP is reached all other orders will be closed and you shall be in profit. It works with a martingale system but I think that this EA will work conservative. 1. Place market orders long as well as short (hedged positions) 2. The orderopenprice from step one will be added with 20. This is now the TP for orders in their direction. (As Example: long 1,3000 with 0,01 lots TP = 20 @ 1,3020 / short 1,2999 with 0,01 lots TP = 20 @ 1,2979) 3. If quote moves for example 10 Pips from 1,3000 to 1,3010 than open new market order @ 1,3010 long with 0,01 lots and no TP. 4. If quote reaches 1,3020 and triggers TP of long order in step 2 than close all other active orders. 5. If quote moves back from 1,3010 (step 3) to 1,3000 open new market order short with faktor x (for example 2). So you have a new market order with 0,02 lots at 1,2999. 6. If quote moves down to 1,2989 than open new short order with factor x in matter of last lotsize used at step 5. So 0,02 * 2 = 0,04. You have a new active market order with 0,04 lots @ @ 1,2989. 7. If quote still moves down to the TP of the 1st short order (step 2) TP is triggered, order will be closed with profit and all other orders will be closed too. I hope you all understand the way this EA shall work. I know that it is not perfect now and that it has some weak points, but I think if skeletal structure is okay and works it is easier to modify it. Attached you can find my written mql4-file with annotations (currently in German). Thank you very much for your help! I appreciate your effort. Regards Marc |
|
| Author: | SWG123 [ Sun Jan 20, 2013 5:29 pm ] |
| Post subject: | Re: GridRange EA |
It might be better to move this to Coders' Hangout? |
|
| Author: | mast83 [ Mon Mar 04, 2013 9:12 pm ] |
| Post subject: | Re: GridRange EA |
Hi Everybody, still nobody here who can help me with my issue? Regards Marc |
|
| Author: | nanningbob [ Mon Mar 11, 2013 7:47 am ] |
| Post subject: | Re: GridRange EA |
Go to this thread where my 100x40 grid EA is at. I havent used it in years so dont know if it works but you can see the code and use it to adapt yours or adapt it. I used the EA for years so I know it worked well back then. Just set an entrance point and how many pips for that point and it will automatically reenter at those points. Good luck. http://www.stevehopwoodforex.com/phpBB3 ... =38&t=1415 |
|
| All times are UTC | Page 1 of 1 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|