2 Formula >> Condition, Crosses problem
-
I have a little problem.
In picture 01 and 02 are Formula settings.
In picture 03 is this Condition from this two Formula as "Crosses below" (or above). And EA in strategy tester with this Crosses from formula is not working (result list is blank). But with Condition as "is Above" or "is Below" it is working correctly.I know, it goes make without Formula, Indicators set directly in Condition, but I need make two Condition "Crosses below" and "Crosses above" and set indicators directly in Condition is made 4 input parameters (a1, a2, b1, b2). Using my solution there are only 2 input parameters (A,B) and than optimization in strategy tester is more quickly. (a1 and a2 are the same as parameter A)



-
ma14 and ma34 are very simple and normal numeric values, not handles to those indicators, objects, pointers or something like that. Just put both indicators in the Condition and remove those Formula blocks, it will work
-
Yes, I know, when are both parameters in Condition, it works.
And is there a way, how to get only 2 input parameters for both Condition blocks?
As in the picture, there are 2 Condition blocks, and each block have 2 input parameters, and there are 2 blocks than I have 4 input parameters - and this is poor for strategy tester, by reason, 2 input parameters are even same (2xMA34 and 2xMA14). When I make test in strategy tester as optimization, it make a lot of uselessly combinations.......
Clipboard02.jpg -
Of course, use Constants (Inputs): https://fxdreema.com/demo/mt4-constants
-
something is wrong?

......
Clipboard03.jpg
Clipboard04.jpg -
remove the tick in the condition block and it will work
-
I made it all again and now it is working.
I have no idea where was bug ...
(old printscreen from metaeditor)......
const.jpg -
First of all, my recommendation for everyone is to NOT use those checkboxes. I know that they are easy to be checked, and they are very good when you want to check one or two and quickly try some optimization for the EA. But to use those as input parameters is not a good idea at all.
Now the problem comes because you are trying to set input as input. Constants are already inputs, no need for these checkboxes to be checked. And again, I really, really... REALLY recommend to NOT use them.
-
I see it, checkbox ...


Thank you, now I go use only constants as input.