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
Hidden Pending Order EA
- Wobstix
- Trader
- Posts: 34
- Joined: Sun Nov 20, 2011 5:49 am
- Location: South Africa
Hidden Pending Order EA
You do not have the required permissions to view the files attached to this post.
Work is love made visible
- gaheitman
- Trader
- Posts: 655
- Joined: Tue Nov 15, 2011 10:55 pm
- Location: Richmond, VA, US
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.Wobstix wrote: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
George
- Wobstix
- Trader
- Posts: 34
- Joined: Sun Nov 20, 2011 5:49 am
- Location: South Africa
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
I will look at it again when I get home from work tomorrow.
I really appreciate the input.
Rob
Work is love made visible
- SteveHopwood
- Owner
- Posts: 9904
- Joined: Tue Nov 15, 2011 8:43 am
- Location: Misterton - an insignificant village in England. Very pleasant to live in.
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:
So, your ecn code will not be reached because it is inside a conditional that will only travel further if Broker_is_ECN is false.
Separate the two conditionals:
Hope this helps.

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
if(!Broker_is_ECN)
{
//Do some code
if(Broker_is_ECN)
{
//Do some code
}//if(Broker_is_ECN)
}f(!Broker_is_ECN)Separate the two conditionals:
Code: Select all
if(!Broker_is_ECN)
{
//Do some code
}f(!Broker_is_ECN)
if(Broker_is_ECN)
{
//Do some code
}//if(Broker_is_ECN)
Read the effing manual, ok?
Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.
I still suffer from OCCD. Good thing, really.
Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.
To see The Weekly Roundup of stuff you guys might have missed Click here
My special thanks to Thomas (tomele) for all the incredible work he does here.
Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.
I still suffer from OCCD. Good thing, really.
Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.
To see The Weekly Roundup of stuff you guys might have missed Click here
My special thanks to Thomas (tomele) for all the incredible work he does here.
- Wobstix
- Trader
- Posts: 34
- Joined: Sun Nov 20, 2011 5:49 am
- Location: South Africa
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
Sorted that out.
............................ :arrow:
..........
Oh my word :!:
Now the sh...t hit the fan !
.......
Off to work now.
Will scratch when I get home
Work is love made visible
- Wobstix
- Trader
- Posts: 34
- Joined: Sun Nov 20, 2011 5:49 am
- Location: South Africa
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
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
You do not have the required permissions to view the files attached to this post.
Work is love made visible
- gaheitman
- Trader
- Posts: 655
- Joined: Tue Nov 15, 2011 10:55 pm
- Location: Richmond, VA, US
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.Wobstix wrote: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
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
Start()
Check if trade exists, if it does return(0) or suspend robot and return(0)
determine whether it is a buy/sell
configure SL/TP variables.
if we are looking for a buy, check for price to be above or equal to Entry
if it is, sendsingletrade(ticket, slippage, lots, Entry, SL, TP)
if we are looking for a sell, check for price to be below or equal to Entry
if it is, sendsingletrade(ticket, slippage, lots, Entry, SL, TP)
<end of start>
- Wobstix
- Trader
- Posts: 34
- Joined: Sun Nov 20, 2011 5:49 am
- Location: South Africa
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.
You're good.
Thank you.
I will spend some time on my structure. See if I can figure it out.
Thank you once again.
Work is love made visible
- Wobstix
- Trader
- Posts: 34
- Joined: Sun Nov 20, 2011 5:49 am
- Location: South Africa
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.
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.
Work is love made visible
- Wobstix
- Trader
- Posts: 34
- Joined: Sun Nov 20, 2011 5:49 am
- Location: South Africa
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.
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.
You do not have the required permissions to view the files attached to this post.
Work is love made visible