как вот это запилить по-компактнее, не прессуя смайлы и, тем самым, не ухудшая читаемость
if ( ExtremumBuffer[bar]>ExtremumBuffer[bar+1] && ExtremumBuffer[bar]<ExtremumBuffer[bar+2] &&
ExtremumBuffer[bar+2]>ExtremumBuffer[bar+4] && ExtremumBuffer[bar+3]<ExtremumBuffer[bar+4]
&&
(
(ExtremumBuffer[bar+4]>ExtremumBuffer[bar] &&
(ExtremumBuffer[bar+4]-ExtremumBuffer[bar])<=MarketInfo(Symbol(),MODE_TICKSIZE)*max_percent_diff)
||
(ExtremumBuffer[bar]>ExtremumBuffer[bar+4] &&
(ExtremumBuffer[bar]-ExtremumBuffer[bar+4])<=MarketInfo(Symbol(),MODE_TICKSIZE)*max_percent_diff)
)
&&
(
(
(ExtremumBufferShift[bar]-ExtremumBufferShift[bar+2])>(ExtremumBufferShift[bar+2]-ExtremumBufferShift[bar+4])
&&
((ExtremumBufferShift[bar]-ExtremumBufferShift[bar+2])/(ExtremumBufferShift[bar+2]-ExtremumBufferShift[bar+4])*100)<=(max_percent_diff+100)
)
||
(
(ExtremumBufferShift[bar]-ExtremumBufferShift[bar+2])<(ExtremumBufferShift[bar+2]-ExtremumBufferShift[bar+4])
&&
((ExtremumBufferShift[bar+2]-ExtremumBufferShift[bar+4])/(ExtremumBufferShift[bar]-ExtremumBufferShift[bar+2])*100)<=(max_percent_diff+100)
)
)
&&
(
(
(ExtremumBufferShift[bar+2]-ExtremumBufferShift[bar+1])>(ExtremumBufferShift[bar+3]-ExtremumBufferShift[bar+2])
&&
((ExtremumBufferShift[bar+2]-ExtremumBufferShift[bar+1])/(ExtremumBufferShift[bar+3]-ExtremumBufferShift[bar+2])*100)<=(max_percent_diff+100)
)
||
(
(ExtremumBufferShift[bar+2]-ExtremumBufferShift[bar+1])<(ExtremumBufferShift[bar+3]-ExtremumBufferShift[bar+2])
&&
((ExtremumBufferShift[bar+3]-ExtremumBufferShift[bar+2])/(ExtremumBufferShift[bar+2]-ExtremumBufferShift[bar+1])*100)<=(max_percent_diff+100)
)
)
&&
(
(
(ExtremumBufferShift[bar+1]-ExtremumBufferShift[bar])>(ExtremumBufferShift[bar+4]-ExtremumBufferShift[bar+3])
&&
((ExtremumBufferShift[bar+1]-ExtremumBufferShift[bar])/(ExtremumBufferShift[bar+4]-ExtremumBufferShift[bar+3])*100)<=(max_percent_diff+100)
)
||
(
(ExtremumBufferShift[bar+1]-ExtremumBufferShift[bar])>(ExtremumBufferShift[bar+4]-ExtremumBufferShift[bar+3])
&&
((ExtremumBufferShift[bar+4]-ExtremumBufferShift[bar+3])/(ExtremumBufferShift[bar+1]-ExtremumBufferShift[bar])*100)<=(max_percent_diff+100)
)
)
)
{
bla-bla-bla
}