“Doesn't work” is meaningless — just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires — meaningless.
How To Ask Questions The Smart Way. 2004
When asking about code
Do you really expect an answer? There are no mind readers here and our crystal balls are cracked. Always post all relevant code.
How To Ask Questions The Smart Way. 2004
Be precise and informative about your problem
We can't see your broken code.
Fix your broken code.
With the information you've provided — we can only guess. And you haven't provided any useful information for that.
“Doesn't work” is meaningless — just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires — meaningless.
How To Ask Questions The Smart Way. 2004
When asking about code
Do you really expect an answer? There are no mind readers here and our crystal balls are cracked. Always post all relevant code.
How To Ask Questions The Smart Way. 2004
Be precise and informative about your problem
We can't see your broken code.
Fix your broken code.
With the information you've provided — we can only guess. And you haven't provided any useful information for that.
BEs question is over, the problem now it's about a looping I am trying to create related to string for generate new number for a newer order, can you help me, please?
My code for this part:
Have you used the debugger right before the crash to what are the values that cause the crash?
void TradesTotais() { int history0 = 0; int history1 = 1; int history2 = history1++; int history3 = history2++; IntegerToString(history0,history1); IntegerToString(history2); IntegerToString(history3); if(PositionsTotal() == 1 && OrdersTotal() <= 1) { Print("Histórico: ",history1); if(PositionsTotal() == 1 && OrdersTotal() == 1) { Print("Histórico: ",history2); if(PositionsTotal() == 1 && history2) { Print("Histórico: ",history3); } } } }
Thanks for you all.
- Please use the Styler (Ctrl ,) before posting the code here. It will even help you with your code.
- the ++ operator is changing the variable it is associated with what you mean would be (I guess):
int history2 = history1+1;
But why don't you use simply
int history2 = 3; int history3 = 4;
- Do you want positions and orders from the history or actual open and placed ones? The functions are different!
You can use this list for a kind of keyword search: https://www.mql5.com/en/docs/function_indices. E.g. search for History there with Ctrl f. - Wouldn't do it a simple
Print("Histórico: ",(PositionsTotal()+OrdersTotal()));
But these would be the sum of open positiones and pending orders. - You'd better look for sample code in the CodeBase or the Articles the nearly meet your needs and amend this.
It's a better and faster way to learn MQL5 as you don't step into each pitfall.
- www.mql5.com
- Please use the Styler (Ctrl ,) before posting the code here. It will even help you with your code.
- the ++ operator is changing the variable it is associated with what you mean would be (I guess): But why don't you use simply
- Do you want positions and orders from the history or actual open and placed ones? The functions are different!
You can use this list for a kind of keyword search: https://www.mql5.com/en/docs/function_indices. E.g. search for History there with Ctrl f. - Wouldn't do it a simple
But these would be the sum of open positiones and pending orders. - You'd better look for sample code in the CodeBase or the Articles the nearly meet your needs and amend this.
It's a better and faster way to learn MQL5 as you don't step into each pitfall.
Well, I made another way and it's ok now. If new questions pop up I will call you again, ok? Cheers!
- Please use the Styler (Ctrl ,) before posting the code here. It will even help you with your code.
- the ++ operator is changing the variable it is associated with what you mean would be (I guess): But why don't you use simply
- Do you want positions and orders from the history or actual open and placed ones? The functions are different!
You can use this list for a kind of keyword search: https://www.mql5.com/en/docs/function_indices. E.g. search for History there with Ctrl f. - Wouldn't do it a simple
But these would be the sum of open positiones and pending orders. - You'd better look for sample code in the CodeBase or the Articles the nearly meet your needs and amend this.
It's a better and faster way to learn MQL5 as you don't step into each pitfall.
It's very funny, cause I managed to solve the orders count problem using .deal from the result part about MQLTradeResult, but I tried with a new EA the same and... nothing, very strange, the results maintain at 0;
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi people, how are you? I hope well. I am develloping an EA, but... I can't put the break-even working, it keeps crashing, I tried somethings, but nothing.
I don't know the way I have to put the information here, so I am not sharing the BE part, now.