| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Hidden Pending Order EA https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=295 |
Page 1 of 2 |
| Author: | Wobstix [ Mon Jan 23, 2012 9:06 pm ] |
| Post subject: | Hidden Pending Order EA |
I am not a coder, not by any means. By copying and pasting Steve's work and a lot of scheming I ended up with what I think may eventually work. Problem is, I have one Warning which I cannot figure out. Please will somebody look at it and help me to get it sorted. Once I have the basic engine running I will try to improve on it by adding Entry, SL & TP lines. Thanx Rob |
|
| Author: | gaheitman [ Mon Jan 23, 2012 9:25 pm ] |
| Post subject: | Re: Hidden Pending Order EA |
A warning during compile time can generally be ignored. In this case, however, since it is reporting that you aren't using SendSingleTrade() I don't think your ea will actually do anything. You need to have it in start() at whatever place is appropriate to enter the trade with whatever arguments are appropriate. George |
|
| Author: | Wobstix [ Mon Jan 23, 2012 9:55 pm ] |
| Post subject: | Re: Hidden Pending Order EA |
Thank you George. I will look at it again when I get home from work tomorrow. I really appreciate the input. Rob |
|
| Author: | SteveHopwood [ Tue Jan 24, 2012 12:28 am ] |
| Post subject: | Re: Hidden Pending Order EA |
Fantastic to see a previous non-coder becoming a coder. There is only one way to learn to code - do it. Once you have been successful a few times, you will not look back. I notice that you have Broker_is_ECN set to true, so I guess your crim is one of these. Even when you have added a call to SendSingleTrade to start(), your code will still not work because you have placed one conditional inside another in such a way that the second cannot be reached. In effect, your construct is this: Code: Select all Separate the two conditionals: Code: Select all |
|
| Author: | Wobstix [ Tue Jan 24, 2012 4:04 am ] |
| Post subject: | Re: Hidden Pending Order EA |
Thanx Steve. Sorted that out. ............................ :arrow: .......... Oh my word :!: Now the sh...t hit the fan ! ....... Off to work now. Will scratch when I get home |
|
| Author: | Wobstix [ Tue Jan 24, 2012 5:43 pm ] |
| Post subject: | Re: Hidden Pending Order EA |
OK. I'm farming in the dark....... without lights on my tractor ! There's something I'm just not seeing. I copied a lot from Steve's 10.0 SH Daily OI BUY EA. Thing is, If I don't have the foundation correct, I cannot build on it, and I have a lot more planned. Maybe I'm being too ambitious too soon. How do you eat an Elephant?.....One bite at a time. So,....can somebody please give me another push in the right direction. Thank you in advance. Rob |
|
| Author: | gaheitman [ Tue Jan 24, 2012 5:59 pm ] |
| Post subject: | Re: Hidden Pending Order EA |
You moved the definition of SendSingleTrade() (and DoesTradeExist() too) into the body of the Start() procedure. It was fine where it was before, you just needed to call it from within the Start() procedure. The Start() procedure will be called by Empty4 every time a tick comes in to the chart the EA is on. If you want to do setup work, it should probably go in Init(), though your use of the Begin variable works as well. Your Start() procedure should be structured like this (not real code): Code: Select all |
|
| Author: | Wobstix [ Tue Jan 24, 2012 6:31 pm ] |
| Post subject: | Re: Hidden Pending Order EA |
Wow. You're good. Thank you. I will spend some time on my structure. See if I can figure it out. Thank you once again. |
|
| Author: | Wobstix [ Tue Jan 24, 2012 6:45 pm ] |
| Post subject: | Re: Hidden Pending Order EA |
My word, I see a huge error on my part. Going through what George has helped me with, I see that I did not check to see if the trade conditions were met. Your flow chart is just what I needed. Now, let me get it working. |
|
| Author: | Wobstix [ Tue Jan 31, 2012 9:18 pm ] |
| Post subject: | Re: Hidden Pending Order EA |
Alright, I have been away for a few days so, could not do anything. I have made so many changes that I am in a totally different place from where I left off. I found and changed a lot, then did a total make-over. I am not getting multiple trades opening - Good Comments are telling me what I want to see as far as Entry, SL & TP are concerned - Good It tries to open a trade at the right price, in the right direction - Good I am, however, getting an error 4063 - integer parameter expected Sometimes I think I have it, only to be destroyed with multiple errors & warnings. Please George, Steve, Point me in the right direction. Thank you in advance. |
|
| All times are UTC | Page 1 of 2 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|