- How to temporarily stop an automatic trader
- Can you assist how to use OHLC to create signals for Harami candlestick pattern
- Sudden Closing of Trades
MT4: Learn to code it.
MT5: Begin learning to code it.
If you don't learn MQL4/5, there is no common language for us to communicate. If we tell you what you need, you can't code it. If we give you the code, you don't know how to integrate it into your code.
This just declares that you will define a function taking five parameters and returning a bool.
It has an extra comma.bool Buy( double lot, string symbol=NULL, double price=0.0, double StopLoss= 30, double TakeProfit= 130,);
This is how you define such a function. bool Buy( double lot, string symbol=NULL, double price=0.0, double StopLoss= 30, double TakeProfit= 130) { // code that does things with those parameters return result; }
You already know how to do that with your function MarketOrder.
-
if(true) { bool Buy() }
What is this nonsense? You have to call the function, with its parameters. Do something with the return value. And end the call with a semicolon.
-
Where is the close brace for the enclosing function?
-
int OnInit(); def worktime; { //--- Check the time. if(TimeCurrent() >= StringToTime(TimeToString(TimeCurrent(),TIME_DATE)+" "+StartHour+":"+StartMinute) && TimeCurrent() < StringToTime(TimeToString(TimeCurrent(),TIME_DATE)+" "+EndHour+":"+EndMinute) ); { Print("Grind!"); return(TimeCurrent());
Perhaps you should read the manual. OnInit returns an int. It does not return a datetime.
How To Ask Questions The Smart Way. (2004)
How To Interpret Answers.
RTFM and STFW: How To Tell You've Seriously Screwed Up. -
if(OrdersTotal()==0) { if(BuySignal) OrderSend(Buy);
Perhaps you should read the manual. OrderSend does not have one parameter and you can't pass a function. But you already know how to do that with your function MarketOrder.
-
OrderClose(All orders);
Perhaps you should read the manual. Learn how to select orders in an OrderSelect loop and close them one by one. Or perhaps you meant positions not pending orders.
-
Did "you" write that with Chatgpt (the worst)?
Chatgpt (the worst), EA builder, EA Builder Pro, EATree, Etasoft forex generator, Forex Strategy Builder, ForexEAdvisor, ForexRobotAcademy.com, forexsb, FX EA Builder, fxDreema, Forex Generator, FxPro, Molanis, Octa-FX Meta Editor, Online Forex Expert Advisor Generator, Strategy Builder FX, Strategy Quant, Visual Trader Studio, MQL5 Wizard, etc., are all the same. You will get something quick, but then you will spend a much longer time trying to get it right, than if you learned the language up front, and then just wrote it.
-
Since you haven't learned MQL4/5, therefor there is no common language for us to communicate.
If we tell you what you need, you can't code it.
If we give you the code, you don't know how to integrate it into yours.
We are willing to HELP you when you post your attempt (using Code button) and state the nature of your problem, but we are not going to debug your hundreds of lines of code. You are essentially going to be on your own. EA builder makes bad code: - Counting up while closing multiple orders.
- Bars is unreliable (Max bars in chart), volume is unreliable (miss ticks.) Always use time.
- Not adjusting for 4/5 digit brokers, TP/SL and slippage.
- Not adjusting for ECN brokers. pre-Build 500)
- Not checking return codes.
EATree uses objects on chart to save values — not persistent storage (files or GV+Flush.) No recovery (crash/power failure.) FX EA Builder makes bad code: - Not checking return codes.
- Loosing open tickets on terminal restart. No recovery (crash/power failure.)
- Not adjusting stops for the spread.
- Using OrdersTotal directly.
FOREXEADVISOR STRATEGY BUILDER makes bad code: - Non-updateing global variables.
- Compilation errors.
- Not checking return codes.
ForexEAdvisor makes bad code: - Not checking return codes.
- Not reporting errors.
-
Learn the language.
MT4: Learn to code it.
MT5: Begin learning to code it.
If you don't learn MQL4/5, there is no common language for us to communicate. If we tell you what you need, you can't code it. If we give you the code, you don't know how to integrate it into your code.
This just declares that you will define a function taking five parameters and returning a bool.
It has an extra comma.This is how you define such a function. You already know how to do that with your function MarketOrder.
-
What is this nonsense? You have to call the function, with its parameters. Do something with the return value. And end the call with a semicolon.
-
Where is the close brace for the enclosing function?
-
Perhaps you should read the manual. OnInit returns an int. It does not return a datetime.
How To Ask Questions The Smart Way. (2004)
How To Interpret Answers.
RTFM and STFW: How To Tell You've Seriously Screwed Up. -
Perhaps you should read the manual. OrderSend does not have one parameter and you can't pass a function. But you already know how to do that with your function MarketOrder.
-
Perhaps you should read the manual. Learn how to select orders in an OrderSelect loop and close them one by one. Or perhaps you meant positions not pending orders.
-
Did "you" write that with Chatgpt (the worst)?
Chatgpt (the worst), EA builder, EA Builder Pro, EATree, Etasoft forex generator, Forex Strategy Builder, ForexEAdvisor, ForexRobotAcademy.com, forexsb, FX EA Builder, fxDreema, Forex Generator, FxPro, Molanis, Octa-FX Meta Editor, Online Forex Expert Advisor Generator, Strategy Builder FX, Strategy Quant, Visual Trader Studio, MQL5 Wizard, etc., are all the same. You will get something quick, but then you will spend a much longer time trying to get it right, than if you learned the language up front, and then just wrote it.
-
Since you haven't learned MQL4/5, therefor there is no common language for us to communicate.
If we tell you what you need, you can't code it.
If we give you the code, you don't know how to integrate it into yours.
We are willing to HELP you when you post your attempt (using Code button) and state the nature of your problem, but we are not going to debug your hundreds of lines of code. You are essentially going to be on your own. EA builder makes bad code: - Counting up while closing multiple orders.
- Bars is unreliable (Max bars in chart), volume is unreliable (miss ticks.) Always use time.
- Not adjusting for 4/5 digit brokers, TP/SL and slippage.
- Not adjusting for ECN brokers. pre-Build 500)
- Not checking return codes.
EATree uses objects on chart to save values — not persistent storage (files or GV+Flush.) No recovery (crash/power failure.) FX EA Builder makes bad code: - Not checking return codes.
- Loosing open tickets on terminal restart. No recovery (crash/power failure.)
- Not adjusting stops for the spread.
- Using OrdersTotal directly.
FOREXEADVISOR STRATEGY BUILDER makes bad code: - Non-updateing global variables.
- Compilation errors.
- Not checking return codes.
ForexEAdvisor makes bad code: - Not checking return codes.
- Not reporting errors.
-
If you have a computer science degree, hopefully you learned C/C++. That is the knowledge you should draw on as MQL is very similar to C/C++.
However, the code you presented, does not seem to show you knowing C/C++ at all that well.
If you have a computer science degree, hopefully you learned C/C++. That is the knowledge you should draw on as MQL is very similar to C/C++.
However, the code you presented, does not seem to show you knowing C/C++ at all that well.
Then forget the ASAP! That is not reasonable. If you want ASAP, hire someone to code it for you. Otherwise, throw away the ASAP and learn to code in MQL5 properly over an extended period of time.
Then forget the ASAP! That is not reasonable. If you want ASAP, hire someone to code it for you. Otherwise, throw away the ASAP and learn to code in MQL5 properly over an extended period of time.
For someone who has a Computer Science degree, your original reasoning was not consistent with the objective.
You of all people, should know and understand the required learning curve for any computer language and its underlaying platform.
It should have been obvious from the start, that it would require some amount of time for you to become proficient at it.
For someone who has a Computer Science degree, your original reasoning was not consistent with the objective.
You of all people, should know and understand the required learning curve for any computer language and its underlaying platform.
It should have been obvious from the start, that it would require some amount of time for you to become proficient at it.
I knew very well that it wasn't gonna be easy and quick. But I need this EA ASAP and I don't have money to pay someone. I've got no money at all. If you've ever done something with your problems being the biggest driving force then you'll understand. Reasoning sometimes goes out the window. But THANK YOU for knocking some sense back into me. I'm spending every chance and resource I have to learn MQL5
Did you get your computer science degree ASAP? As mentioned by Fernando, you can hire a freelancer since your problem is a "want" and not something which seems interesting
Then if you don't have the money for it, then it is not ASAP. For the simple fact, that having an EA does not mean it is going to be profitable in a very short term, and even if it was guaranteed to be profitable, you don't have the capital to invest. And even if you used a Prop-firm, their requirements are tough, and you would not meet those requirements with something you don't yet master.
Becoming consistently profitable at trading, even with EAs, requires many years. It's like any other profession—it takes time—a lot of time. Time is required to gain experience and with it the skill and the knowledge that it requires.
So, if you need money for life's requirements, focus on what you can already do well and from which you can directly benefit with little risk, even if it is not a lot.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use