| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| basic ea need help https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=4126 |
Page 1 of 1 |
| Author: | OldTrader [ Thu Feb 19, 2015 9:31 pm ] |
| Post subject: | basic ea need help |
I am playing with a very basic ea, however there is one thing I can't seem to figure out how to allow for multiple orders same direction. I have trade conditions set and working, but every once in awhile I will get a second entry condition whilst still in a trade. I'd like to allow it to open these trades (stack). I cannot see in the code where it specifically disallows this, but I am very newb to code. This is the ea I made using an online code generator. It's just for me to learn and to hopefully try out some basic ideas, but this little obstacle has me thrown already. Anyone willing to help? Thanks |
|
| Author: | SteveHopwood [ Thu Feb 19, 2015 11:30 pm ] |
| Post subject: | basic ea need help |
Your chances of arousing the interest of a coder here in something you generated online are as close to zero as anything can get. EA coders populate their code with explanatory comments so that when they revisit their code several months later and have totally forgotten what it was they coded (guess how I know) they can start to rebuild a picture of what it is they coded. Actually, I am rubbish at this but that is another story. Online code generators do not include such commentary. So your code is unreadable. There may be noob coders here anxious to make an impact here by helping you out. The rest of us are not interested. You might be better off presenting the results of several months of live manual trading, then asking one of the brilliant coders to write an ea. We have quite a decent track record here. Unlike you. |
|
| Author: | OldTrader [ Fri Feb 20, 2015 12:45 am ] |
| Post subject: | basic ea need help |
whatever you say boss |
|
| Author: | dietcoke [ Fri Feb 20, 2015 12:50 am ] |
| Post subject: | basic ea need help |
The problem is here in line 43/44 for longs. There is a similar situation later on for shorts Code: Select all basically if Code: Select all The line is there to prevent the EA constantly opening trades. To implement stacking, you will need to change code so that rather than looking at the currently open trades, it looks for new trades once per bar at the start of the bar. |
|
| Author: | OldTrader [ Fri Feb 20, 2015 1:15 am ] |
| Post subject: | basic ea need help |
thank you dc, that allows me to understand why it doesn't, so i will continue searching for the answer on how to code it the way you've described. appreciate the time |
|
| All times are UTC | Page 1 of 1 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|