Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Basics of sending orders - MetaTrader 4 script | Trading script download - MT4/MT5 resources

author EAcpu | 4 reads | 0 comments |

Send Order Basic - script for MetaTrader 4

Send Order Basic - script for MetaTrader 4

A simple script to easily submit market or pending orders to find your stop loss, take profit or trailing stop without adding or subtracting decimals. Using this script, you can place a buy, sell, buy limit, sell limit, buy stop, or sell stop order. After executing the script, you will see a message confirming your order or indicating that an error occurred.

For market orders, simply enter your Take Profit Level (in pips), Stop Loss Level (in pips), Slippage, Lot Size, and Order Type (Buy or Sell). For pending orders (limit or stop), be sure to include the price at which you want the broker to execute the order. If desired, you can also enter a trailing stop (in pips).

Send Order Basic - script for MetaTrader 4

After executing the script, an alert message will appear confirming that the order was successfully submitted.

Send Order Basic - script for MetaTrader 4

If an error occurs, the alert message will provide the relevant error code and category.


Attachment download

📎 sendorderbasic.mq4 (4.3 KB)

Source: MQL5 #17322

Verification code Refresh