Using SQ4 to generate strategies using two symbols (EUR/USD and GBP/USD), the rules are comparing the main symbol prices with the sub chart prices:
e.g.
and Close above BollingerBands(Subchart1, H1,10, 1).LowerBand)))
Which is comparing a EUR/USD price with the price of a GBP/USD output from the bollinger band.
Similarly opening at a price that combines the two different symbols:
Open Long order at (Highest(Main chart,0, 98)[3] + (0.70 * BiggestRange(Subchart1, H1, 34)[4])) Stop;
These type of rules make no sense, you can't compare the values or combine the values of different symbols. The should only be compared or combined with themselves, not other symbol values.
Another rule that can be eliminated is comparing something to itself.
Here's an example which results in a meaningless rule:
==== Rule: Long exit ====
if (Is Bar Open
and ((MarketPosition("Any", MagicNumber, "") is Long)
and (((ATR(Main chart,0,8)[8] >= ATR(Main chart,0,56)[3])
and (Bar Hour < Bar Hour))
and (SmallestRange(Main chart,0, 88)[8] is falling))))
==== Rule: Short exit ====
if (Is Bar Open
and ((MarketPosition("Any", MagicNumber, "") is Short)
and (((ATR(Main chart,0,8)[8] < ATR(Main chart,0,56)[3])
and (Bar Hour > Bar Hour))
and (SmallestRange(Main chart,0, 88)[8] is rising))))
Bar Hour is always equal to Bar Hour.
Any rule that compares X to X can be discarded in the generation.
Some further illogical rules, this time with just a single symbol rather than multi-symbol
==== Rule: Long entry ====
if (Is Bar Open
and (No Trade Recently Closed
and ((((Open(Main chart,0)[2] is falling)
or Open above BollingerBands(Main chart,0,75, 1.80).LowerBand)
and (Bar Hour crosses below Volume(Main chart,0)[3]))
or Close above BollingerBands(Main chart,0,93, 2.10).UpperBand)))
Clearly you can't compare the hour of the day with the (tick) volume of a chart.
It is 100% critical that every output from a "function" has a unit, such as:
Price
Price Range
Number
Time
Volume
Percentage
And only those units that care comparable are used in rules, to prevent time wasted generating lots of nonsense strategies
For example, RSI outputs a Percentage, it can therefore be compared with any other "output" that is also a percentage.
It can also be compared with a constant (e.g. 25) as long as the constant is within the range of a percentage (i.e. 0 to 100)