
- www.mql5.com
OrderSend(NULL,OP_BUYLIMIT,0.01,Ask,10,10,0.89980)
It is unlikely that a buy limit order will be placed at ask.
10 does not look like a valid stoploss to me if the TP is 0.89980
areejyousefhussein:
I had the following line of code which gave me an output of 10: Alert(MarketInfo(NULL,MODE_STOPLEVEL));
and the following is my order send function but its not accepted : OrderSend(NULL,OP_BUYLIMIT,0.01,Ask,10,10,0.89980);
-
Why did you post your MT4 question in the MT5 General section instead of the MQL4 section, (bottom of the Root page)?
General rules and best pratices of the Forum. - General - MQL5 programming forum? (2017)
Next time, post in the correct place. The moderators will likely move this thread there soon. -
Be careful with NULL.
- On MT4, you can use NULL in place of _Symbol only in those calls that the documentation specially says you can. iHigh does, iCustom does, MarketInfo does not, OrderSend does not.
- Don't use NULL (except for pointers where you explicitly check for it.) Use _Symbol and _Period, that is minimalist as possible and more efficient.
- Zero is the same as PERIOD_CURRENT which means _Period. Don't hard code numbers.
- MT4: No need for a function call with iHigh(NULL,0,s) just use the predefined arrays, i.e. High[].
- Cloud Protector Bug? - MQL4 programming forum (2020)
-
Why did you post your MT4 question in the MT5 General section instead of the MQL4 section, (bottom of the Root page)?
General rules and best pratices of the Forum. - General - MQL5 programming forum? (2017)
Next time, post in the correct place. The moderators will likely move this thread there soon. -
Be careful with NULL.
- On MT4, you can use NULL in place of _Symbol only in those calls that the documentation specially says you can. iHigh does, iCustom does, MarketInfo does not, OrderSend does not.
- Don't use NULL (except for pointers where you explicitly check for it.) Use _Symbol and _Period, that is minimalist as possible and more efficient.
- Zero is the same as PERIOD_CURRENT which means _Period. Don't hard code numbers.
- MT4: No need for a function call with iHigh(NULL,0,s) just use the predefined arrays, i.e. High[].
- Cloud Protector Bug? - MQL4 programming forum (2020)
1. Apology Im new here and I didn't notice that there is two different pages for mql4 and mql5...
2. 1. I used it because the instructor did.. I will fix it..
2. I will
hmmm but these didn't solve the issue :/

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Im trying to send an order but it seems that my broker has limits to the orders sent.
I had the following line of code which gave me an output of 10: Alert(MarketInfo(NULL,MODE_STOPLEVEL));
and the following is my order send function but its not accepted : OrderSend(NULL,OP_BUYLIMIT,0.01,Ask,10,10,0.89980);
the order gets rejected with an order ID of -1 can someone please explain to me how do i deal with the inputs in order to send my order?
Thanks in advance