1. Use ResetLastError before calling OrderSend and then GetLastError after calling OrderSend. Check what the error code is.
2. Double check your volume parameter to make sure it's >= minimum lot size, <= maximum lot size, and that it's a valid volume step.
OrderSend(NULL, OP_BUY, 0.001, Ask, 10*10, StopLossLevel, TakeProfitLevel, "My 1st Order!"); //notice that slippage also has to be multiplied by 10You can grab those 3 pieces of information using either MarketInfo or SymbolInfoDouble. I'd go with SymbolInfoDouble to ensure compatibility with MQL5.
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.07.25)

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Code Above:
I was trying to figure out why my script doesnt let me place a buy.
Things i have tried:
i have made sure my autotrading is on on mt4
other than that i dont know what else to do to try to resolve this problem.