Opens a SELL position on each bar, if Close of the 1st bar > Close of the 3rd bar. Opens a BUY position on each bar, if Close of the 3rd bar > Close of the 1st bar.
If you want to change the order opening condition, it can be easily done by changing the condition in just one line:
Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/17475
10 pips per day opposite to the "yesterday's trend".SmoothAlgorithms
A library of averaging algorithms, the algorithms were described in details in the article "Averaging Price Series for Intermediate Calculations Without Using Additional Buffers"