- www.mql5.com
- Flexible MetaTrader 5 trading system with all order types
- Web version features
- Download the MetaTrader 5 mobile app for Android
You should remove the extra semicolon ...
Also, please edit your post (don't create a new post) and replace your code properly (with "</>" or Alt-S), or attach the original file directly with the "+ Attach file" button below the text box.void OnStart() // <- remove the ";" {
You should remove the extra semicolon ...
Also, please edit your post (don't create a new post) and replace your code properly (with "</>" or Alt-S), or attach the original file directly with the "+ Attach file" button below the text box.Thankyou! I removed it and now have 10 errors instead of the one.
😅 That is to be expected of a newbie coder that still does not know their way around the language and the platform. It's part of the learning experience.
Also, please fix your post as I demonstrated in the animation. Copy the code from your original code file and not from the post itself.
😅 That is to be expected of a newbie coder that still does not know their way around the language and the platform. It's part of the learning experience.
Also, please fix your post as I demonstrated in the animation. Copy the code from your original code file and not from the post itself.
Done!
Well this appears to be MQL4
// Open a buy order int order = OrderSend(_Symbol, OP_BUY, volume, Ask, 3, sl, tp, "My gold trade", 12345, 0, Green); // Check if the order was successfully placed if (order > 0) Print("Buy order placed successfully, ID: ", order); else Print("Error placing buy order:"), ErrorDescription(GetLastError()));
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use