Hidden Pending Order EA

User avatar
gaheitman
Trader
Posts: 655
Joined: Tue Nov 15, 2011 10:55 pm
Location: Richmond, VA, US

Re: Hidden Pending Order EA

Post by gaheitman »

Wobstix wrote: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.
Not sure when you are getting the error, but you have type defined as a string:

Code: Select all

      if (Ask < Entry)
      {
         Pending = "Buy";
         string type = "OP_BUY";
      }
      if (Ask > Entry)
      {
         Pending = "Sell";
         type = "OP_SELL";
      }
You later call OrderSend() passing it type. It expects an integer. Your code above should be:

Code: Select all

      if (Ask < Entry)
      {
         Pending = "Buy";
         int type = OP_BUY;
      }
      if (Ask > Entry)
      {
         Pending = "Sell";
         type = OP_SELL;
      }
The order type constants OP_BUY, OP_SELL, OP_BUYSTOP and OP_SELLSTOP are predefined.

George
User avatar
Wobstix
Trader
Posts: 34
Joined: Sun Nov 20, 2011 5:49 am
Location: South Africa

Re: Hidden Pending Order EA

Post by Wobstix »

Thanx once again George.
Is there a place where I can get possible causes and/or what to look for as far as error correction goes ?
Work is love made visible
User avatar
gaheitman
Trader
Posts: 655
Joined: Tue Nov 15, 2011 10:55 pm
Location: Richmond, VA, US

Re: Hidden Pending Order EA

Post by gaheitman »

Wobstix wrote:Thanx once again George.
Is there a place where I can get possible causes and/or what to look for as far as error correction goes ?
I often start here: http://www.mql4.com/

You may also want to take a gander at the trading course here: http://www.stevehopwoodforex.com/phpBB3 ... f=15&t=301

George
User avatar
Wobstix
Trader
Posts: 34
Joined: Sun Nov 20, 2011 5:49 am
Location: South Africa

Re: Hidden Pending Order EA

Post by Wobstix »

Well,
I finally got it to work.
in a crude fashion.
I still have more to add, but at least the basic model works.
I want to add larger onscreen info and lines.
Let me not get too carried away at this point.
I want to thank George for his ongoing support.
George, please give it the once over.
Thank you once again.
I will post further improvements here.
You do not have the required permissions to view the files attached to this post.
Work is love made visible
Post Reply

Return to “Coders Hangout”