| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Changing code of one of Steves old EA's... https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=3227 |
Page 3 of 4 |
| Author: | SteveHopwood [ Thu Oct 31, 2013 4:35 pm ] |
| Post subject: | Re: Changing code of one of Steves old EA's... |
Yes. Remove the [2] lines. Sing out if you have a problem. |
|
| Author: | SpiderX [ Fri Nov 01, 2013 12:52 am ] |
| Post subject: | Re: Changing code of one of Steves old EA's... |
Hi Steve, Not sure if i missed out something, but so far on the EA there is only selling and no buying. Edit: 1. Looking at the code under LookingForTradingOpportunities: Code: Select all It seems the short side code has more material than the long. Is this correct ? 2. Even though this bug has not emerged yet, but it seems that the EA does not take into consideration TradeOppositeOfTrigger for the closure of trades. Closure of trade looks to be correct only for the existing logic. There seems to be a need for additional code in trade closure to take opposite of trigger into account. Please correct me if the above is wrong as i am much less familiar with the code than you. Cheers |
|
| Author: | SteveHopwood [ Fri Nov 01, 2013 9:51 am ] |
| Post subject: | Re: Changing code of one of Steves old EA's... |
The code isn't quite right. Using opposite direction would leave the ea wanting to send both long and short trades. I will have a look later. |
|
| Author: | SpiderX [ Sat Nov 02, 2013 6:01 am ] |
| Post subject: | Re: Changing code of one of Steves old EA's... |
Thanks Steve, Looking forward to it. Cheers |
|
| Author: | SteveHopwood [ Sat Nov 02, 2013 3:31 pm ] |
| Post subject: | Re: Changing code of one of Steves old EA's... |
Hehe. Not sure what I was on when I coded the updated version. I have hijacked the bottom of Hannes op and uploaded V 1a to post 1. |
|
| Author: | SpiderX [ Sat Nov 02, 2013 4:14 pm ] |
| Post subject: | Re: Changing code of one of Steves old EA's... |
Thanks Steve, By the way, i observed that the code could be more efficient in some places, if "if..else" is used, instead of just "if ...if...if" Just for example: Code: Select all Code: Select all I was wondering if there was something buggy with "if..else" that leads to "if...if..if..if". Cheers |
|
| Author: | SteveHopwood [ Sat Nov 02, 2013 4:22 pm ] |
| Post subject: | Re: Changing code of one of Steves old EA's... |
I was just looking through some code by one of our highly respected pro coders and saw lots of instances of what you describe. Thanks for the explanation. |
|
| Author: | SpiderX [ Sun Nov 03, 2013 5:12 am ] |
| Post subject: | Re: Changing code of one of Steves old EA's... |
Hi Steve, Hannes, Uploaded v1a with original favour here for convenience. Also made some of the minor optimizations which i mentioned. The changes were made to the following lines in scite: 662, 687-691, 735, 742, 748 766, 773, 1118, 1154, 1405 1427, 1470, 1631, 1652 1667, 1677, 1717, 1720, 1724 1727, 1749, 1769-1771, 1782 1790-1792, 1802, 1863, 1907 2016, 2085, 2097, 2142, 2156 2185, 2200, 2240, 2265, 2389 2485, 2541, 2684, 2949, 2974 I placed the line positions here for you to review if you are free. Probably it is worth considering adding the above" upgrades" to the shell code. The only question that needs to be asked at each of these points are: "If A executes, does that mean that B will NEVER EVER execute ?" If the answer is yes, then it strongly justifies putting in the "else if", to make sure that never happens no matter what the circumstance is. Probably you can find more places for enhancements than me. Cheers |
|
| Author: | HannesJoubert [ Mon Nov 04, 2013 9:18 am ] |
| Post subject: | Re: Changing code of one of Steves old EA's... |
Hi there Steve, Spider, everyone else Of course I missed the moves on Friday afternoon as I was waiting for the VPS to be setup, but that is the kind of move that I am looking to take advantage of. So, I have set up the VPS over the weekend, and have installed the EA and pulled the trigger...So now we wait. Will keep you up to date on performance. Many thanks for your input and help with the coding.. Cheers H |
|
| Author: | HannesJoubert [ Mon Nov 04, 2013 9:49 am ] |
| Post subject: | Re: Changing code of one of Steves old EA's... |
Hmm, the EA closed a sell trade after two bull candles, but did not open a long trade as a result of the two bull candles...i.e. the sell trade should have closed and the long trade opened immediately (hence, always in moniker)... Does the code read like that? Yes, I did download the newest version of the EA, after Spider pointed out that the EA only sells and does not buy...Is it possible that the bug is not yet fixed? |
|
| All times are UTC | Page 3 of 4 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|