can simply be in Boolean variables, e.g.
X=A || B;
X=X || C || D;
X=X || E;
if (X) Action;
Avals:
Thank you for your feedback! And these bools can be quite complex, involving many parameters depending on constantly changing market conditions?
can simply be in Boolean variables, e.g.
X=A || B;
X=X || C || D;
X=X || E;
if (X) Action;
borilunad:
Thank you for your feedback! And these bools can be quite complex, depending on constantly changing market conditions?
Thank you for your feedback! And these bools can be quite complex, depending on constantly changing market conditions?
of course
Avals:
of course
Thanks again! I'm going to try it now!
Looked in the Dock and saw:
Can a boolean a be given this value?bool a = true; bool b = false; bool c = 1; а = (isCloseLastPosByTake() == True && Profit > ProClo / clo - GetProfitCloseLastPosByTake() * clo);
borilunad:
Thanks again! I'm going to try it now!
Looked in the Dock and saw it:
You can, but the speed drops a lot.
Vinin:
You can, but the speed will drop drastically.
Isn't the speed affected by the "or" in if()?
You can, but the speed will drop drastically.
Vinin:
Of course they do. It has to be checked.
But if you can't find something fast, then I'll stick with if()! I've already reduced the slowdown noticeably by removing unnecessary checks for me in all functions. Thank you very much for your attention! I'll be happy to learn and check all possible options!
Of course they do. It has to be checked.
You can also optimise calculations in this way:
bool M = false; if (A) M = true; else if (B) M = true; else if (C) M = true; else if (D) M = true; else if (E) M = true; if (M) Action;
Or like this:
bool M = true; if (!A) if (!B) if (!C) if (!D) if (!E) M = false; if (M) Action;

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
None of the operators fit. Is there any other way without if(A || B || C || D || E) Action;?
I ask moderators not to send to general questioner thread due to importance of question I am thinking about and can't find more rational solution! Thank you!