stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Hidden Pending Order EA
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=295
Page 2 of 2
Author:  gaheitman [ Tue Jan 31, 2012 9:32 pm ]
Post subject:  Re: Hidden Pending Order EA

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
Author:  Wobstix [ Wed Feb 01, 2012 5:29 am ]
Post subject:  Re: Hidden Pending Order EA

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 ?
Author:  gaheitman [ Wed Feb 01, 2012 8:10 am ]
Post subject:  Re: Hidden Pending Order EA

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
Author:  Wobstix [ Wed Feb 01, 2012 6:04 pm ]
Post subject:  Re: Hidden Pending Order EA

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.
All times are UTC Page 2 of 2