[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 319

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
You can convert a number to a string and write a function to process the characters in that string. It's not complicated here - we only round a number if it has more than one digit after the decimal point.
there is a function "double MathRound( double value)", but I need the rounding to a larger decimal fraction, and if the number is integer or already decimal, then leave it alone.
For example: 1) 0.744 round to 0.8; 1.233 round to 1.3
2) 0.9 or 3 or 1.5 do not touch.
Didn't check it, but somehow.
Completely useless gesture enough double res=NormalizeDouble(res,1) mathematically still handle double res = 3; or double res = 3.0;
The difference will only be visible in printout (graph), but this is not in the author's description of the problem.
Completely useless gesture enough double res=NormalizeDouble(res,1) mathematically still handle double res = 3; or double res = 3.0;
The difference will only be visible in the printout (graph), but this is not in the author's description of the problem.
Well, you can do it this way:
I think the first variant is better. It will work faster.Well, you could go like this:
I think the first option is best. It will work faster.This option.
should be the fastest
Vadim's version is 20-25% faster, but the effect starts to show up steadily when the number of iterations exceeds a million. (checked)
Show me the code, how did you check it
Vadim's version is 20-25% faster, but the effect starts to show up steadily when the number of iterations exceeds a million. (tested)
the correct way to write it: if (OrderSelect (OrdersHistoryTotal()-1, SELECT_BY_POS, MODE_HISTORY) == OrderTakeProfit() == OrderClosePrice()) Stop=false // i.e. if the last order from the end closed at Take Profit (taking profit upon reaching a certain level), the Stop=false? (Stop in global variables)
this question has arisen because the order opens by a condition if((iClose(NULL,0,1)<ma) && Stop==True)...