Your order logic is wrong from the start. Find a simple EA on MA(e.g. CodeBase) and use it. Or you can modify it to suit your own idea. Regarding your code as a whole, everything is wrong there. Pay more attention to coding. Start with a simple one. Or, like I said, find a ready-made example.
Add code snippets using the special button at the top:
Your order logic is wrong from the start. Find a simple EA on MA(e.g. CodeBase) and use it. Or you can modify it to suit your own idea. Regarding your code as a whole, everything is wrong there. Pay more attention to coding. Start with a simple one. Or, like I said, find a ready-made example.
Add code snippets using the special button at the top:
Sanjakotik78 #: I've looked at examples of other EAs, and they didn't display anything like that.
I've already highlighted some of your mistakes in a previous post. Look at the code carefully and you will find more than one more error. So, like I said, start with a simple one. Or make your own robot based on a simple example (I told you that too), where all necessary functions and operators are spelled correctly.
I've already highlighted some of your mistakes in a previous post. Look at the code carefully and you will find more than one more error. So, like I said, start with a simple one. Or make your own robot on the basis of a simple example (I've told you about it too), where all needed functions and operators are registered correctly.
Although, MQL4 doesn't need brackets(#17703). The Bid and Ask are variables. I decided yesterday, thatBid() and Ask() are functions, like in MQL5.I've been writing applications in MQL5 for a long time, and I haven't written anything for MetaTrader 4 only.
People help. There is an indicator and a bot. The indicator opens orders, and the bot accompanies. To work correctly the bot needs timeframe on which the order was opened. Timeframe indicator is written in the order comment, but when the bot closes the part of volume, the comment is rewritten and instead of TF appears, for example, "from #30029192". Is there another simple way to read the order timeframe to the bot?
The indicator cannot open orders and make trades. Please refer to the documentation.
The order is opened by the symbol. No timeframes are needed for this.
So it's a bot, not the point. The first bot opens, the second bot accompanies. I know how orders open, but the second bot needs a timeframe, you didn't read it carefully.
Your order logic is wrong from the start. Find a simple EA on MA(e.g. CodeBase) and use it. Or you can modify it to suit your own idea. Regarding your code as a whole, everything is wrong there. Pay more attention to coding. Start with a simple one. Or, like I said, find a ready-made example.
Add code snippets using the special button at the top:
Your order logic is wrong from the start. Find a simple EA on MA(e.g. CodeBase) and use it. Or you can modify it to suit your own idea. Regarding your code as a whole, everything is wrong there. Pay more attention to coding. Start with a simple one. Or, like I said, find a ready-made example.
Add code snippets using the special button at the top:
thank you. what exactly is the wrong logic?
You call:
What do you think the OrderClose function does before the order or position closes?
thank you. what exactly is the wrong logic?
Initially in the fact that
Initially in the fact that the sp
The original point is...
Thank you all. I will look into it further.
I've looked at examples of other EAs, and they didn't display anything like that.
I've already highlighted some of your mistakes in a previous post. Look at the code carefully and you will find more than one more error. So, like I said, start with a simple one. Or make your own robot based on a simple example (I told you that too), where all necessary functions and operators are spelled correctly.
I've already highlighted some of your mistakes in a previous post. Look at the code carefully and you will find more than one more error. So, like I said, start with a simple one. Or make your own robot on the basis of a simple example (I've told you about it too), where all needed functions and operators are registered correctly.
Although, MQL4 doesn't need brackets(#17703). The Bid and Ask are variables. I decided yesterday, thatBid() and Ask() are functions, like in MQL5.I've been writing applications in MQL5 for a long time, and I haven't written anything for MetaTrader 4 only.
The indicator opens orders.
The indicator cannot open orders and make trades. See documentation.
To work correctly, the bot needs the timeframe, on which the order has been opened.
An order is opened by a symbol. No timeframe is needed for this.
The indicator cannot open orders and make trades. Please refer to the documentation.
The order is opened by the symbol. No timeframes are needed for this.