Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 376

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
The time to open a position, the time to close a position - the candle on which that time is and the time to open that candle.
A big arigato!
I'll get into it!!!
You can also use the flag.
Declare static bool variable or variable of global level, let it be flag. Order opened - flag = true, a new candle opens - flag = false and add this flag to the condition of order opening.
A big arigato!
I'll get into it!!!
Can I set background colour for OBJ_LABEL object? Or is it possible to write text on a plain background of some colour?
The background foran OBJ_LABEL object is the background of the graphic,
and the text colour can
Changes the value of the specified object property.
boolObjectSet(
stringobject_name,// object name
intindex,// property identifier
double value//value
);
Identifier of the OBJPROP_COLOR property
I won't say anything about women. But the advice was good.
I didn't say it was bad advice. I only continue to say that there are always several options and everyone is free to choose his or her own. And sometimes even change the options depending on the situation.
One discussion today touched on the direction of overriding positions... Many argue that you should ALWAYS search from OrdersTotal()-1 to 0. And I don't agree with this. NOT ALWAYS... If I need to search positions not to close, it does not make any difference which way they should go.
I don't like the "one size fits all" approach. I don't accept one-size-fits-all functions, like pitchfork, rake and scythe all in one...
I know it's a dumb question, but I can't find anything anywhere. How do I declare an array with a variable?
For example, I write
- it's OK.
But as soon as I type in
it gives an error: '[' - invalid index value
I know it's a dumb question, but I can't find anything anywhere. How do I declare an array with a variable?
For example, I write
- it's OK.
But as soon as I type in
it gives an error: '[' - invalid index value
You cannot do it that way. Only by changing the first dimension of the array.
Hi! Can you tell me how to return the number of last losing orders, after profitable ones?
Here is my part of the code what is wrong?
Reverse the order of reading History
I know it's a dumb question, but I can't find anything anywhere. How do I declare an array with a variable?
For example, I write
- it's OK.
But as soon as I type in
it gives an error: '[' - invalid index value